Fix neopixel macro issue, set default neopixel color
This commit is contained in:
parent
78d049d0f1
commit
d47bd5529c
@ -29,4 +29,6 @@
|
||||
#define MICROPY_HW_BOARD_NAME "Saola 1 w/Wroom"
|
||||
#define MICROPY_HW_MCU_NAME "ESP32S2"
|
||||
|
||||
#define MICROPY_HW_NEOPIXEL (&pin_GPIO18)
|
||||
|
||||
#define AUTORESET_DELAY_MS 500
|
||||
|
@ -10,8 +10,6 @@ LONGINT_IMPL = MPZ
|
||||
# so increase it to 32.
|
||||
CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32
|
||||
|
||||
CIRCUITPY_NEOPIXEL_WRITE = 0
|
||||
|
||||
CIRCUITPY_ESP_FLASH_MODE=dio
|
||||
CIRCUITPY_ESP_FLASH_FREQ=40m
|
||||
CIRCUITPY_ESP_FLASH_SIZE=4MB
|
||||
|
@ -10,8 +10,6 @@ LONGINT_IMPL = MPZ
|
||||
# so increase it to 32.
|
||||
CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32
|
||||
|
||||
CIRCUITPY_NEOPIXEL_WRITE = 0
|
||||
|
||||
CIRCUITPY_ESP_FLASH_MODE=dio
|
||||
CIRCUITPY_ESP_FLASH_FREQ=40m
|
||||
CIRCUITPY_ESP_FLASH_SIZE=4MB
|
||||
|
@ -4,7 +4,6 @@ USB_PRODUCT = "FeatherS2"
|
||||
USB_MANUFACTURER = "UnexpectedMaker"
|
||||
USB_DEVICES = "CDC,MSC,HID"
|
||||
|
||||
|
||||
INTERNAL_FLASH_FILESYSTEM = 1
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
@ -12,8 +11,6 @@ LONGINT_IMPL = MPZ
|
||||
# so increase it to 32.
|
||||
CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32
|
||||
|
||||
CIRCUITPY_NEOPIXEL_WRITE = 0
|
||||
|
||||
CIRCUITPY_ESP_FLASH_MODE=qio
|
||||
CIRCUITPY_ESP_FLASH_FREQ=40m
|
||||
CIRCUITPY_ESP_FLASH_SIZE=16MB
|
||||
|
@ -12,8 +12,6 @@ USB_SERIAL_NUMBER_LENGTH = 12
|
||||
# Longints can be implemented as mpz, as longlong, or not
|
||||
LONGINT_IMPL = MPZ
|
||||
|
||||
CIRCUITPY_NEOPIXEL_WRITE = 1
|
||||
|
||||
# These modules are implemented in ports/<port>/common-hal:
|
||||
CIRCUITPY_ANALOGIO = 0
|
||||
CIRCUITPY_NVM = 0
|
||||
|
@ -387,22 +387,22 @@ void prep_rgb_status_animation(const pyexec_result_t* result,
|
||||
if (!status->ok) {
|
||||
status->total_exception_cycle = EXCEPTION_TYPE_LENGTH_MS * 3 + LINE_NUMBER_TOGGLE_LENGTH * status->digit_sum + LINE_NUMBER_TOGGLE_LENGTH * num_places;
|
||||
}
|
||||
if (result->exception_type) {
|
||||
if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_IndentationError)) {
|
||||
status->exception_color = INDENTATION_ERROR;
|
||||
} else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_SyntaxError)) {
|
||||
status->exception_color = SYNTAX_ERROR;
|
||||
} else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_NameError)) {
|
||||
status->exception_color = NAME_ERROR;
|
||||
} else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_OSError)) {
|
||||
status->exception_color = OS_ERROR;
|
||||
} else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_ValueError)) {
|
||||
status->exception_color = VALUE_ERROR;
|
||||
} else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_MpyError)) {
|
||||
status->exception_color = MPY_ERROR;
|
||||
} else {
|
||||
status->exception_color = OTHER_ERROR;
|
||||
}
|
||||
if (!result->exception_type) {
|
||||
status->exception_color = OTHER_ERROR;
|
||||
} else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_IndentationError)) {
|
||||
status->exception_color = INDENTATION_ERROR;
|
||||
} else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_SyntaxError)) {
|
||||
status->exception_color = SYNTAX_ERROR;
|
||||
} else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_NameError)) {
|
||||
status->exception_color = NAME_ERROR;
|
||||
} else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_OSError)) {
|
||||
status->exception_color = OS_ERROR;
|
||||
} else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_ValueError)) {
|
||||
status->exception_color = VALUE_ERROR;
|
||||
} else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_MpyError)) {
|
||||
status->exception_color = MPY_ERROR;
|
||||
} else {
|
||||
status->exception_color = OTHER_ERROR;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user