Merge pull request #757 from tannewt/status_pixel_fix
Fix the status neopixel flashing.
This commit is contained in:
commit
12f1aa25fd
2 changed files with 2 additions and 3 deletions
1
main.c
1
main.c
|
|
@ -75,7 +75,6 @@ static char heap[PORT_HEAP_SIZE];
|
||||||
|
|
||||||
void reset_mp(void) {
|
void reset_mp(void) {
|
||||||
reset_status_led();
|
reset_status_led();
|
||||||
new_status_color(0x8f008f);
|
|
||||||
autoreload_stop();
|
autoreload_stop();
|
||||||
|
|
||||||
// Sync the file systems in case any used RAM from the GC to cache. As soon
|
// Sync the file systems in case any used RAM from the GC to cache. As soon
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ void rgb_led_status_init() {
|
||||||
#if defined(MICROPY_HW_NEOPIXEL) || (defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK))
|
#if defined(MICROPY_HW_NEOPIXEL) || (defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK))
|
||||||
// Force a write of the current status color.
|
// Force a write of the current status color.
|
||||||
uint32_t rgb = current_status_color;
|
uint32_t rgb = current_status_color;
|
||||||
current_status_color = 0;
|
current_status_color = 0x1000000; // Not a valid color
|
||||||
new_status_color(rgb);
|
new_status_color(rgb);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
@ -118,7 +118,7 @@ void new_status_color(uint32_t rgb) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
uint32_t rgb_adjusted = color_brightness(rgb, rgb_status_brightness);
|
uint32_t rgb_adjusted = color_brightness(rgb, rgb_status_brightness);
|
||||||
current_status_color = rgb_adjusted;
|
current_status_color = rgb;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MICROPY_HW_NEOPIXEL
|
#ifdef MICROPY_HW_NEOPIXEL
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue