Skip to content
Snippets Groups Projects

Personal state API

Merged trilader requested to merge trilader/firmware:feature/personal_state into master
All threads resolved!
7 files
+ 261
13
Compare changes
  • Side-by-side
  • Inline
Files
7
  • a91721fd
    This includes a new RTOS task to animate the personal state LED
    independently of pycardium. While the animation is running pycardium
    can't control the personal state LED.
@@ -179,10 +179,24 @@ int hardware_reset(void)
api_interrupt_init();
api_dispatcher_init();
/* Personal State */
const int current_personal_state = epic_personal_state_get();
const int current_personal_state_is_persistent =
(current_personal_state & STATE_FLAG_PERSISTENT) ==
STATE_FLAG_PERSISTENT;
if (current_personal_state_is_persistent == 0) {
epic_personal_state_set(STATE_NONE, 0);
}
/*
* LEDs
*/
leds_init();
if (current_personal_state_is_persistent) {
epic_leds_clear_all(0, 0, 0);
} else {
leds_init();
}
epic_leds_set_rocket(0, 0);
epic_leds_set_rocket(1, 0);
epic_leds_set_rocket(2, 0);
Loading