From 44ccee7903725e50e91e0af5f8511114912206f3 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Sat, 30 Sep 2023 00:56:36 +0700 Subject: [PATCH] Update user_code.cpp --- src/user_code.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/user_code.cpp b/src/user_code.cpp index 4c93cf9..5124642 100644 --- a/src/user_code.cpp +++ b/src/user_code.cpp @@ -1,21 +1,21 @@ #include -void timer1_callback(){ - for(int i=0;i<16;i++){ - pwm_set_state(i,1); +void timer1_callback() +{ + for (int i = 0; i < 16; i++) + { + pwm_set_state(i, 1); } } -ESPMega_Timer timer1(0,50,timer1_callback,15001); +ESPMega_Timer timer1(0, 50, timer1_callback, 15001); /* This Code will run right after ESPMega PRO's Peripheral Initialization Routine */ - void user_pre_init() { - } /* @@ -45,7 +45,8 @@ This code will run every 15 seconds */ void timer_tick_callback() { - if(standalone){ + if (standalone) + { timer1.loop(); } }