From a51620c3fd81584b9682d0fef9757c21bc08daa8 Mon Sep 17 00:00:00 2001 From: HoshinoSuzumi Date: Thu, 12 Dec 2024 18:55:13 +0800 Subject: [PATCH] final --- src/main.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/main.c b/src/main.c index 3ae8940..8d26cca 100644 --- a/src/main.c +++ b/src/main.c @@ -3,8 +3,6 @@ #include "ds18b20.h" -// #define YELLOW_BOARD - typedef unsigned int u16; typedef unsigned char u8; @@ -20,11 +18,7 @@ u8 tim0flag = 0; #define PERSON P1_0 #define GAS_STATE P1_1 -#ifdef YELLOW_BOARD -#define BEEP P1_5 -#else -#define BEEP P1_6 -#endif +#define BEEP P2_5 char g_mode = 0x01; char g_bodyMode = 0x00; @@ -268,7 +262,7 @@ int ProcessBodyCmd(void) { r_flag = 1; } - send_buff = (MCU_CMD_BODY << 12) + MCU_CMD_BODY_NO; + send_buff = (MCU_CMD_BODY << 12) + MCU_CMD_BODY_YES; } else { @@ -303,8 +297,8 @@ void main(void) ProcessCommand(); #ifdef CLASS_4 - ProcessTempCmd(); - LcdDisplay(); + ProcessTempCmd(); + LcdDisplay(); #endif if (tim0flag) @@ -326,8 +320,11 @@ void main(void) } if (bodyFlag) { - beep(2); + beep(1); + } + if (tempCmdCode == CTRL_CODE_TEMP_Enable) + { + LcdDisplay(); } - LcdDisplay(); } }