|
|
|
@ -48,7 +48,7 @@ struct UserInfo userInfo;
@@ -48,7 +48,7 @@ struct UserInfo userInfo;
|
|
|
|
|
struct timing nowTime; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
u8 Settime[6]={0x22,0x03,0x27,0x22,0x34,0x00}; // 设置时间 22年 03月 27日 22:34:00
|
|
|
|
|
u8 Settime[6]={0x22,0x04,0x27,0x19,0x17,0x20}; // 设置时间 22年 03月 27日 22:34:00
|
|
|
|
|
|
|
|
|
|
int setModel = 0; |
|
|
|
|
int change = 0; |
|
|
|
@ -101,7 +101,7 @@ void Sys_Init(void)
@@ -101,7 +101,7 @@ void Sys_Init(void)
|
|
|
|
|
OLED_Init(); |
|
|
|
|
Key4x4_GPIO_Config(); |
|
|
|
|
DS1302_init(Settime); |
|
|
|
|
DS1302_SetTime(Settime); |
|
|
|
|
//DS1302_SetTime(Settime);
|
|
|
|
|
OLED_Clear(); |
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -114,7 +114,7 @@ void DisplayTask(void)
@@ -114,7 +114,7 @@ void DisplayTask(void)
|
|
|
|
|
{ |
|
|
|
|
char str[30]; |
|
|
|
|
if(setModel == 0){ |
|
|
|
|
sprintf(str,"%2d-%2d %2d:%2d:%2d", nowTime.mon, nowTime.day, nowTime.hour, nowTime.min, nowTime.sec); |
|
|
|
|
sprintf(str,"%2d-%2d %2d:%2d:%2d ", nowTime.mon, nowTime.day, nowTime.hour, nowTime.min, nowTime.sec); |
|
|
|
|
OLED_ShowString(0, 0, str, 16); |
|
|
|
|
sprintf(str,"%0.2fC %dC %0.2fcm %d", userInfo.water_temp, userInfo.now_tager_temp,userInfo.water_level, userInfo.setLevel); |
|
|
|
|
OLED_ShowString(0, 2, str, 16); |
|
|
|
@ -364,10 +364,10 @@ void DeleteValue()
@@ -364,10 +364,10 @@ void DeleteValue()
|
|
|
|
|
if(setModel != 1) return; |
|
|
|
|
switch(change){ |
|
|
|
|
case 0: |
|
|
|
|
userInfo.setLevel /= 10; |
|
|
|
|
userInfo.water_target_temp /= 10; |
|
|
|
|
break; |
|
|
|
|
case 1: |
|
|
|
|
userInfo.water_target_temp /= 10; |
|
|
|
|
userInfo.setLevel /= 10; |
|
|
|
|
break; |
|
|
|
|
case 2: |
|
|
|
|
userInfo.SetTimer.year /= 10; |
|
|
|
|