Commit 1de4b7b1 authored by limm's avatar limm

1,调整单板产测,接近感应触发后全亮,整机产测,接近感应触发正常显示

Signed-off-by: limm's avatarli.mengmeng@ikonke.com <li.mengmeng@ikonke.com>
parent ee6712da
...@@ -519,7 +519,7 @@ ...@@ -519,7 +519,7 @@
<Group> <Group>
<GroupName>User</GroupName> <GroupName>User</GroupName>
<tvExp>0</tvExp> <tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg> <tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel> <cbSel>0</cbSel>
<RteFlg>0</RteFlg> <RteFlg>0</RteFlg>
......
...@@ -695,16 +695,19 @@ static void sensor_measure_loop(void) ...@@ -695,16 +695,19 @@ static void sensor_measure_loop(void)
CurrentValue = VCNL3040_Get_Current_Data(); CurrentValue = VCNL3040_Get_Current_Data();
if( (CurrentValue > LastValue)&&( (CurrentValue - LastValue) >= PERSON_TRAGGER_MIN_RANGE )) if( (CurrentValue > LastValue)&&( (CurrentValue - LastValue) >= PERSON_TRAGGER_MIN_RANGE ))
{ {
u8 board_test_flag = Oled_Display_Info.recv_lcd_off &0x80;
u8 report_times = Oled_Display_Info.recv_lcd_off&0x0f;
Reload_Save_Time(); Reload_Save_Time();
if((First_Exit_Factory_Mode == 0)&&(Oled_Display_Info.recv_lcd_off == 0)) if((First_Exit_Factory_Mode == 0)&&(board_test_flag == 0))
Detect_Human_Dispaly(); Detect_Human_Dispaly();
if(Oled_Display_Info.recv_lcd_off >0) if(report_times >0)
{ {
//Oled_Display_Info.recv_lcd_off--;
BL55072A_DisplayALL();
delay_300ms_report_start(); //延时上报接近感应任务开启 delay_300ms_report_start(); //延时上报接近感应任务开启
if(board_test_flag)
BL55072A_DisplayALL();
else
Oled_Display_Info.recv_lcd_off--;
} }
} }
LastValue = CurrentValue; LastValue = CurrentValue;
} }
...@@ -1122,7 +1125,7 @@ struct task_components_t task_comps[] = ...@@ -1122,7 +1125,7 @@ struct task_components_t task_comps[] =
{8, SWITCH_OFF, RUN_FLAG_0, SET_FLAG_0, Sec_2,Sec_2, operate_calibrate_temper_delay_2s_off }, //确认校准温度后延时2s关机 {8, SWITCH_OFF, RUN_FLAG_0, SET_FLAG_0, Sec_2,Sec_2, operate_calibrate_temper_delay_2s_off }, //确认校准温度后延时2s关机
#if DEVICE_TYPE_AIR_CONDITION #if DEVICE_TYPE_AIR_CONDITION
{9, SWITCH_OFF, RUN_FLAG_0, SET_FLAG_0, Sec_1,Sec_1, task_retransmit }, //重传 {9, SWITCH_OFF, RUN_FLAG_0, SET_FLAG_0, Sec_1,Sec_1, task_retransmit }, //重传
{10,SWITCH_OFF, RUN_FLAG_0, SET_FLAG_0, Sec_15,Sec_15, task_poll_check } , //查询空调状态15s {10,SWITCH_ON, RUN_FLAG_0, SET_FLAG_0, Sec_15,Sec_15, task_poll_check } , //查询空调状态15s
#else #else
{9, SWITCH_OFF, RUN_FLAG_0, SET_FLAG_0, Sec_1,Sec_1, NULL }, //重传 {9, SWITCH_OFF, RUN_FLAG_0, SET_FLAG_0, Sec_1,Sec_1, NULL }, //重传
{10,SWITCH_OFF, RUN_FLAG_0, SET_FLAG_0, Sec_15,Sec_15, NULL } , //查询空调状态15s {10,SWITCH_OFF, RUN_FLAG_0, SET_FLAG_0, Sec_15,Sec_15, NULL } , //查询空调状态15s
...@@ -2165,46 +2168,6 @@ void not_transparent_data_analyze(PROTOCOL_DEAL recv_data) ...@@ -2165,46 +2168,6 @@ void not_transparent_data_analyze(PROTOCOL_DEAL recv_data)
} }
} }
} }
/////***********************************************************************
////* 函 数 名: task_CC2530_state_check
////* 功能说明: 查询2530网络状态任务,每隔2s
////* 形 参:无
////* 返 回 值: 无
////***********************************************************************/
//// void task_CC2530_state_check(void)
////{
//// if ( net_leave_flage == 0)
//// {
//// PROTOCOL_SEND send_data;
//// TP_u16 send_data_SEQ;
//// serial_num[3]++;
//// send_data.ARG = 0;
//// send_data.ARG_len = 1;
//// send_data.Channel_ID = 0x00;
//// send_data.ControlField = 0xA0; //非透传控制域
//// send_data.Opcode = _OPCODE_INQUIRE_NET_STATE;
//// send_data_SEQ = serial_num[3];
//// if(serial_num[3] == 0xffff)
//// {
//// serial_num[3] = 0;
//// }
//// transparent_protocol_send(send_data, send_data_SEQ);
//// CC2530_state_check_times ++;
//// if(CC2530_state_check_times == 5)
//// {
//// CC2530_state_check_times = 0;
//// display_error(1);
//// }
//// }
////}
/*********************************************************************** /***********************************************************************
* 函 数 名: key_state_change_report * 函 数 名: key_state_change_report
* 功能说明: 触发状态上报 * 功能说明: 触发状态上报
......
...@@ -708,6 +708,10 @@ void PowerOff(void) ...@@ -708,6 +708,10 @@ void PowerOff(void)
LCDShowTemp_state_t.LCD_place = SET_MIDDLE_DIGITRON_DISPLAY_03; LCDShowTemp_state_t.LCD_place = SET_MIDDLE_DIGITRON_DISPLAY_03;
LCDShowTemp_state_t.LCD_code_data = 0x0F; LCDShowTemp_state_t.LCD_code_data = 0x0F;
LCDShowTemp_state_t.LCD_state = ON; LCDShowTemp_state_t.LCD_state = ON;
LcdShowCTR(LCDShowTemp_state_t);
LCDShowTemp_state_t.LCD_place = MIDDLE_POINT_DISPLAY;
LCDShowTemp_state_t.LCD_state = OFF;
LcdShowCTR(LCDShowTemp_state_t); LcdShowCTR(LCDShowTemp_state_t);
/******************************************** /********************************************
...@@ -1307,10 +1311,10 @@ void Set_CMD_Handler(u8 device_type,u16 opcode,u8 *arg,u8 arg_len) ...@@ -1307,10 +1311,10 @@ void Set_CMD_Handler(u8 device_type,u16 opcode,u8 *arg,u8 arg_len)
sKey_Operation[0].set_temper_temp = set_temper; sKey_Operation[0].set_temper_temp = set_temper;
arg[0] = 0; arg[0] = 0;
if( (sKey_Operation[0].set_temper_temp /10) == (Oled_Display_Info.Air_Device.set_temperature/10)) //26.5调整到26度时,不管空调的反馈,直接上报 if( (sKey_Operation[0].set_temper_temp /10) == (Oled_Display_Info.Air_Device.set_temperature/10)) //26.5调整到26度时,不管空调的反馈,直接上报
{
Oled_Display_Info.Air_Device.set_temperature = sKey_Operation[0].set_temper_temp;
state_change_report(OPCODE_GENERAL_REPORT_STATUS,1); //状态改变通知 state_change_report(OPCODE_GENERAL_REPORT_STATUS,1); //状态改变通知
} //else
//Control_AIR_CONDITION_By_RS485(AIR_CMD_SET_TEMPER,set_temper); //控制空调目标温度
Oled_Display_Info.Air_Device.set_temperature = sKey_Operation[0].set_temper_temp;
} }
else else
arg[0] = 0xff; arg[0] = 0xff;
...@@ -1663,8 +1667,10 @@ void Set_CMD_Handler(u8 device_type,u16 opcode,u8 *arg,u8 arg_len) ...@@ -1663,8 +1667,10 @@ void Set_CMD_Handler(u8 device_type,u16 opcode,u8 *arg,u8 arg_len)
} }
Displayt_System_Mode(system_mode); Displayt_System_Mode(system_mode);
#if DEVICE_TYPE_FAN
if(Oled_Display_Info.FAN_Device.system_type != system_mode) if(Oled_Display_Info.FAN_Device.system_type != system_mode)
Fan_PassbyONOFF_By_Mode_Trans(system_mode,1); Fan_PassbyONOFF_By_Mode_Trans(system_mode,1);
#endif
Oled_Display_Info.FAN_Device.system_type = system_mode; Oled_Display_Info.FAN_Device.system_type = system_mode;
arg[0] = 0; arg[0] = 0;
state_change_report(OPCODE_GENERAL_REPORT_STATUS,3); state_change_report(OPCODE_GENERAL_REPORT_STATUS,3);
...@@ -1689,8 +1695,10 @@ void Set_CMD_Handler(u8 device_type,u16 opcode,u8 *arg,u8 arg_len) ...@@ -1689,8 +1695,10 @@ void Set_CMD_Handler(u8 device_type,u16 opcode,u8 *arg,u8 arg_len)
break; break;
} }
Oled_Display_Info.FAN_Device.wind_speed = wind_speed; Oled_Display_Info.FAN_Device.wind_speed = wind_speed;
#if DEVICE_TYPE_FAN
Fan_Speed_Control(wind_speed); Fan_Speed_Control(wind_speed);
#endif
if(Get_Display_Status()) if(Get_Display_Status())
display_set_temp(1,Oled_Display_Info.FAN_Device.wind_speed,1); display_set_temp(1,Oled_Display_Info.FAN_Device.wind_speed,1);
state_change_report(OPCODE_GENERAL_REPORT_STATUS,3); state_change_report(OPCODE_GENERAL_REPORT_STATUS,3);
...@@ -1890,11 +1898,13 @@ u8 Key_Operate_Config_Operation(u8 keyid,u8 keyEvent) ...@@ -1890,11 +1898,13 @@ u8 Key_Operate_Config_Operation(u8 keyid,u8 keyEvent)
local_config_operate.config_page = 2; local_config_operate.config_page = 2;
switch(local_config_operate.config_page1_func_value) switch(local_config_operate.config_page1_func_value)
{ {
#if (DEVICE_TYPE_AIR_CONDITION &&(DEV_TYPE == 1 ))
case LOCAL_FUNC_FAN_PANEL_SETTING: case LOCAL_FUNC_FAN_PANEL_SETTING:
{ {
local_config_operate.config_page2_value = 0; local_config_operate.config_page2_value = 0;
} }
break; break;
#endif
case LOCAL_FUNC_CALIBRATE_TEMPER: case LOCAL_FUNC_CALIBRATE_TEMPER:
break; break;
case LOCAL_FUNC_IS_DISPLAY_CURRENT_TEMPER: case LOCAL_FUNC_IS_DISPLAY_CURRENT_TEMPER:
...@@ -1951,12 +1961,14 @@ u8 Key_Operate_Config_Operation(u8 keyid,u8 keyEvent) ...@@ -1951,12 +1961,14 @@ u8 Key_Operate_Config_Operation(u8 keyid,u8 keyEvent)
{ {
switch(local_config_operate.config_page1_func_value) switch(local_config_operate.config_page1_func_value)
{ {
#if (DEVICE_TYPE_AIR_CONDITION &&(DEV_TYPE == 1 ))
case LOCAL_FUNC_FAN_PANEL_SETTING: case LOCAL_FUNC_FAN_PANEL_SETTING:
{ {
Oled_Display_Info.Air_Device.operation_mode = local_config_operate.config_page2_value; Oled_Display_Info.Air_Device.operation_mode = local_config_operate.config_page2_value;
save_data(); save_data();
} }
break; break;
#endif
case LOCAL_FUNC_CALIBRATE_TEMPER: case LOCAL_FUNC_CALIBRATE_TEMPER:
break; break;
case LOCAL_FUNC_IS_DISPLAY_CURRENT_TEMPER: case LOCAL_FUNC_IS_DISPLAY_CURRENT_TEMPER:
...@@ -2019,7 +2031,7 @@ u8 Key_Operate_Config_Operation(u8 keyid,u8 keyEvent) ...@@ -2019,7 +2031,7 @@ u8 Key_Operate_Config_Operation(u8 keyid,u8 keyEvent)
{ {
switch(local_config_operate.config_page1_func_value) switch(local_config_operate.config_page1_func_value)
{ {
#if DEVICE_TYPE_AIR_CONDITION #if (DEVICE_TYPE_AIR_CONDITION &&(DEV_TYPE == 1 ))
case LOCAL_FUNC_FAN_PANEL_SETTING: case LOCAL_FUNC_FAN_PANEL_SETTING:
{ {
switch(local_config_operate.config_page2_value) switch(local_config_operate.config_page2_value)
......
...@@ -192,7 +192,7 @@ u8 Usart_recive_deal(TP_uc8 *data,TP_uc16 len) ...@@ -192,7 +192,7 @@ u8 Usart_recive_deal(TP_uc8 *data,TP_uc16 len)
Operate_Led_Button(Oled_Display_Info.device_type,0); Operate_Led_Button(Oled_Display_Info.device_type,0);
arg_data[0] = 0; arg_data[0] = 0;
arg_data[1] = 0; arg_data[1] = 0;
Oled_Display_Info.recv_lcd_off = 5; Oled_Display_Info.recv_lcd_off = 0x85;
ack_info(Usart_protocol_deal,arg_data,2); ack_info(Usart_protocol_deal,arg_data,2);
} }
break; break;
......
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