Explorar el Código

1、修复单次里程时间不累加
2.修复里程公里数不匹配问题

CN\houcf5 hace 4 meses
padre
commit
78d379dd70
Se han modificado 2 ficheros con 5 adiciones y 2 borrados
  1. 1 1
      3.BasicFunction/Source/bikespeed.c
  2. 4 1
      3.BasicFunction/Source/canAppl.c

+ 1 - 1
3.BasicFunction/Source/bikespeed.c

@@ -301,7 +301,7 @@ void bikespeed_votempTripCal(void)
     }
 #else
     UWORD Temptrip;
-    Temptrip = (ULONG)(ass_ParaCong.uwWheelPerimeter + ass_ParaCong.swDeltPerimeter)* bikespeed_stFreGetOut.uwBikeForwardCnt /(200 * bikespeed_stFreGetCof.uwNumbersPulses); //219cm
+    Temptrip = (ULONG)(ass_ParaCong.uwWheelPerimeter + ass_ParaCong.swDeltPerimeter)* bikespeed_stFreGetOut.uwBikeForwardCnt /(100 * bikespeed_stFreGetCof.uwNumbersPulses); //219cm
     if (Temptrip > bikespeed_stFreGetCof.uwMinTriptoUpdate)
     {
         bikespeed_stFreGetOut.uwBikeForwardCnt = 0;

+ 4 - 1
3.BasicFunction/Source/canAppl.c

@@ -182,7 +182,7 @@ void Can_voUpdateMC_UpcInfo(void)
     MC_UpcInfo.stHistoryInfo.uwUsedTimeL = (UWORD)(cp_stHistoryPara.ulUsedTime);
     MC_UpcInfo.stHistoryInfo.swNTCTempMaxCe = cp_stHistoryPara.swNTCTempMaxCe;
     MC_UpcInfo.stHistoryInfo.swNTCTempMinCe = cp_stHistoryPara.swNTCTempMinCe;
-    ;
+    
 
     MC_UpcInfo.stHistoryInfo.uwAlamHOcurTimes = cp_stHistoryPara.uwAlamHOcurTimes;
     MC_UpcInfo.stHistoryInfo.uwAlamSOcurTimes = cp_stHistoryPara.uwAlamSOcurTimes;
@@ -328,6 +328,9 @@ void Can_voMC_Run_1ms(void)
     {
         cp_stBikeRunInfoPara.ulRiTime++;
 
+        cp_stBikeRunInfoPara.ulRiTirpTime++;
+
+        cp_stBikeRunInfoPara.ulRealODOTime++;
     }
     else
     {}