Commit 848e7bdc authored by limm's avatar limm

1,根据V2.0需求,增加需求功能;

parent d7b3a49f
......@@ -142,7 +142,7 @@
<Type>0</Type>
<LineNumber>293</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>380</Address>
<Address>212</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
......@@ -156,9 +156,9 @@
<Bp>
<Number>1</Number>
<Type>0</Type>
<LineNumber>109</LineNumber>
<LineNumber>107</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>24326</Address>
<Address>25830</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
......@@ -167,23 +167,23 @@
<BreakIfRCount>1</BreakIfRCount>
<Filename>D:\Users\11730\SimplicityStudio\v4_workspace\KKAll-In-OneThermostatPanelMG21V1\z3s_thermostatallinonemg21sdk665v2\Code\娴烽】-澶氬悎涓€鍦版殩闈㈡澘\APP\User\src\mfg_factort.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\AllToOneThermostatPannel\User/src/mfg_factort.c\109</Expression>
<Expression>\\AllToOneThermostatPannel\User/src/mfg_factort.c\107</Expression>
</Bp>
<Bp>
<Number>2</Number>
<Type>0</Type>
<LineNumber>105</LineNumber>
<LineNumber>700</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>24322</Address>
<Address>2320</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>D:\Users\11730\SimplicityStudio\v4_workspace\KKAll-In-OneThermostatPanelMG21V1\z3s_thermostatallinonemg21sdk665v2\Code\娴烽】-澶氬悎涓€鍦版殩闈㈡澘\APP\User\src\mfg_factort.c</Filename>
<Filename>D:\Users\11730\SimplicityStudio\v4_workspace\KKAll-In-OneThermostatPanelMG21V1\z3s_thermostatallinonemg21sdk665v2\Code\娴烽】-澶氬悎涓€鍦版殩闈㈡澘\APP\User\src\BL55072A.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\AllToOneThermostatPannel\User/src/mfg_factort.c\105</Expression>
<Expression>\\AllToOneThermostatPannel\User/src/BL55072A.c\700</Expression>
</Bp>
</Breakpoint>
<WatchWindow1>
......
......@@ -225,7 +225,7 @@
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>8</StupSel>
<useUlib>0</useUlib>
<useUlib>1</useUlib>
<EndSel>0</EndSel>
<uLtcg>0</uLtcg>
<nSecure>0</nSecure>
......@@ -352,7 +352,7 @@
<Optim>3</Optim>
<oTime>0</oTime>
<SplitLS>0</SplitLS>
<OneElfS>0</OneElfS>
<OneElfS>1</OneElfS>
<Strict>0</Strict>
<EnumInt>0</EnumInt>
<PlainCh>0</PlainCh>
......
[Version]
Nu_LinkVersion=V5.14
[Process]
ProcessID=0x00001054
ProcessCreationTime_L=0xc8cc9aaa
ProcessCreationTime_H=0x01d6dcdf
ProcessID=0x00005b14
ProcessCreationTime_L=0xb5a87b5a
ProcessCreationTime_H=0x01d71acb
NuLinkID=0x18101887
NuLinkID0=0x18101887
NuLinkIDs_Count=0x00000001
......
......@@ -53,7 +53,6 @@ typedef struct
}Filter_Wash_Calc;
typedef struct KEY_OPERATE
{
u8 operate_delay_off_status; //延时关机操作期间标志位判断
u8 operate_delay_off_display_flag;
volatile u32 operate_delay_off_ms;
volatile u32 operate_delay_off_s;
......@@ -72,16 +71,19 @@ volatile u32 operate_delay_off_h;
}KEY_OPERATE;
typedef void (*KeyProcessCallback)(u8 key_id,u8 KeyPressEvent);
#define IsKeyID12356(keyid) ( (keyid == 1) ||(keyid == 2) || (keyid == 3) ||(keyid == 5) || (keyid == 6) )
#define IsKeyID1356(keyid) ( (keyid == 1) ||(keyid == 3) || (keyid == 5) ||(keyid == 6) )
#define IsKeyID123(keyid) ( (keyid == 1) ||(keyid == 2) || (keyid == 3) )
#define Low 0
#define High 1
#define NULL 0
#define AntiShakeTime 6 //30ms = 6*5ms 按键防止抖动时间
#define PressLongTime 800 // 4s = 800*5ms 按键长按时间
#define Press10sLongTime 2000 // 10s = 2000*5ms 退出老化
#define AntiShakeTime 6 //30ms = 6*5ms 按键防止抖动时间
#define Press0_5sLongTime 100 // 0.5s = 100*5ms 按键长按时间
#define PressLongTime 800 // 4s = 800*5ms 按键长按时间
#define Press10sLongTime 2000 // 10s = 2000*5ms 退出老化
#define SyskeyScanTimer 5 //5ms
#define KeyEventBufferNum 30
......@@ -178,10 +180,13 @@ A = 0 B = 1 C = 1
#define Key_Rotary 0x02
#define NoButtonEvent 0x00
#define Button0_5sLongEvent 0x60
#define Button0_5sLongUpEvent 0x70
#define ButtonShortEvent 0x80
#define ButtonLongEvent 0x90
#define ButtonLongUpEvent 0xa0
#define Button10sLongEvent 0xb0
#define Button10sLongUpEvent 0xc0
#define AIR_CMD_ONOFF 1
#define AIR_CMD_SYSTEM_MODE 2
......@@ -216,6 +221,12 @@ typedef struct key_init
/* 有效电平 */
u8 Valid_Level;
/* 支持的按键事件总数 */
u8 Key_Support_Event_Num[3];
/* 支持的按键事件列表 */
u8 Key_Support_Event_List[3][5];
} KeyConfigInit_t;
typedef struct
{
......
......@@ -262,7 +262,6 @@ void Send_Device_Data(u8 channel_id,u16 opcode ,u8 *arg,u8 len);
static void network_state_machine(TP_uc8 recv_network_state);
void state_change_report(TP_u16 opcode, TP_u8 channel);
void Setup_Task_Start(void);
u8 Get_Channel_Id(u8 device_type);
void delay_operate_calibrate_temper_Task_Start(void);
void operate_calibrate_temper_delay_2s_off_Task_Start(void);
void operate_calibrate_temper_delay_2s_off_Task_Stop(void);
......@@ -275,10 +274,11 @@ u8 IsLcdEnterScreenSave(void);
void ChildLockLedFlash(void);
void zero_check_init(void);
void delay_operate_calibrate_temper_Task_Stop(void);
void delay_operate_delay_off_Task_Start(void);
void delay_operate_delay_off_Task_Stop(void);
void Reset_DelayOFF_timer(u8 device_type);
void task_exit_aging_test_start(void);
void Delay_Report_Status(void);
void Delay_Report_Time_Decrease_Count(u8 time);
void Start_Delay_Report_Event(u8 channel);
#define Network_Control(join_or_leave) Send_Device_Data(0,_OPCODE_SET_NET_STATE,&join_or_leave,1)
#define proximity_triagger_report_zigbee() do{ uint8_t res = 1; \
......
......@@ -45,7 +45,7 @@ typedef struct
u16 set_temperature; //设置温度
s8 correct_temperature; //温度校准值
u8 system_type; //系统类型
u8 operation_mode; //运行模式
u8 operation_mode; //风机盘管模式,默认0,冷热单管
u8 wind_speed; //风速 0 关 1 低 2 中 3 高,4 开,5,自动 ,6 智能 7,中低,8 中高 ,9 超高 默认自动
u8 lock_flage; //儿童锁显示图标
u8 air_cond_type; //空调类型 1.风机盘管 2,线控器
......@@ -99,7 +99,6 @@ typedef struct Display_Data
u8 zigbee_Version; //zigbee版本
u8 binding_device; //0 未绑定 1,绑定空调,2,地暖,3,绑定新风
u8 recv_lcd_off; //接受到控制息屏的指令后
u8 is_dispaly_cur_temp;
u8 zigbee_mac[8];
OLED_AIR_DSD Air_Device;
OLED_FLOOR_HEATING_DSD FLOOR_Device;
......@@ -127,7 +126,7 @@ typedef struct{
u8 enter_config_mode;
u8 config_page;
u8 config_page1_func_value;
u8 config_page2_value;
u16 config_page2_value;
u8 support_function_len;
u8 support_function_list[6]; //1,风机盘管管制设置 2,温度校准 3,是否显示当前房间温度设置,4, 超时进入屏保时间设置 10 恢复出厂设置
volatile u32 config_time_ms;
......@@ -136,8 +135,8 @@ typedef struct{
}Local_Config_Operation;
typedef enum {
LOCAL_FUNC_FAN_PANEL_SETTING = 1,
LOCAL_FUNC_CALIBRATE_TEMPER = 2,
LOCAL_FUNC_IS_DISPLAY_CURRENT_TEMPER = 3,
LOCAL_FUNC_IS_DISPLAY_CURRENT_TEMPER = 2,
LOCAL_FUNC_CALIBRATE_TEMPER = 3,
LOCAL_FUNC_SCREEN_SAVING_TIME = 4,
LOCAL_FUNC_NOT_DISTURB = 5,
LOCAL_FUNC_FILTER_TIME = 10,
......@@ -153,7 +152,7 @@ extern Key_Operation_Status gKey_Press_Info;
void Display_poweroff_time(u8 display_time);
extern void display_error(u8 error_value);
void Operate_Led_Button(u8 device_type,u8 on_off);
void Operate_Led_Button(u8 device_type,u8 Type);
void Set_CMD_Handler(u8 device_type,u16 opcode,u8 *arg,u8 arg_len);
void display_current_page(void);
u16 GetNetScanTime( void );
......@@ -162,7 +161,7 @@ u8 kNetIndicatorIsBlinking(void);
void kNetIndicatorOptTrigger(uint8_t id, uint32_t duration_on_ms, uint32_t duration_off_ms, uint32_t times, u8 start, u8 end );
void kLedModuleActionDetectCallback(void );
void display_set_temp(u8 display_mode,s16 temp_value,u8 ararm_f);
void Display_Set_Temper(s16 temp_value);
void display_system_mode(u8 heat,u8 dry,u8 cold ,u8 air,u8 sleep,u8 manufture,u8 Auto,u8 Roll);
void display_wind_speed(u8 wind_speed,u8 support_type);
void display_wind_direct(u8 low,u8 mediu,u8 high);
......@@ -174,6 +173,7 @@ void Detect_Human_Dispaly(void);
u8 System_Mode_Trans(u8 device_type,u8 is_support_sleep);
void Fan_Button_Handler(void);
void delay_confirm_fan_speed(void); //提前打断延时,
u8 Get_LED_OnOff_Status(u8 id);
void Control_LED_ON_OFF(u8 onoff_bits);
u8 Key_Operate_Config_Operation(u8 keyid,u8 keyEvent);
u8 IsLocalConfigMode(void);
......@@ -182,14 +182,16 @@ void Display_Up_Contend(u8 device_type);
void Setup_Mode_Handle (void);
void Display_Current_Temper(s16 temper);
void Reset_Flash_Time_10s(void);
void Display_Middle_Contend(u8 device_type);
void Fan_speed_and_direct_control(u8 windspeed_onoff,u8 winddirect_onoff);
void Auto_Led_Display(u8 screen_page);
#define Operation_LED(X) Operate_Led_Button(Oled_Display_Info.screen_page,X)
#define Reload_Save_Time() do{ sBacklight.blacklight_flag = 1;\
sBacklight.time_blacklight_ms = 0;\
sBacklight.time_blacklight_s = 0;\
LCD_CONTROL(1); \
Operation_LED(1);}while(0);
Auto_Led_Display(Oled_Display_Info.screen_page);}while(0);
......
......@@ -683,7 +683,7 @@ void DelayPowerOffControlSetting(s16 time)
BL55072A_DisplayGeneral( BL55072A_SEG5, 0x07, 0 );
BL55072A_DisplayGeneral( BL55072A_SEG6, 0x0F, 0 );
}
else if(time >0){
else if(time >=0){
temp = time/100;
LcdControlSetting(BL55072A_SEG1,temp);
......
......@@ -457,7 +457,6 @@ static TP_u8 Usart_recive_write_buff(TP_uc8 *data,TP_uc16 len)
static TP_ErrorStatus transparent_protocol_analysis(TP_uc8 *data, TP_uc8 len)
{
PROTOCOL_DEAL Usart_protocol_deal = {0};
if((data == NULL) || (len < 5) || (len > USART_RECIVE_LEN_DEF))
{
//printf("non valied msg,discard it all\r\n");
......
......@@ -293,6 +293,7 @@ static void FMC_init(void)
SYS_LockReg();
}
extern void ReDefine_AIR_Condition_Syetem_Mode(void);
void hardware_init(void)
{
SYS_Init();
......@@ -308,6 +309,7 @@ void hardware_init(void)
Setup_Task_Start();
//fmc test
recover_current_state();
#if DEVICE_TYPE_FAN
if(Oled_Display_Info.aging_test_flag == 2)
{
......@@ -321,6 +323,13 @@ void hardware_init(void)
#endif
GPIO_init();
temp_init();
//空调设备判断当前温度,初始化当前模式
if(Oled_Display_Info.device_type == AIR_CONDITION)
{
ReDefine_AIR_Condition_Syetem_Mode();
}
#if (DEVICE_TYPE_FLOOR_HEATING || DEVICE_TYPE_FAN)
Tap_Init();
#endif
......
......@@ -195,7 +195,7 @@ u8 Usart_recive_deal(TP_uc8 *data, TP_uc8 len )
{
BL55072A_Clear(); //息屏
LCD_CONTROL(0);
Operate_Led_Button(Oled_Display_Info.device_type,0);
Operate_Led_Button(Oled_Display_Info.device_type,4);
arg_data[0] = 0;
arg_data[1] = 0;
Oled_Display_Info.recv_lcd_off = 0x85;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment