diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 9537a28bdd..768daa8651 100755 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -583,6 +583,13 @@ msgstr "" msgid "Both RX and TX required for flow control" msgstr "" +#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h +msgid "Both buttons were pressed at start up.\n" +msgstr "" + #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" msgstr "" @@ -648,6 +655,11 @@ msgstr "" msgid "Bus pin %d is already in use" msgstr "" +#: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h +#: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h +msgid "Button A was pressed at start up.\n" +msgstr "" + #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." msgstr "" @@ -1975,18 +1987,38 @@ msgstr "" msgid "Temperature read timed out" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "The BOOT button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" "Increase the stack size if you know how. If not:" msgstr "" +#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h +msgid "The SW38 button was pressed at start up.\n" +msgstr "" + +#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h +msgid "The VOLUME button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " "exit safe mode." msgstr "" +#: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h +msgid "The central button was pressed at start up.\n" +msgstr "" + +#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h +msgid "The left button was pressed at start up.\n" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "" @@ -2047,7 +2079,7 @@ msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "" #: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " +msgid "To exit, please reset the board without requesting safe mode." msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c @@ -2345,10 +2377,6 @@ msgid "" "You pressed the reset button during boot. Press again to exit safe mode." msgstr "" -#: supervisor/shared/safe_mode.c -msgid "You requested starting safe mode by " -msgstr "" - #: py/objtype.c msgid "__init__() should return None" msgstr "" @@ -3815,48 +3843,6 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" -#: ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h -msgid "pressing BOOT button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h -msgid "pressing SW38 button at start up.\n" -msgstr "" - -#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h -msgid "pressing VOLUME button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h -#: ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h -#: ports/espressif/boards/lolin_c3_mini/mpconfigboard.h -#: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h -#: supervisor/shared/safe_mode.c -msgid "pressing boot button at start up.\n" -msgstr "" - -#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h -#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h -#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h -msgid "pressing both buttons at start up.\n" -msgstr "" - -#: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h -msgid "pressing central button at start up.\n" -msgstr "" - -#: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h -#: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h -msgid "pressing button A at start up.\n" -msgstr "" - -#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h -msgid "pressing the left button at start up\n" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" msgstr "" diff --git a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h index 9020c243b1..33910221a0 100644 --- a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h @@ -23,7 +23,7 @@ #define CALIBRATE_CRYSTALLESS 1 // Explanation of how a user got into safe mode. -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing both buttons at start up.\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("Both buttons were pressed at start up.\n") // Increase stack size slightly due to CPX library import nesting #define CIRCUITPY_DEFAULT_STACK_SIZE (4248) // divisible by 8 diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h index 5073c5e403..7f0e041f25 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h @@ -23,7 +23,7 @@ #define CALIBRATE_CRYSTALLESS 1 // Explanation of how a user got into safe mode. -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing both buttons at start up.\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("Both buttons were pressed at start up.\n") // Increase stack size slightly due to CPX library import nesting #define CIRCUITPY_DEFAULT_STACK_SIZE (4248) // divisible by 8 diff --git a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h index 20cfc617a2..12fd30e005 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +++ b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h @@ -23,7 +23,7 @@ #define CALIBRATE_CRYSTALLESS 1 // Explanation of how a user got into safe mode. -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing both buttons at start up.\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("Both buttons were pressed at start up.\n") // Increase stack size slightly due to CPX library import nesting. #define CIRCUITPY_DEFAULT_STACK_SIZE (4248) // divisible by 8 diff --git a/ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h b/ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h index bb99c412ae..1886f9e233 100644 --- a/ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h +++ b/ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h @@ -5,9 +5,6 @@ #define CALIBRATE_CRYSTALLESS 1 -// Explanation of how a user got into safe mode. -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing both buttons at start up.\n") - #define DEFAULT_I2C_BUS_SCL (&pin_PA08) #define DEFAULT_I2C_BUS_SDA (&pin_PA09) diff --git a/ports/atmel-samd/boards/meowmeow/mpconfigboard.h b/ports/atmel-samd/boards/meowmeow/mpconfigboard.h index 73853dab5d..ad6901230f 100644 --- a/ports/atmel-samd/boards/meowmeow/mpconfigboard.h +++ b/ports/atmel-samd/boards/meowmeow/mpconfigboard.h @@ -6,7 +6,7 @@ #define CALIBRATE_CRYSTALLESS 1 // Explanation of how a user got into safe mode. -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing both buttons at start up.\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("Both buttons were pressed at start up.\n") #define DEFAULT_I2C_BUS_SCL (&pin_PA01) #define DEFAULT_I2C_BUS_SDA (&pin_PA00) diff --git a/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h b/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h index fc478ef005..b7f2513217 100644 --- a/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h @@ -47,7 +47,7 @@ #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO38) // Explanation of how a user got into safe mode -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing SW38 button at start up.\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("The SW38 button was pressed at start up.\n") // UART pins attached to the USB-serial converter chip #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) diff --git a/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h b/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h index 42a575aa68..7f8288f17b 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h @@ -41,9 +41,6 @@ #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) -// Explanation of how a user got into safe mode -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing BOOT button at start up.\n") - // UART pins attached to the USB-serial converter chip #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) #define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO3) diff --git a/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h b/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h index 0cc6509647..32b0940881 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h @@ -44,7 +44,4 @@ // For entering safe mode #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO9) -// Explanation of how a user got into safe mode -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") - #define CIRCUITPY_ESP_USB_SERIAL_JTAG (1) diff --git a/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h b/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h index 3b1caff2e9..2cdf48fad3 100644 --- a/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h +++ b/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h @@ -41,7 +41,4 @@ #define CIRCUITPY_BOARD_UART (1) #define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO21, .rx = &pin_GPIO20}} -// Explanation of how a user got into safe mode -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") - #define CIRCUITPY_ESP_USB_SERIAL_JTAG (1) diff --git a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h index 51fb60fe1a..4875dcc745 100644 --- a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h +++ b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h @@ -35,5 +35,3 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO44) #define DEFAULT_UART_BUS_TX (&pin_GPIO43) - -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") diff --git a/ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h b/ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h index 423890f2e1..7de90b0ae8 100644 --- a/ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h +++ b/ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h @@ -35,7 +35,7 @@ #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) // Explanation of how a user got into safe mode -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing VOLUME button at start up.\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("The VOLUME button was pressed at start up.\n") // UART pins attached to the USB-serial converter chip #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) diff --git a/ports/espressif/boards/lolin_c3_mini/mpconfigboard.h b/ports/espressif/boards/lolin_c3_mini/mpconfigboard.h index 03e4d5d436..2a90d91845 100644 --- a/ports/espressif/boards/lolin_c3_mini/mpconfigboard.h +++ b/ports/espressif/boards/lolin_c3_mini/mpconfigboard.h @@ -45,7 +45,4 @@ #define CIRCUITPY_BOARD_UART (1) #define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO21, .rx = &pin_GPIO20}} -// Explanation of how a user got into safe mode -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") - #define CIRCUITPY_ESP_USB_SERIAL_JTAG (1) diff --git a/ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h b/ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h index fdc79ec744..dfa12b53b0 100644 --- a/ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h +++ b/ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h @@ -42,7 +42,7 @@ #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO39) // Explanation of how a user got into safe mode -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing central button at start up.\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("The central button was pressed at start up.\n") // UART pins attached to the USB-serial converter chip #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) diff --git a/ports/espressif/boards/m5stack_core_basic/mpconfigboard.h b/ports/espressif/boards/m5stack_core_basic/mpconfigboard.h index 6ea8e508d4..c974c64874 100755 --- a/ports/espressif/boards/m5stack_core_basic/mpconfigboard.h +++ b/ports/espressif/boards/m5stack_core_basic/mpconfigboard.h @@ -42,7 +42,7 @@ #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO39) // Explanation of how a user got into safe mode -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing button A at start up.\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("Button A was pressed at start up.\n") // UART pins attached to the USB-serial converter chip #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) diff --git a/ports/espressif/boards/m5stack_core_fire/mpconfigboard.h b/ports/espressif/boards/m5stack_core_fire/mpconfigboard.h index 8c389a641d..f56a8fe901 100755 --- a/ports/espressif/boards/m5stack_core_fire/mpconfigboard.h +++ b/ports/espressif/boards/m5stack_core_fire/mpconfigboard.h @@ -43,7 +43,7 @@ #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO39) // Explanation of how a user got into safe mode -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing button A at start up.\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("Button A was pressed at start up.\n") // UART pins attached to the USB-serial converter chip #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) diff --git a/ports/espressif/boards/microdev_micro_c3/mpconfigboard.h b/ports/espressif/boards/microdev_micro_c3/mpconfigboard.h index 97a18f3235..2153513306 100644 --- a/ports/espressif/boards/microdev_micro_c3/mpconfigboard.h +++ b/ports/espressif/boards/microdev_micro_c3/mpconfigboard.h @@ -50,6 +50,3 @@ // For entering safe mode #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO9) - -// Explanation of how a user got into safe mode -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") diff --git a/ports/espressif/boards/unexpectedmaker_tinypico/mpconfigboard.h b/ports/espressif/boards/unexpectedmaker_tinypico/mpconfigboard.h index a12ccb0c18..2db308f623 100644 --- a/ports/espressif/boards/unexpectedmaker_tinypico/mpconfigboard.h +++ b/ports/espressif/boards/unexpectedmaker_tinypico/mpconfigboard.h @@ -33,11 +33,6 @@ #define CIRCUITPY_BOARD_SPI (1) #define CIRCUITPY_BOARD_SPI_PIN {{.clock = &pin_GPIO18, .mosi = &pin_GPIO23, .miso = &pin_GPIO19}} -// #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) - -// Explanation of how a user got into safe mode -// #define BOARD_USER_SAFE_MODE_ACTION translate("pressing BOOT button at start up.\n") - // UART pins attached to the USB-serial converter chip #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) #define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO3) diff --git a/ports/espressif/boards/unexpectedmaker_tinypico_nano/mpconfigboard.h b/ports/espressif/boards/unexpectedmaker_tinypico_nano/mpconfigboard.h index 3cc64859ce..87c582b3bf 100644 --- a/ports/espressif/boards/unexpectedmaker_tinypico_nano/mpconfigboard.h +++ b/ports/espressif/boards/unexpectedmaker_tinypico_nano/mpconfigboard.h @@ -33,11 +33,6 @@ #define CIRCUITPY_BOARD_SPI (1) #define CIRCUITPY_BOARD_SPI_PIN {{.clock = &pin_GPIO18, .mosi = &pin_GPIO23, .miso = &pin_GPIO19}} -// #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) - -// Explanation of how a user got into safe mode -// #define BOARD_USER_SAFE_MODE_ACTION translate("pressing BOOT button at start up.\n") - // UART pins attached to the USB-serial converter chip #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) #define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO3) diff --git a/ports/nrf/boards/aramcon2_badge/mpconfigboard.h b/ports/nrf/boards/aramcon2_badge/mpconfigboard.h index 517ad7324b..af8e3c3507 100644 --- a/ports/nrf/boards/aramcon2_badge/mpconfigboard.h +++ b/ports/nrf/boards/aramcon2_badge/mpconfigboard.h @@ -52,7 +52,7 @@ #define CIRCUITPY_BOOT_BUTTON (&pin_P0_29) -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing the left button at start up\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("The left button was pressed at start up.\n") #define CIRCUITPY_INTERNAL_NVM_SIZE (4096) diff --git a/supervisor/shared/safe_mode.c b/supervisor/shared/safe_mode.c index aefae1e48b..d23b78d624 100644 --- a/supervisor/shared/safe_mode.c +++ b/supervisor/shared/safe_mode.c @@ -146,18 +146,17 @@ void print_safe_mode_message(safe_mode_t reason) { switch (reason) { case USER_SAFE_MODE: - #ifdef BOARD_USER_SAFE_MODE_ACTION + #if defined(BOARD_USER_SAFE_MODE_ACTION) message = BOARD_USER_SAFE_MODE_ACTION; #elif defined(CIRCUITPY_BOOT_BUTTON) - message = translate("pressing boot button at start up.\n"); + message = translate("The BOOT button was pressed at start up.\n"); + #endif + #if defined(BOARD_USER_SAFE_MODE_ACTION) || defined(CIRCUITPY_BOOT_BUTTON) + // Output a user safe mode string if it's set. + serial_write_compressed(message); + message = translate("To exit, please reset the board without requesting safe mode."); + // The final piece is printed below. #endif - if (message != NULL) { - // Output a user safe mode string if it's set. - serial_write_compressed(translate("You requested starting safe mode by ")); - serial_write_compressed(message); - serial_write_compressed(translate("To exit, please reset the board without ")); - // The final piece is printed below. - } break; case MANUAL_SAFE_MODE: message = translate("You pressed the reset button during boot. Press again to exit safe mode.");