Parcourir la source

增加启停测试。

dd il y a 2 mois
Parent
commit
55fac43d94

+ 19 - 1
3.BasicFunction/Source/bikebrake.c

@@ -54,6 +54,24 @@ void bikebrake_voBikeBrakeInit(void)
 ****************************************************************/
 void bikebrake_voBikeBrakeDetect(void)
 {
+#if 1 //启停测试,3s 3s
+    static ULONG TimeCnt = 0;
+    TimeCnt++;
+    if(TimeCnt <= 3000)
+    {
+        bikebrake_stBikeBrakeOut.blBikeBrakeOnFlg = FALSE;
+    }
+    else if(TimeCnt <= 6000)
+    {
+        bikebrake_stBikeBrakeOut.blBikeBrakeOnFlg = TRUE;
+    }
+    else
+    {
+        TimeCnt = 0;
+    }
+    return;
+#endif
+
     if (bikebrake_stBikeBrakeOut.blBikeBrakeOnFlg == FALSE && (Get_BRAKE_DETECT_PORT() == RESET))//(GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_11)!=0)
     {
         bikebrake_stBikeBrakeOut.uwBikeBrakeCnt++;
@@ -96,4 +114,4 @@ BOOL BikeBrake_blGetstate(void)
 /*************************************************************************
  End of this File (EOF)!
  Do not put anything after this part!
-*************************************************************************/
+*************************************************************************/

+ 1 - 1
4.BasicHardwSoftwLayer/2.BasicSoftwLayer/Include/user.h

@@ -48,7 +48,7 @@ Update Time
 /*======================================================================*
     三力矩标志
 *=======================================================================*/
-//#define TORSENSOR3NUM  //三力矩标识
+#define TORSENSOR3NUM  //三力矩标识
 
 /*======================================================================*
    Motor Number Selection