diff options
Diffstat (limited to 'movement/template')
| -rw-r--r-- | movement/template/template.c | 24 | 
1 files changed, 15 insertions, 9 deletions
diff --git a/movement/template/template.c b/movement/template/template.c index 91611d08..e03db561 100644 --- a/movement/template/template.c +++ b/movement/template/template.c @@ -53,13 +53,10 @@ bool <#watch_face_name#>_face_loop(movement_event_t event, movement_settings_t *          case EVENT_TICK:              // If needed, update your display here.              break; -        case EVENT_MODE_BUTTON_UP: -            // You shouldn't need to change this case; Mode almost always moves to the next watch face. -            movement_move_to_next_face(); -            break;          case EVENT_LIGHT_BUTTON_UP: -            // If you have other uses for the Light button, you can opt not to illuminate the LED for this event. -            movement_illuminate_led(); +            // You can use the Light button for your own purposes. Note that by default, Movement will also +            // illuminate the LED in response to EVENT_LIGHT_BUTTON_DOWN; to suppress that behavior, add an +            // empty case for EVENT_LIGHT_BUTTON_DOWN.              break;          case EVENT_ALARM_BUTTON_UP:              // Just in case you have need for another button. @@ -76,11 +73,20 @@ bool <#watch_face_name#>_face_loop(movement_event_t event, movement_settings_t *              // watch_start_tick_animation(500);              break;          default: -            break; +            // Movement's default loop handler will step in for any cases you don't handle above: +            // * EVENT_LIGHT_BUTTON_DOWN lights the LED +            // * EVENT_MODE_BUTTON_UP moves to the next watch face in the list +            // * EVENT_MODE_LONG_PRESS returns to the first watch face (or skips to the secondary watch face, if configured) +            // You can override any of these behaviors by adding a case for these events to this switch statement. +            return movement_default_loop_handler(event, settings);      } -    // return true if the watch can enter standby mode. If you are PWM'ing an LED or buzzing the buzzer here, -    // you should return false since the PWM driver does not operate in standby mode. +    // return true if the watch can enter standby mode. Generally speaking, you should always return true. +    // Exceptions: +    //  * If you are displaying a color using the low-level watch_set_led_color function, you should return false. +    //  * If you are sounding the buzzer using the low-level watch_set_buzzer_on function, you should return false. +    // Note that if you are driving the LED or buzzer using Movement functions like movement_illuminate_led or +    // movement_play_alarm, you can still return true. This guidance only applies to the low-level watch_ functions.      return true;  }  | 
