Skip to content

Commit

Permalink
rg_system: Disable all LED indicators except low battery by default (#…
Browse files Browse the repository at this point in the history
…155)

I've also added back a check for GPIO_NUM_NC.
  • Loading branch information
ducalex committed Sep 17, 2024
1 parent 2def78b commit d1ac0bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions components/retro-go/rg_system.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ static void update_indicators(void)
ledColor = C_BLUE;

#if defined(ESP_PLATFORM) && defined(RG_GPIO_LED)
gpio_set_level(RG_GPIO_LED, ledColor != 0);
// GPIO LED doesn't support colors, so any color = on
if (RG_GPIO_LED != GPIO_NUM_NC)
gpio_set_level(RG_GPIO_LED, ledColor != 0);
#endif
}

Expand Down Expand Up @@ -353,7 +355,7 @@ rg_app_t *rg_system_init(int sampleRate, const rg_handlers_t *handlers, const rg
.configNs = RG_PROJECT_APP,
.bootArgs = NULL,
.bootFlags = 0,
.indicatorsMask = 0xFFFFFFFF,
.indicatorsMask = (1 << RG_INDICATOR_LOW_BATTERY),
.speed = 1.f,
.sampleRate = sampleRate,
.tickRate = 60,
Expand Down
2 changes: 1 addition & 1 deletion components/retro-go/rg_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ typedef enum

typedef enum
{
RG_INDICATOR_PANIC = 0,
RG_INDICATOR_POWER = 0,
RG_INDICATOR_LOW_BATTERY,
RG_INDICATOR_CHARGING,
RG_INDICATOR_DISK_ACTIVITY,
Expand Down

0 comments on commit d1ac0bb

Please sign in to comment.