]> git.earman.xyz Git - sensor-watch.git/commitdiff
clarify return value notes in template
authorjoeycastillo <joeycastillo@utexas.edu>
Tue, 17 Jan 2023 17:02:56 +0000 (11:02 -0600)
committerjoeycastillo <joeycastillo@utexas.edu>
Tue, 17 Jan 2023 17:03:13 +0000 (11:03 -0600)
movement/template/template.c

index f0669d376f03cc0c4f49fa21383de28eeeae4a56..8259912b336eb454e9d9b82bf8cac36a98ae43a2 100644 (file)
@@ -81,8 +81,12 @@ bool <#watch_face_name#>_face_loop(movement_event_t event, movement_settings_t *
             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;
 }