|
@@ -114,6 +114,7 @@ struct timeb _ac_startChargingTime;
|
|
|
struct timeb _ac_endChargingTime;
|
|
|
|
|
|
unsigned short _setFanSpeed = 0;
|
|
|
+byte _checkLedChanged = 3;
|
|
|
|
|
|
Ver ver;
|
|
|
PresentInputVoltage inputVoltage;
|
|
@@ -1154,10 +1155,12 @@ void SetLedColor(struct ChargingInfoData *chargingData_1, struct ChargingInfoDat
|
|
|
led_color.Connect_2_Red = COLOR_MAX_LV;
|
|
|
}
|
|
|
|
|
|
- if (IsNoneMatchLedColor())
|
|
|
+ if (_checkLedChanged > 0)
|
|
|
{
|
|
|
if (Config_Led_Color(Uart5Fd, Addr.Led, &led_color) == PASS)
|
|
|
{
|
|
|
+ _checkLedChanged--;
|
|
|
+
|
|
|
cur_led_color.Connect_1_Red = led_color.Connect_1_Red;
|
|
|
cur_led_color.Connect_1_Green = led_color.Connect_1_Green;
|
|
|
cur_led_color.Connect_1_Blue = led_color.Connect_1_Blue;
|
|
@@ -1166,6 +1169,8 @@ void SetLedColor(struct ChargingInfoData *chargingData_1, struct ChargingInfoDat
|
|
|
cur_led_color.Connect_2_Blue = led_color.Connect_2_Blue;
|
|
|
}
|
|
|
}
|
|
|
+ else if (IsNoneMatchLedColor())
|
|
|
+ _checkLedChanged = 3;
|
|
|
}
|
|
|
//==========================================
|
|
|
// Init all share memory
|
|
@@ -1962,12 +1967,23 @@ int main(void)
|
|
|
gettimeofday(&_priority_time, NULL);
|
|
|
}
|
|
|
|
|
|
+ // 自檢階段處理,自檢階段如果讀不到版號則代表該系統沒有掛燈板
|
|
|
if (ShmLedModuleData->SelfTest_Comp == NO)
|
|
|
{
|
|
|
+ // 自檢階段
|
|
|
+ if (ShmSysConfigAndInfo->SysInfo.SelfTestSeq <= _STEST_PSU_CAP)
|
|
|
+ {
|
|
|
GetFwAndHwVersion_Led();
|
|
|
sleep(1);
|
|
|
gettimeofday(&_led_priority_time, NULL);
|
|
|
}
|
|
|
+ else
|
|
|
+ {
|
|
|
+ // 自檢階段沒有問到版號
|
|
|
+ if (ShmStatusCodeData->AlarmCode.AlarmEvents.bits.LedboardStestFail == NO)
|
|
|
+ ShmStatusCodeData->AlarmCode.AlarmEvents.bits.LedboardStestFail = YES;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
AcChargeTypeProcess();
|
|
|
|