Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine error message for rp2040 audiobusio I2S object creation #8466

Merged
merged 3 commits into from
Oct 14, 2023

Conversation

heygauri
Copy link

@heygauri heygauri commented Oct 8, 2023

The error message for creating an I2S object on the rp2040 platform in CircuitPython can be misleading when the word_select and data pins are not sequential. This change updates the error message to provide clearer guidance by specifying "GPIO pins" instead of just "pins". The revised message now reads:

ValueError: Bit clock and word select must be sequential GPIO pins

Closes #8058

The error message for creating an I2S object on the rp2040 platform
in CircuitPython can be misleading when the word_select and data pins
are not sequential. This change updates the error message to provide
clearer guidance by specifying "GPIO pins" instead of just "pins".
The revised message now reads:

ValueError: Bit clock and word select must be sequential GPIO pins

Closes adafruit#8058

Signed-off-by: Sumitra Sharma <sumitraartsy@gmail.com>
Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@heygauri run make translate locally, and then commit the resulting change to locale/circuitpython.pot.

@heygauri
Copy link
Author

heygauri commented Oct 9, 2023

@heygauri run make translate locally, and then commit the resulting change to locale/circuitpython.pot.

I followed the same process, and it updated the error message in locale/circuitpython.pot. However, it also generated some unintended changes, approximately -518 lines, which I am not aware of. You can see those changes in this PR.

@heygauri
Copy link
Author

@heygauri run make translate locally, and then commit the resulting change to locale/circuitpython.pot.

I followed the same process, and it updated the error message in locale/circuitpython.pot. However, it also generated some unintended changes, approximately -518 lines, which I am not aware of. You can see those changes in this PR.

Update: I followed the document https://learn.adafruit.com/building-circuitpython/linux and below is the output:

$ make translate
find extmod lib main.c ports/atmel-samd ports/cxd56 ports/espressif ports/mimxrt10xx ports/nrf ports/raspberrypi ports/stm py shared-bindings shared-module supervisor -type d ( -path "ports//build-" -o -path "ports//build" -o -path ports/atmel-samd/asf4 -o -path ports/cxd56/spresense-exported-sdk -o -path ports/espressif/esp-idf -o -path ports/mimxrt10xx/sdk -o -path ports/raspberrypi/sdk -o -path ports/stm/st_driver -o -path lib/tinyusb -o -path lib/lwip -o -path extmod/ulab/circuitpython -o -path extmod/ulab/micropython ) -prune -o -type f ( -iname ".c" -o -iname "*.h" ) -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate --keyword=MP_ERROR_TEXT -o - | sed -e '/"POT-Creation-Date: /d' > locale/circuitpython.pot

@dhalbert
Copy link
Collaborator

dhalbert commented Oct 14, 2023

The missing error messages are because the ulab submodule was not loaded, so its messages were omitted. You can do make fetch-all-submodules from the top level, or descend into ports/atmel-samd (or most other ports), and then do make fetch-port-submodules, which will get ulab.

There were some new translations, so I merged from upstream (upon reflection, probably not necessary), re-did the make translate, and pushed new commits to your branch. Should be all set now. I'll review and merge when the build is done.

Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dhalbert dhalbert merged commit a4b8afb into adafruit:main Oct 14, 2023
452 checks passed
@heygauri
Copy link
Author

The missing error messages are because the ulab submodule was not loaded, so its messages were omitted. You can do make fetch-all-submodules from the top level, or descend into ports/atmel-samd (or most other ports), and then do make fetch-port-submodules, which will get ulab.

There were some new translations, so I merged from upstream (upon reflection, probably not necessary), re-did the make translate, and pushed new commits to your branch. Should be all set now. I'll review and merge when the build is done.

Thank you for the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue/confusing feedback creating I2S object on Seeed XIAO RP2040
2 participants