main: changed system_secondheartbeat to system_customheartbeat
This commit is contained in:
parent
ebae8286fc
commit
6799fa2de2
1 changed files with 8 additions and 13 deletions
21
Src/main.c
21
Src/main.c
|
@ -114,7 +114,7 @@ void Paint_DrawCurrent(void);
|
||||||
void Paint_Drawonoff(bool);
|
void Paint_Drawonoff(bool);
|
||||||
void Paint_Selector(bool, uint8_t,uint8_t);
|
void Paint_Selector(bool, uint8_t,uint8_t);
|
||||||
bool System_fire(void);
|
bool System_fire(void);
|
||||||
bool System_SecondHeartbeat(void);
|
bool System_CustomHeartbeat(uint8_t);
|
||||||
void ButtonLeft_Pressed(void);
|
void ButtonLeft_Pressed(void);
|
||||||
void ButtonPress_Pressed(void);
|
void ButtonPress_Pressed(void);
|
||||||
void ButtonRight_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_DrawString_EN(0,0,"You can remove the monitor",&Font16,WHITE,BLACK);
|
||||||
}
|
}
|
||||||
Paint_Drawonoff(System_fire());
|
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 hour:", sTime.Hours);
|
||||||
// printf(" : sTime min :", sTime.Minutes);
|
// printf(" : sTime min :", sTime.Minutes);
|
||||||
// printf("\r\n");
|
// printf("\r\n");
|
||||||
|
@ -602,13 +596,14 @@ bool System_fire(){ // TODO the comparison is still wrong( same start hour but d
|
||||||
// return false;
|
// return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool System_SecondHeartbeat(){
|
bool System_CustomHeartbeat(uint8_t var){
|
||||||
if(sTime.Seconds%2 == 0){
|
if(sTime.Seconds%var == 0){
|
||||||
return true;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//keep it short, executed in ISR
|
//keep it short, executed in ISR
|
||||||
void ButtonLeft_Pressed(void){
|
void ButtonLeft_Pressed(void){
|
||||||
if(system_mode==Choose){
|
if(system_mode==Choose){
|
||||||
|
|
Loading…
Reference in a new issue