8000 added enable_dim_neopixel(), disable_dim_neopixel(), set_dim_level() by asherlie · Pull Request #246 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content
8000

added enable_dim_neopixel(), disable_dim_neopixel(), set_dim_level() #246

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

Merged
merged 6 commits into from
Sep 12, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed ifdefs
  • Loading branch information
asherlie committed Sep 10, 2017
commit 375403b77009342eb3916fd524ec751ed4140644
9 changes: 5 additions & 4 deletions atmel-samd/rgb_led_status.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
#include "rgb_led_status.h"
#include "samd21_pins.h"

#ifdef MICROPY_HW_NEOPIXEL
//imo defalut should be full brightness. ask scott about this before commit
int rgb_status_brightness = 255;
#ifdef MICROPY_HW_NEOPIXEL
static uint8_t status_neopixel_color[3];
static digitalio_digitalinout_obj_t status_neopixel;
#endif
Expand Down Expand Up @@ -93,7 +92,6 @@ void reset_status_led() {

void new_status_color(uint32_t rgb) {
#if defined(MICROPY_HW_NEOPIXEL) || (defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK))
/*uint32_t rgb_adjusted = rgb;*/
if (current_status_color == rgb) {
return;
}
Expand Down Expand Up @@ -127,7 +125,10 @@ void new_status_color(uint32_t rgb) {
}

void temp_status_color(uint32_t rgb) {
uint32_t rgb_adjusted = color_brightness(rgb, rgb_status_brightness);
#if defined(MICROPY_HW_NEOPIXEL) || (defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK))
uint32_t rgb_adjusted = rgb;
rgb_adjusted = color_brightness(rgb, rgb_status_brightness);
#endif
#ifdef MICROPY_HW_NEOPIXEL
if (neopixel_in_use) {
return;
Expand Down
0