@@ -74,7 +74,6 @@ static uint32_t read_file_data_txt(uint32_t sector_offset, uint8_t *data, uint32
74
74
static uint8_t shutdown_led_dc = PWR_LED_ON_MAX_BRIGHTNESS ;
75
75
static uint8_t final_fade_led_dc = 0 ;
76
76
static uint8_t power_led_max_duty_cycle = PWR_LED_ON_MAX_BRIGHTNESS ;
77
- static uint8_t initial_fade_brightness = PWR_LED_INIT_FADE_BRIGHTNESS ;
78
77
// reset button state count
79
78
static uint16_t gpio_reset_count = 0 ;
80
79
// button state
@@ -250,16 +249,11 @@ void board_30ms_hook()
250
249
switch (main_shutdown_state ) {
251
250
case MAIN_LED_FULL_BRIGHTNESS :
252
251
// Jump power LED to initial fade brightness
253
- shutdown_led_dc = initial_fade_brightness ;
254
- break ;
255
- case MAIN_SHUTDOWN_CANCEL :
256
- main_shutdown_state = MAIN_SHUTDOWN_WAITING ;
257
- // Set the PWM value back to max duty cycle
258
- shutdown_led_dc = power_led_max_duty_cycle ;
252
+ shutdown_led_dc = PWR_LED_INIT_FADE_BRIGHTNESS ;
259
253
break ;
260
254
case MAIN_SHUTDOWN_PENDING :
261
255
// Fade the PWM until the board is about to be shut down
262
- shutdown_led_dc = initial_fade_brightness - gpio_reset_count * (initial_fade_brightness - PWR_LED_FADEOUT_MIN_BRIGHTNESS )/(RESET_MID_PRESS );
256
+ shutdown_led_dc = PWR_LED_INIT_FADE_BRIGHTNESS - gpio_reset_count * (PWR_LED_INIT_FADE_BRIGHTNESS - PWR_LED_FADEOUT_MIN_BRIGHTNESS )/(RESET_MID_PRESS );
263
257
break ;
264
258
case MAIN_SHUTDOWN_REACHED :
265
259
// Hold LED in min brightness
@@ -325,9 +319,6 @@ void board_30ms_hook()
325
319
// Set the PWM value back to max duty cycle
326
320
shutdown_led_dc = power_led_max_duty_cycle ;
327
321
break ;
328
- case MAIN_SHUTDOWN_WAITING_OFF :
329
- shutdown_led_dc = 0 ;
330
- break ;
331
322
case MAIN_LED_BLINKING :
332
323
// Blink the LED to indicate standby mode
333
324
if (shutdown_led_dc < 10 ) {
0 commit comments