final
This commit is contained in:
parent
216ae7930c
commit
a51620c3fd
21
src/main.c
21
src/main.c
@ -3,8 +3,6 @@
|
|||||||
|
|
||||||
#include "ds18b20.h"
|
#include "ds18b20.h"
|
||||||
|
|
||||||
// #define YELLOW_BOARD
|
|
||||||
|
|
||||||
typedef unsigned int u16;
|
typedef unsigned int u16;
|
||||||
typedef unsigned char u8;
|
typedef unsigned char u8;
|
||||||
|
|
||||||
@ -20,11 +18,7 @@ u8 tim0flag = 0;
|
|||||||
#define PERSON P1_0
|
#define PERSON P1_0
|
||||||
#define GAS_STATE P1_1
|
#define GAS_STATE P1_1
|
||||||
|
|
||||||
#ifdef YELLOW_BOARD
|
#define BEEP P2_5
|
||||||
#define BEEP P1_5
|
|
||||||
#else
|
|
||||||
#define BEEP P1_6
|
|
||||||
#endif
|
|
||||||
|
|
||||||
char g_mode = 0x01;
|
char g_mode = 0x01;
|
||||||
char g_bodyMode = 0x00;
|
char g_bodyMode = 0x00;
|
||||||
@ -268,7 +262,7 @@ int ProcessBodyCmd(void)
|
|||||||
{
|
{
|
||||||
r_flag = 1;
|
r_flag = 1;
|
||||||
}
|
}
|
||||||
send_buff = (MCU_CMD_BODY << 12) + MCU_CMD_BODY_NO;
|
send_buff = (MCU_CMD_BODY << 12) + MCU_CMD_BODY_YES;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -303,8 +297,8 @@ void main(void)
|
|||||||
ProcessCommand();
|
ProcessCommand();
|
||||||
|
|
||||||
#ifdef CLASS_4
|
#ifdef CLASS_4
|
||||||
ProcessTempCmd();
|
ProcessTempCmd();
|
||||||
LcdDisplay();
|
LcdDisplay();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (tim0flag)
|
if (tim0flag)
|
||||||
@ -326,8 +320,11 @@ void main(void)
|
|||||||
}
|
}
|
||||||
if (bodyFlag)
|
if (bodyFlag)
|
||||||
{
|
{
|
||||||
beep(2);
|
beep(1);
|
||||||
|
}
|
||||||
|
if (tempCmdCode == CTRL_CODE_TEMP_Enable)
|
||||||
|
{
|
||||||
|
LcdDisplay();
|
||||||
}
|
}
|
||||||
LcdDisplay();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user