movement: only run custom commands at first launch
This commit is contained in:
parent
c78b8d4570
commit
e36af0e5a3
@ -30,6 +30,7 @@
|
|||||||
#define MOVEMENT_CUSTOM_BOOT_COMMANDS() { \
|
#define MOVEMENT_CUSTOM_BOOT_COMMANDS() { \
|
||||||
movement_state.settings.bit.led_green_color = 0x0;\
|
movement_state.settings.bit.led_green_color = 0x0;\
|
||||||
movement_state.settings.bit.led_red_color = 0xF;\
|
movement_state.settings.bit.led_red_color = 0xF;\
|
||||||
|
watch_store_backup_data(movement_state.settings.reg, 0);\
|
||||||
}
|
}
|
||||||
|
|
||||||
const watch_face_t watch_faces[] = {
|
const watch_face_t watch_faces[] = {
|
||||||
|
@ -268,15 +268,15 @@ void app_wake_from_backup(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void app_setup(void) {
|
void app_setup(void) {
|
||||||
#ifdef MOVEMENT_CUSTOM_BOOT_COMMANDS
|
|
||||||
MOVEMENT_CUSTOM_BOOT_COMMANDS()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
watch_store_backup_data(movement_state.settings.reg, 0);
|
watch_store_backup_data(movement_state.settings.reg, 0);
|
||||||
|
|
||||||
static bool is_first_launch = true;
|
static bool is_first_launch = true;
|
||||||
|
|
||||||
if (is_first_launch) {
|
if (is_first_launch) {
|
||||||
|
#ifdef MOVEMENT_CUSTOM_BOOT_COMMANDS
|
||||||
|
MOVEMENT_CUSTOM_BOOT_COMMANDS()
|
||||||
|
#endif
|
||||||
|
|
||||||
for(uint8_t i = 0; i < MOVEMENT_NUM_FACES; i++) {
|
for(uint8_t i = 0; i < MOVEMENT_NUM_FACES; i++) {
|
||||||
watch_face_contexts[i] = NULL;
|
watch_face_contexts[i] = NULL;
|
||||||
scheduled_tasks[i].reg = 0;
|
scheduled_tasks[i].reg = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user