yf_zjb 2 lat temu
rodzic
commit
643170653e

BIN
Application_CBD/Debug/Application_CBD.bin


BIN
Application_CBD/Debug/Application_CBD.elf


Plik diff jest za duży
+ 2427 - 2423
Application_CBD/Debug/Application_CBD.map


BIN
Application_CBD/Debug/applications/control.o


BIN
Application_CBD/Debug/applications/dtu_uart2.o


BIN
Application_CBD/Debug/applications/hmi.o


BIN
Application_CBD/Debug/applications/main.o


BIN
Application_CBD/Debug/applications/sht30_collect.o


+ 3 - 0
Application_CBD/Debug/applications/subdir.mk

@@ -9,6 +9,7 @@ C_SRCS += \
 ../applications/dtu_uart2.c \
 ../applications/hmi.c \
 ../applications/main.c \
+../applications/sample_mb_master.c \
 ../applications/sht30_collect.c \
 ../applications/sound.c 
 
@@ -18,6 +19,7 @@ OBJS += \
 ./applications/dtu_uart2.o \
 ./applications/hmi.o \
 ./applications/main.o \
+./applications/sample_mb_master.o \
 ./applications/sht30_collect.o \
 ./applications/sound.o 
 
@@ -27,6 +29,7 @@ C_DEPS += \
 ./applications/dtu_uart2.d \
 ./applications/hmi.d \
 ./applications/main.d \
+./applications/sample_mb_master.d \
 ./applications/sht30_collect.d \
 ./applications/sound.d 
 

+ 0 - 1
Application_CBD/Debug/makefile

@@ -26,7 +26,6 @@ RM := rm -rf
 -include packages/syswatch-latest/src/subdir.mk
 -include packages/sht3x-latest/subdir.mk
 -include packages/ota_downloader-latest/src/subdir.mk
--include packages/freemodbus-latest/samples/subdir.mk
 -include packages/freemodbus-latest/port/subdir.mk
 -include packages/freemodbus-latest/modbus/rtu/subdir.mk
 -include packages/freemodbus-latest/modbus/functions/subdir.mk

+ 0 - 1
Application_CBD/Debug/sources.mk

@@ -34,7 +34,6 @@ packages/freemodbus-latest/modbus/functions \
 packages/freemodbus-latest/modbus \
 packages/freemodbus-latest/modbus/rtu \
 packages/freemodbus-latest/port \
-packages/freemodbus-latest/samples \
 packages/ota_downloader-latest/src \
 packages/sht3x-latest \
 packages/syswatch-latest/src \

+ 7 - 102
Application_CBD/applications/control.c

@@ -2460,8 +2460,9 @@ void WorkTask_XYV3(void)
             time(&time_take);
             static struct tm alarm_takephpoto;
             alarm_takephpoto =*localtime(&time_take);
-            if((alarm_takephpoto.tm_hour)==17&&(alarm_takephpoto.tm_min==00)&&(alarm_takephpoto.tm_sec==00))
+            if((alarm_takephpoto.tm_hour)==17&&(alarm_takephpoto.tm_min==0)&&(alarm_takephpoto.tm_sec==0))
             {
+                device_status.photo_ws = 1;
                 break;
             }
             LOG_I("当前时间:%d:%d:%d",alarm_takephpoto.tm_hour,alarm_takephpoto.tm_min,alarm_takephpoto.tm_sec);
@@ -2529,6 +2530,7 @@ static void Work_Loop_thread_entry(void *parameter)
         rt_thread_delay(1000);
     }
 }
+
 /*入口函数清扫*/
 static void Control_Clear_thread_entry(void *parameter)
 {
@@ -2563,111 +2565,14 @@ static void Control_Clear_thread_entry(void *parameter)
 /*入口函数加热*/
 static void Control_Heat_thread_entry(void *parameter)
 {
-
-    uint16_t var_clear = 0;
-    #if ROBOT_EN == 1
-    static uint8_t key_on = 0;
-    #else
-    #if Color_EN == 0
-    while(device_status.work_status==0)
-    {
-        rt_thread_delay(1000);
-    }
-    #endif
-    #endif
+    rt_pin_mode(SIGNAL_CJS, PIN_MODE_INPUT);
     while(1)
     {
-        #if ROBOT_EN == 1
-        //磁悬浮供电
-        //监测磁悬浮限位位置`
-        LOG_D("Read 磁悬浮:%d",device_status.heattem);
-        //等待10S
-        if(device_status.heattem<30&&Read_Real_Voltage()/100>12)   //磁悬浮处于关闭状态
-        {
-            key_on = 0;
-            //发送触摸按钮信号
-            rt_pin_mode(EMS_Dir, PIN_MODE_OUTPUT);
-            rt_pin_write(EMS_Dir, 0);
-            rt_thread_delay(50);
-            rt_pin_write(EMS_Dir, 1);
-        }
-        else if (device_status.heattem<30&&Read_Real_Voltage()/100<12) {
-            ctr_router(OFF);
-        }
-        if(device_status.heattem>40)
-        {
-            key_on = 1;
+        if(rt_pin_read(SIGNAL_GS)==0){
             rt_thread_delay(1000);
-            LOG_D("Read 磁悬浮已打开:%d",device_status.heattem);
-        }
-
-        //磁悬浮供电
-        //监测磁悬浮限位位置
-        //根据位置确定是否 按下按钮+
-        if(Read_Real_Voltage()/100<12&&key_on==1)
-        {
-            key_on = 0;
-            rt_pin_mode(EMS_Dir, PIN_MODE_OUTPUT);
-            rt_pin_write(EMS_Dir, 0);
-            rt_thread_delay(50);
-            rt_pin_write(EMS_Dir, 1);
-        }
-        #else
-        #if Color_EN == 1
-        /*黄板归位*/
-        if(Read_Color_Key(KEY_BACK)==1)
-        {
-            LOG_W("黄板归位!");
-            ctr_Color_board(CLOSE, 300);
-            rt_thread_delay(5000);
+            device_status.yc_ct +=1;
         }
-        #else
-        if(device_status.work_status==1&&device_status.heat_sw==1)
-        {
-            ctr_lamp(ON, 1);
-            rt_thread_delay(10000);
-            calorstat(device_status.heattime*60);
-        }
-        else
-        {
-            LOG_I("Not calorstat!");
-        }
-        if(device_status.work_status==1&&device_status.version_type==5)
-        {
-            var_clear++;
-            if(var_clear==300)
-            {
-                var_clear = 0;
-                ctr_cangmen_down(ON);
-                rt_thread_mdelay(5000);
-                ctr_cangmen_down(OFF);
-                rt_thread_mdelay(500);
-                ctr_cangmen_down(ON);
-                rt_thread_mdelay(5000);
-                ctr_cangmen_down(OFF);
-            }
-        }
-//        //吸虫塔补光灯测试
-//        while(device_status.vol!=200)
-//        {
-//            if(var_led==0) ctr_led(ON);
-//            var_led++;
-//            if(var_led>10)
-//            {
-//                ctr_led(OFF);
-//                var_ledoff++;
-//                if(var_ledoff>10)
-//                {
-//                    var_led = 0;
-//                    var_ledoff = 0;
-//                    ctr_led(ON);
-//                }
-//            }
-//            rt_thread_delay(1000);
-//        }
-        rt_thread_delay(1000);
-        #endif
-        #endif
+        rt_thread_delay(20);
     }
 }
 /*清扫线程*/

+ 3 - 0
Application_CBD/applications/control.h

@@ -235,6 +235,9 @@ uint8_t ctr_Motor_xifu(uint8_t status_ws);
 uint8_t ctr_Camera_Power(uint8_t status_ws);
 /*****************************5.0测报灯******************************/
 void ctr_turnv5(void);
+/****************************性诱3.0********************************/
+#define SIGNAL_CJS GET_PIN(B,5)
+#define SIGNAL_GS GET_PIN(B,8)
 /*****************************孢子仪**********************************/
 //制冷
 #define Cold_Pin GET_PIN(B,11)

+ 4 - 7
Application_CBD/applications/hmi.c

@@ -617,7 +617,7 @@ static void HMI_Decode(void)
         if(device_status.dtype==7)
         {
             LOG_I("停止步进上行!");
-            ctr_lamp(OFF, 0);
+            ctr_lamp(OFF, 1);
             ctr_Motor_Driver(0, 0,0,0);
         }
         else
@@ -1512,7 +1512,7 @@ static void Ctr_Mortor_entry(void* parameter)
                     beep_set(1000000, 0);      //2kzh - 50%
                     HMI_WRITE("sysTest.switchAutopic.val=%d",0);
                     HMI_WRITE("sysTest.auto_flag.txt=\"\"");
-                    ctr_lamp(OFF, 0);
+                    ctr_lamp(OFF, 1);
                     break;
                 }
                 photo_setup++;
@@ -1528,7 +1528,7 @@ static void Ctr_Mortor_entry(void* parameter)
             HMI_WRITE("sysTest.auto_flag.txt=\"\"");
             HMI_WRITE("sysTest.switchAutopic.val=%d",0);
             //关闭步进电机驱动器电源
-            ctr_lamp(OFF, 0);
+            ctr_lamp(OFF, 1);
             //重置运行标志位
             device_status.run_sta = 0;
             ef_set_env_blob("run_sta", &device_status.run_sta, sizeof(device_status.run_sta));
@@ -1919,13 +1919,10 @@ void Check_ParamConfig(void)
 
         ctr_router(ON);
         Hmi_Fresh();
-        #if Color_EN == 1
-        Control_clear();
-        Control_heat();
-        #endif
         if(device_status.dtype!=7)
         {
             Control_clear();
+            Control_heat();
         }
         dtu_data_play();
         sht30_collect();

+ 1 - 1
Application_CBD/applications/sht30_collect.c

@@ -250,7 +250,7 @@ static void Power_ReadCheck(void *parameter)
         }
 
         #if ROBOT_EN == 0
-        rt_sprintf(device_status.voltage,"%d.%02d",filter_voltage()/100,filter_voltage()%100);
+        rt_sprintf(device_status.voltage,"%d.%d",filter_voltage()/10,filter_voltage()%10);
         //LOG_D("voltage is:%sV",device_status.voltage);
         sprintf(device_status.fuse_voltage, "%d.%02d",Read_Fuse_Voltage()/100,Read_Fuse_Voltage()%100);
         #endif