Explorar o código

界面plus电机闪单边灯问题呢

yidong hai 1 mes
pai
achega
4adde8c534
Modificáronse 4 ficheiros con 31 adicións e 109 borrados
  1. 3 0
      DriverInterface/state_mini.c
  2. 1 2
      DriverInterface/usr_motor.c
  3. 1 1
      DriverInterface/ws2812.c
  4. 26 106
      MDK-ARM/mini7_V2.uvoptx

+ 3 - 0
DriverInterface/state_mini.c

@@ -242,6 +242,9 @@ uint8_t error_set(uint8_t error,uint8_t id)
     error_info.id = id;
     if(error_info.id == 0){        
         sysinf.psmMaster.state = SW_Fault;
+        if(error== ERROR_MOTOR_FIALED){
+            sysinf.psmSlave.state = SW_Fault;
+        }
         Van_Device_Printf(VAN_LOG_ERROR, "error_set: %d %d %d\n", 0, error,sysinf.psmMaster.state);
         if(error == ERROR_SAMP_MOVE_CARD)   //检测中拔卡,需等待60S才能消除
         {

+ 1 - 2
DriverInterface/usr_motor.c

@@ -532,8 +532,7 @@ uint32_t Motor_mix_work(void) {
   		/*电机不动,返回报错*/
   		SetMotorPwm(MOTOR_REV, 0);
   		sw_st = SWING_ERR;
-		error_set(ERROR_MOTOR_FIALED,0);	
-		error_set(ERROR_MOTOR_FIALED,1);		
+		error_set(ERROR_MOTOR_FIALED,0);		
         updateAmplifState(SYS_STATE_ERROR_HW,0);
         updateAmplifState(SYS_STATE_ERROR_HW,1);
   		return 1;

+ 1 - 1
DriverInterface/ws2812.c

@@ -187,8 +187,8 @@ void light_update(void){
         light_set(MODE_NORMAL,1000, COLOR_RED,0);	//仪器故障,双边同步 
 #ifdef ONECHIP_MINI_ONE
         light_set(MODE_NORMAL,1000, COLOR_RED,1);	//
-#endif
         return ;
+#endif
     } else   if(sysinf.pc_link_timeout == OFFLINE_TIME){
         light_set(MODE_BLINK,1000, COLOR_YELLOW,0);	//
         light_set(MODE_BLINK,1000, COLOR_YELLOW,1);	//

+ 26 - 106
MDK-ARM/mini7_V2.uvoptx

@@ -152,130 +152,34 @@
         <Bp>
           <Number>0</Number>
           <Type>0</Type>
-          <LineNumber>547</LineNumber>
+          <LineNumber>218</LineNumber>
           <EnabledFlag>1</EnabledFlag>
-          <Address>134321222</Address>
+          <Address>134335292</Address>
           <ByteObject>0</ByteObject>
           <HtxType>0</HtxType>
           <ManyObjects>0</ManyObjects>
           <SizeOfObject>0</SizeOfObject>
           <BreakByAccess>0</BreakByAccess>
           <BreakIfRCount>1</BreakIfRCount>
-          <Filename>..\DriverInterface\ESP32_WROOM_32D.c</Filename>
+          <Filename>..\DriverInterface\ws2812.c</Filename>
           <ExecCommand></ExecCommand>
-          <Expression>\\mini7_V2\../DriverInterface/ESP32_WROOM_32D.c\547</Expression>
+          <Expression>\\mini7_V2\../DriverInterface/ws2812.c\218</Expression>
         </Bp>
         <Bp>
           <Number>1</Number>
           <Type>0</Type>
-          <LineNumber>167</LineNumber>
+          <LineNumber>184</LineNumber>
           <EnabledFlag>1</EnabledFlag>
-          <Address>134341732</Address>
+          <Address>134335074</Address>
           <ByteObject>0</ByteObject>
           <HtxType>0</HtxType>
           <ManyObjects>0</ManyObjects>
           <SizeOfObject>0</SizeOfObject>
           <BreakByAccess>0</BreakByAccess>
           <BreakIfRCount>1</BreakIfRCount>
-          <Filename>..\DriverInterface\van_BSP_Scanner.c</Filename>
+          <Filename>..\DriverInterface\ws2812.c</Filename>
           <ExecCommand></ExecCommand>
-          <Expression>\\mini7_V2\../DriverInterface/van_BSP_Scanner.c\167</Expression>
-        </Bp>
-        <Bp>
-          <Number>2</Number>
-          <Type>0</Type>
-          <LineNumber>303</LineNumber>
-          <EnabledFlag>1</EnabledFlag>
-          <Address>0</Address>
-          <ByteObject>0</ByteObject>
-          <HtxType>0</HtxType>
-          <ManyObjects>0</ManyObjects>
-          <SizeOfObject>0</SizeOfObject>
-          <BreakByAccess>0</BreakByAccess>
-          <BreakIfRCount>0</BreakIfRCount>
-          <Filename>..\DriverInterface\usr_motor.c</Filename>
-          <ExecCommand></ExecCommand>
-          <Expression></Expression>
-        </Bp>
-        <Bp>
-          <Number>3</Number>
-          <Type>0</Type>
-          <LineNumber>510</LineNumber>
-          <EnabledFlag>1</EnabledFlag>
-          <Address>0</Address>
-          <ByteObject>0</ByteObject>
-          <HtxType>0</HtxType>
-          <ManyObjects>0</ManyObjects>
-          <SizeOfObject>0</SizeOfObject>
-          <BreakByAccess>0</BreakByAccess>
-          <BreakIfRCount>0</BreakIfRCount>
-          <Filename>..\DriverInterface\usr_motor.c</Filename>
-          <ExecCommand></ExecCommand>
-          <Expression></Expression>
-        </Bp>
-        <Bp>
-          <Number>4</Number>
-          <Type>0</Type>
-          <LineNumber>217</LineNumber>
-          <EnabledFlag>1</EnabledFlag>
-          <Address>0</Address>
-          <ByteObject>0</ByteObject>
-          <HtxType>0</HtxType>
-          <ManyObjects>0</ManyObjects>
-          <SizeOfObject>0</SizeOfObject>
-          <BreakByAccess>0</BreakByAccess>
-          <BreakIfRCount>0</BreakIfRCount>
-          <Filename>..\DriverInterface\state_mini.c</Filename>
-          <ExecCommand></ExecCommand>
-          <Expression></Expression>
-        </Bp>
-        <Bp>
-          <Number>5</Number>
-          <Type>0</Type>
-          <LineNumber>862</LineNumber>
-          <EnabledFlag>1</EnabledFlag>
-          <Address>0</Address>
-          <ByteObject>0</ByteObject>
-          <HtxType>0</HtxType>
-          <ManyObjects>0</ManyObjects>
-          <SizeOfObject>0</SizeOfObject>
-          <BreakByAccess>0</BreakByAccess>
-          <BreakIfRCount>0</BreakIfRCount>
-          <Filename>..\DriverInterface\ESP32_WROOM_32D.c</Filename>
-          <ExecCommand></ExecCommand>
-          <Expression></Expression>
-        </Bp>
-        <Bp>
-          <Number>6</Number>
-          <Type>0</Type>
-          <LineNumber>864</LineNumber>
-          <EnabledFlag>1</EnabledFlag>
-          <Address>0</Address>
-          <ByteObject>0</ByteObject>
-          <HtxType>0</HtxType>
-          <ManyObjects>0</ManyObjects>
-          <SizeOfObject>0</SizeOfObject>
-          <BreakByAccess>0</BreakByAccess>
-          <BreakIfRCount>0</BreakIfRCount>
-          <Filename>..\DriverInterface\ESP32_WROOM_32D.c</Filename>
-          <ExecCommand></ExecCommand>
-          <Expression></Expression>
-        </Bp>
-        <Bp>
-          <Number>7</Number>
-          <Type>0</Type>
-          <LineNumber>61</LineNumber>
-          <EnabledFlag>1</EnabledFlag>
-          <Address>0</Address>
-          <ByteObject>0</ByteObject>
-          <HtxType>0</HtxType>
-          <ManyObjects>0</ManyObjects>
-          <SizeOfObject>0</SizeOfObject>
-          <BreakByAccess>0</BreakByAccess>
-          <BreakIfRCount>0</BreakIfRCount>
-          <Filename>..\DriverInterface\user_heater.c</Filename>
-          <ExecCommand></ExecCommand>
-          <Expression></Expression>
+          <Expression>\\mini7_V2\../DriverInterface/ws2812.c\184</Expression>
         </Bp>
       </Breakpoint>
       <WatchWindow1>
@@ -650,7 +554,7 @@
         <Bp>
           <Number>7</Number>
           <Type>0</Type>
-          <LineNumber>862</LineNumber>
+          <LineNumber>184</LineNumber>
           <EnabledFlag>1</EnabledFlag>
           <Address>0</Address>
           <ByteObject>0</ByteObject>
@@ -659,7 +563,23 @@
           <SizeOfObject>0</SizeOfObject>
           <BreakByAccess>0</BreakByAccess>
           <BreakIfRCount>0</BreakIfRCount>
-          <Filename>..\DriverInterface\ESP32_WROOM_32D.c</Filename>
+          <Filename>..\DriverInterface\ws2812.c</Filename>
+          <ExecCommand></ExecCommand>
+          <Expression></Expression>
+        </Bp>
+        <Bp>
+          <Number>8</Number>
+          <Type>0</Type>
+          <LineNumber>218</LineNumber>
+          <EnabledFlag>1</EnabledFlag>
+          <Address>0</Address>
+          <ByteObject>0</ByteObject>
+          <HtxType>0</HtxType>
+          <ManyObjects>0</ManyObjects>
+          <SizeOfObject>0</SizeOfObject>
+          <BreakByAccess>0</BreakByAccess>
+          <BreakIfRCount>0</BreakIfRCount>
+          <Filename>..\DriverInterface\ws2812.c</Filename>
           <ExecCommand></ExecCommand>
           <Expression></Expression>
         </Bp>