|
|
@@ -569,92 +569,6 @@ static void HMI_Decode(void)
|
|
|
ctr_Heat(ON);
|
|
|
LOG_I("Open Heat!");
|
|
|
}
|
|
|
- //打开制冷
|
|
|
- else if(strstr(rx_buffer,"putTest.switchCold=1")!=NULL) {
|
|
|
- ctr_Cold(ON);
|
|
|
- LOG_I("Open Cold!");
|
|
|
- }
|
|
|
- //关闭制冷
|
|
|
- else if(strstr(rx_buffer,"putTest.switchCold=0")!=NULL) {
|
|
|
- ctr_Cold(OFF);
|
|
|
- LOG_I("Close Cold!");
|
|
|
- }
|
|
|
- //打开采集
|
|
|
- else if(strstr(rx_buffer,"putTest.switchCollect=1")!=NULL){
|
|
|
- ctr_Collect_Fan(ON);
|
|
|
- LOG_I("采集风机已打开!");
|
|
|
- }
|
|
|
- //关闭采集
|
|
|
- else if(strstr(rx_buffer,"putTest.switchCollect=0")!=NULL){
|
|
|
- ctr_Collect_Fan(OFF);
|
|
|
- LOG_I("采集风机已关闭!");
|
|
|
- }
|
|
|
- //打开散热
|
|
|
- else if(strstr(rx_buffer,"putTest.switchCool=1")!=NULL){
|
|
|
- ctr_Cool_Fan(ON);
|
|
|
- LOG_I("散热风机已打开!");
|
|
|
- }
|
|
|
- //关闭散热
|
|
|
- else if(strstr(rx_buffer,"putTest.switchCool=0")!=NULL){
|
|
|
- ctr_Cool_Fan(OFF);
|
|
|
- LOG_I("散热风机已关闭!");
|
|
|
- }
|
|
|
-
|
|
|
- else if (strstr(rx_buffer,"putTest.switchAutotest=1")!=NULL)
|
|
|
- {
|
|
|
- LOG_I("开始一键测试!!!");
|
|
|
- device_status.auto_test_sw=1;
|
|
|
- }
|
|
|
- else if (strstr(rx_buffer,"putTest.switchAutotest=1")!=NULL)
|
|
|
- {
|
|
|
- LOG_I("停止一键测试!!!");
|
|
|
- device_status.auto_test_sw=0;
|
|
|
- }
|
|
|
- else if (strstr(rx_buffer,"putTest.switchCc=1")!=NULL)
|
|
|
- {
|
|
|
- LOG_I("推杆打开测试!!!");
|
|
|
- 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)
|
|
|
- {
|
|
|
- LOG_I("推杆关闭测试!!!");
|
|
|
- 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)
|
|
|
- {
|
|
|
- LOG_I("震动电机打开测试!!!");
|
|
|
- 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)
|
|
|
- {
|
|
|
- LOG_I("震动电机关闭测试!!!");
|
|
|
- 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) {
|
|
|
LOG_W("转仓!");
|
|
|
device_status.clear_status=2;
|