File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -39,14 +39,14 @@ void loop() {
3939Make a function to call (without arguments) when a * Timer* expires.
4040``` cpp
4141Timers::HandlerResult function_to_call () {
42- return { Timers::TimerStatus::repeat } ; // to repeat the action - 'completed' to stop
42+ return Timers::TimerStatus::repeat; // to repeat the action - 'completed' to stop
4343}
4444```
4545
4646Make a function to call (with an argument) when a * Timer* expires.
4747``` cpp
4848Timers::HandlerResult function_to_call_with_arg (int value) {
49- return { Timers::TimerStatus::completed } ; // to stop the timer - 'repeat' to repeat the action
49+ return Timers::TimerStatus::completed; // to stop the timer - 'repeat' to repeat the action
5050}
5151```
5252
@@ -58,7 +58,7 @@ Timers::HandlerResult function_to_call_and_reschedule() {
5858 if (digitalRead(4)) {
5959 return { Timers::TimerStatus::reschedule, 5000 }; // to change the repeat interval to 5000 ms
6060 } else {
61- return { Timers::TimerStatus::repeat } ; // to repeat the action - 'completed' to stop
61+ return Timers::TimerStatus::repeat; // to repeat the action - 'completed' to stop
6262 }
6363}
6464```
@@ -155,7 +155,7 @@ auto timerset = Timers::create_default(); // create a timerset with default sett
155155
156156Timers::HandlerResult toggle_led() {
157157 digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN)); // toggle the LED
158- return { Timers::TimerStatus::repeat } ; // keep timer active? true
158+ return Timers::TimerStatus::repeat; // keep timer active? true
159159}
160160
161161void setup() {
You can’t perform that action at this time.
0 commit comments