From 4cc2cf0e8fc8584a8bd564c21f5448433a7f6a31 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 12 Feb 2018 18:09:37 -0800 Subject: Increase the status LED brightness a bit so that newer DotStars aren't super dim. This will make status NeoPixels a bit bright but one can use samd.set_rgb_status_brightness() to dim them. --- atmel-samd/rgb_led_colors.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/atmel-samd/rgb_led_colors.h b/atmel-samd/rgb_led_colors.h index 12f5cc3d9..cab702981 100644 --- a/atmel-samd/rgb_led_colors.h +++ b/atmel-samd/rgb_led_colors.h @@ -1,12 +1,12 @@ #define BLACK 0x000000 -#define GREEN 0x001000 -#define BLUE 0x000010 -#define CYAN 0x001010 -#define RED 0x100000 -#define ORANGE 0x100800 -#define YELLOW 0x101000 -#define PURPLE 0x100010 -#define WHITE 0x101010 +#define GREEN 0x003000 +#define BLUE 0x000030 +#define CYAN 0x003030 +#define RED 0x300000 +#define ORANGE 0x302000 +#define YELLOW 0x303000 +#define PURPLE 0x300030 +#define WHITE 0x303030 #define BOOT_RUNNING BLUE #define MAIN_RUNNING GREEN -- cgit v1.2.3 From a5220010f2fd4245424ec75a093f652f63ae09ec Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 12 Feb 2018 18:34:59 -0800 Subject: Dim the neopixel status LED through the brightness control. --- atmel-samd/rgb_led_status.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/atmel-samd/rgb_led_status.c b/atmel-samd/rgb_led_status.c index 83d3f9916..5ce74fb4f 100644 --- a/atmel-samd/rgb_led_status.c +++ b/atmel-samd/rgb_led_status.c @@ -12,14 +12,15 @@ #include "rgb_led_status.h" #include "samd21_pins.h" -uint8_t rgb_status_brightness = 255; #ifdef MICROPY_HW_NEOPIXEL +uint8_t rgb_status_brightness = 63; static uint8_t status_neopixel_color[3]; static digitalio_digitalinout_obj_t status_neopixel; #endif #if defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK) +uint8_t rgb_status_brightness = 255; static uint8_t status_apa102_color[12] = {0, 0, 0, 0, 0xff, 0, 0, 0}; #ifdef CIRCUITPY_BITBANG_APA102 static bitbangio_spi_obj_t status_apa102; -- cgit v1.2.3 From 06c944519dbdaa767c3c88ec419602ea41ad16d3 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 13 Feb 2018 09:39:19 -0800 Subject: Fix builds without status pixel. No need to track its brightness when its unavaialable. --- atmel-samd/rgb_led_status.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/atmel-samd/rgb_led_status.c b/atmel-samd/rgb_led_status.c index 5ce74fb4f..a15738512 100644 --- a/atmel-samd/rgb_led_status.c +++ b/atmel-samd/rgb_led_status.c @@ -175,5 +175,7 @@ uint32_t color_brightness(uint32_t color, uint8_t brightness) { } void set_rgb_status_brightness(uint8_t level){ - rgb_status_brightness = level; + #if defined(MICROPY_HW_NEOPIXEL) || (defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK)) + rgb_status_brightness = level; + #endif } -- cgit v1.2.3