|
@@ -615,21 +615,45 @@ static void HMI_Decode(void)
|
|
|
LOG_I("推杆打开测试!!!");
|
|
LOG_I("推杆打开测试!!!");
|
|
|
ctr_Cold(ON);
|
|
ctr_Cold(ON);
|
|
|
}
|
|
}
|
|
|
|
|
+ else if (strstr(rx_buffer,"putTest.switchCc1=1")!=NULL)
|
|
|
|
|
+ {
|
|
|
|
|
+ LOG_I("推杆2打开测试!!!");
|
|
|
|
|
+ const uint8_t motor1_Forword[] = {0x02,0x06,0x00,0x00,0x00,0x01,0x48,0x39}; //02 06 00 00 00 01 48 39
|
|
|
|
|
+ Uart5_Write_Bin(motor1_Forword, sizeof(motor1_Forword));
|
|
|
|
|
+ }
|
|
|
else if (strstr(rx_buffer,"putTest.switchCc=0")!=NULL)
|
|
else if (strstr(rx_buffer,"putTest.switchCc=0")!=NULL)
|
|
|
{
|
|
{
|
|
|
LOG_I("推杆关闭测试!!!");
|
|
LOG_I("推杆关闭测试!!!");
|
|
|
ctr_Cold(OFF);
|
|
ctr_Cold(OFF);
|
|
|
}
|
|
}
|
|
|
|
|
+ else if (strstr(rx_buffer,"putTest.switchCc1=0")!=NULL)
|
|
|
|
|
+ {
|
|
|
|
|
+ LOG_I("推杆2关闭测试!!!");
|
|
|
|
|
+ const uint8_t motor1_Backward[] = {0x02,0x06,0x00,0x00,0x00,0x02,0x08,0x38}; //02 06 00 00 00 01 48 39
|
|
|
|
|
+ Uart5_Write_Bin(motor1_Backward, sizeof(motor1_Backward));
|
|
|
|
|
+ }
|
|
|
else if (strstr(rx_buffer,"putTest.shakeCc=1")!=NULL)
|
|
else if (strstr(rx_buffer,"putTest.shakeCc=1")!=NULL)
|
|
|
{
|
|
{
|
|
|
LOG_I("震动电机打开测试!!!");
|
|
LOG_I("震动电机打开测试!!!");
|
|
|
ctr_Collect_Fan(ON);
|
|
ctr_Collect_Fan(ON);
|
|
|
}
|
|
}
|
|
|
|
|
+ else if (strstr(rx_buffer,"putTest.shakeCc1=1")!=NULL)
|
|
|
|
|
+ {
|
|
|
|
|
+ LOG_I("震动电机1打开测试!!!");
|
|
|
|
|
+ const uint8_t motor2_Forword[] = {0x02,0x06,0x00,0x00,0x00,0x10,0x88,0x35}; //02 06 00 00 00 01 48 39
|
|
|
|
|
+ Uart5_Write_Bin(motor2_Forword, sizeof(motor2_Forword));
|
|
|
|
|
+ }
|
|
|
else if (strstr(rx_buffer,"putTest.shakeCc=0")!=NULL)
|
|
else if (strstr(rx_buffer,"putTest.shakeCc=0")!=NULL)
|
|
|
{
|
|
{
|
|
|
LOG_I("震动电机关闭测试!!!");
|
|
LOG_I("震动电机关闭测试!!!");
|
|
|
ctr_Collect_Fan(OFF);
|
|
ctr_Collect_Fan(OFF);
|
|
|
}
|
|
}
|
|
|
|
|
+ else if (strstr(rx_buffer,"putTest.shakeCc1=0")!=NULL)
|
|
|
|
|
+ {
|
|
|
|
|
+ LOG_I("震动电机1关闭测试!!!");
|
|
|
|
|
+ const uint8_t motor2_Stop[] = {0x02,0x06,0x00,0x00,0x00,0x00,0x89,0xF9}; //02 06 00 00 00 01 48 39
|
|
|
|
|
+ Uart5_Write_Bin(motor2_Stop, sizeof(motor2_Stop));
|
|
|
|
|
+ }
|
|
|
else if (strstr(rx_buffer,"turnzp")!=NULL) {
|
|
else if (strstr(rx_buffer,"turnzp")!=NULL) {
|
|
|
LOG_W("转仓!");
|
|
LOG_W("转仓!");
|
|
|
device_status.clear_status=2;
|
|
device_status.clear_status=2;
|
|
@@ -1797,7 +1821,7 @@ void Check_ParamConfig(void)
|
|
|
device_status.collecting_eh1 = 10;
|
|
device_status.collecting_eh1 = 10;
|
|
|
device_status.collecting_sh2 = 14;
|
|
device_status.collecting_sh2 = 14;
|
|
|
device_status.collecting_eh2 = 16;
|
|
device_status.collecting_eh2 = 16;
|
|
|
- device_status.cold_sw = 0;
|
|
|
|
|
|
|
+ device_status.motor_active = 0;
|
|
|
device_status.heat_sw = 0;
|
|
device_status.heat_sw = 0;
|
|
|
device_status.cul_time = 1;
|
|
device_status.cul_time = 1;
|
|
|
device_status.run_sta = 0;
|
|
device_status.run_sta = 0;
|
|
@@ -1831,7 +1855,7 @@ void Check_ParamConfig(void)
|
|
|
ef_set_env_blob("platform",&device_status.mqttcfg1,sizeof(device_status.mqttcfg1)); //上传平台
|
|
ef_set_env_blob("platform",&device_status.mqttcfg1,sizeof(device_status.mqttcfg1)); //上传平台
|
|
|
|
|
|
|
|
ef_set_env_blob("cul_time",&device_status.cul_time,sizeof(device_status.cul_time)); //采集时间
|
|
ef_set_env_blob("cul_time",&device_status.cul_time,sizeof(device_status.cul_time)); //采集时间
|
|
|
- ef_set_env_blob("cold_sw",&device_status.cold_sw,sizeof(device_status.cold_sw)); //制冷开关
|
|
|
|
|
|
|
+ ef_set_env_blob("motor_active",&device_status.motor_active,sizeof(device_status.motor_active)); //制冷开关
|
|
|
ef_set_env_blob("heat_sw",&device_status.heat_sw,sizeof(device_status.heat_sw)); //加热开关
|
|
ef_set_env_blob("heat_sw",&device_status.heat_sw,sizeof(device_status.heat_sw)); //加热开关
|
|
|
ef_set_env_blob("collecting_sh1",&device_status.collecting_sh1,sizeof(device_status.collecting_sh1)); //风机开关
|
|
ef_set_env_blob("collecting_sh1",&device_status.collecting_sh1,sizeof(device_status.collecting_sh1)); //风机开关
|
|
|
ef_set_env_blob("collecting_eh1",&device_status.collecting_eh1,sizeof(device_status.collecting_eh1)); //采集时间
|
|
ef_set_env_blob("collecting_eh1",&device_status.collecting_eh1,sizeof(device_status.collecting_eh1)); //采集时间
|
|
@@ -1890,7 +1914,7 @@ void Check_ParamConfig(void)
|
|
|
ef_get_env_blob("platform",&device_status.mqttcfg1,sizeof(device_status.mqttcfg1),NULL); //平台地址
|
|
ef_get_env_blob("platform",&device_status.mqttcfg1,sizeof(device_status.mqttcfg1),NULL); //平台地址
|
|
|
/*孢子仪*/
|
|
/*孢子仪*/
|
|
|
ef_get_env_blob("cul_time",&device_status.cul_time,sizeof(device_status.cul_time),NULL); //培养时间
|
|
ef_get_env_blob("cul_time",&device_status.cul_time,sizeof(device_status.cul_time),NULL); //培养时间
|
|
|
- ef_get_env_blob("cold_sw",&device_status.cold_sw,sizeof(device_status.cold_sw),NULL); //制冷开关
|
|
|
|
|
|
|
+ ef_get_env_blob("motor_active",&device_status.motor_active,sizeof(device_status.motor_active),NULL); //电机
|
|
|
ef_get_env_blob("heat_sw",&device_status.heat_sw,sizeof(device_status.heat_sw),NULL); //加热开关
|
|
ef_get_env_blob("heat_sw",&device_status.heat_sw,sizeof(device_status.heat_sw),NULL); //加热开关
|
|
|
ef_get_env_blob("collecting_sh1",&device_status.collecting_sh1,sizeof(device_status.collecting_sh1),NULL); //采集开始1
|
|
ef_get_env_blob("collecting_sh1",&device_status.collecting_sh1,sizeof(device_status.collecting_sh1),NULL); //采集开始1
|
|
|
ef_get_env_blob("collecting_eh1",&device_status.collecting_eh1,sizeof(device_status.collecting_eh1),NULL); //采集结束1
|
|
ef_get_env_blob("collecting_eh1",&device_status.collecting_eh1,sizeof(device_status.collecting_eh1),NULL); //采集结束1
|
|
@@ -1984,6 +2008,7 @@ void Check_ParamConfig(void)
|
|
|
LOG_I("deviceId:%s",device_status.deviceId);
|
|
LOG_I("deviceId:%s",device_status.deviceId);
|
|
|
LOG_I("handle_bugger:%d",device_status.handle_bugger);
|
|
LOG_I("handle_bugger:%d",device_status.handle_bugger);
|
|
|
LOG_I("alarm_tg:%s",device_status.alarm_tg);
|
|
LOG_I("alarm_tg:%s",device_status.alarm_tg);
|
|
|
|
|
+ LOG_I("motor_active:%d",device_status.motor_active);
|
|
|
}
|
|
}
|
|
|
//RTC时间判断,如果当前年份小于2020,提示需要设置时间,切换为光控
|
|
//RTC时间判断,如果当前年份小于2020,提示需要设置时间,切换为光控
|
|
|
if(device_status.update_flag==1)
|
|
if(device_status.update_flag==1)
|