diff --git a/Src/main.c b/Src/main.c index 65a605b..4692332 100644 --- a/Src/main.c +++ b/Src/main.c @@ -114,7 +114,7 @@ void Paint_DrawCurrent(void); void Paint_Drawonoff(bool); void Paint_Selector(bool, uint8_t,uint8_t); bool System_fire(void); -bool System_SecondHeartbeat(void); +bool System_CustomHeartbeat(uint8_t); void ButtonLeft_Pressed(void); void ButtonPress_Pressed(void); void ButtonRight_Pressed(void); @@ -208,12 +208,6 @@ int main(void) Paint_DrawString_EN(0,0,"You can remove the monitor",&Font16,WHITE,BLACK); } Paint_Drawonoff(System_fire()); - - Paint_DrawArray(); - Paint_DrawCurrent(); - - Paint_Selector(System_SecondHeartbeat(),selector_pos, system_mode); - Paint_Drawonoff(System_fire()); // printf("sTime hour:", sTime.Hours); // printf(" : sTime min :", sTime.Minutes); // printf("\r\n"); @@ -602,13 +596,14 @@ bool System_fire(){ // TODO the comparison is still wrong( same start hour but d // return false; } -bool System_SecondHeartbeat(){ - if(sTime.Seconds%2 == 0){ - return true; - }else{ - return false; - } +bool System_CustomHeartbeat(uint8_t var){ + if(sTime.Seconds%var == 0){ + return true; + }else{ + return false; + } } + //keep it short, executed in ISR void ButtonLeft_Pressed(void){ if(system_mode==Choose){