|
@@ -292,7 +292,7 @@ int main(void)
|
|
|
PulseCnt = 0;
|
|
|
}while(0);
|
|
|
//轴承测试,运行40s,停5min,100个循环
|
|
|
- #else 1
|
|
|
+ #elseif 0
|
|
|
do
|
|
|
{
|
|
|
static uint16_t PulseCnt = 0, CycleCnt = 0;
|
|
@@ -318,7 +318,30 @@ int main(void)
|
|
|
{
|
|
|
IsBreakTrig_Flag = TRUE;
|
|
|
}
|
|
|
- }while(0);
|
|
|
+ }while(0);
|
|
|
+ //频繁启停启动运行10s,停止5s,出现电机无法启动时报错28,停止测试
|
|
|
+ #else
|
|
|
+ do
|
|
|
+ {
|
|
|
+ static uint32_t AutoStartCount = 0;
|
|
|
+ static uint16_t PulseCnt = 0;
|
|
|
+ static uint32_t PeriodCnt = 0;
|
|
|
+ if((HAL_GetTick() - PeriodCnt) > 1000)
|
|
|
+ {
|
|
|
+ PulseCnt++;
|
|
|
+ PeriodCnt = HAL_GetTick();
|
|
|
+ }
|
|
|
+ if(PulseCnt < 10)
|
|
|
+ IsBreakTrig_Flag = FALSE;
|
|
|
+ else if(PulseCnt < 15)
|
|
|
+ IsBreakTrig_Flag = TRUE;
|
|
|
+ else
|
|
|
+ {
|
|
|
+ PulseCnt = 0;
|
|
|
+ AutoStartCount++;
|
|
|
+ }
|
|
|
+
|
|
|
+ }while(0);
|
|
|
#endif
|
|
|
|
|
|
//续航里程计算
|
|
@@ -383,7 +406,7 @@ int main(void)
|
|
|
|
|
|
#if 1
|
|
|
//故障检测
|
|
|
- //MC_Fault_Check_Process();
|
|
|
+ MC_Fault_Check_Process();
|
|
|
|
|
|
//保护判断
|
|
|
MC_Protect_Check_Process();
|
|
@@ -404,9 +427,9 @@ int main(void)
|
|
|
SpdProportion_calculate();
|
|
|
|
|
|
//变速器处理
|
|
|
- GearBox_Loop();
|
|
|
+ GearBox_Loop();
|
|
|
|
|
|
- //MCU自检
|
|
|
+ //MCU自检
|
|
|
STU_TimeBase();
|
|
|
STU_DoRunTimeChecks();
|
|
|
|