main: changed system_secondheartbeat to system_customheartbeat

This commit is contained in:
Charlez Kwan 2020-01-26 12:30:32 +01:00
parent ebae8286fc
commit 6799fa2de2

View file

@ -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){
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){