Эх сурвалжийг харах

2022-02-22 / Simon Xue

Action:
1. [fix] Charge start time and end time (UTC->CST-8)

Files
As the commit history files

Image Version: v2.02.XX.XXXX.XX
Simon Xue 3 жил өмнө
parent
commit
98c9c989f7

+ 3 - 3
EVSE/Projects/DD360UCar/Apps/CSU/main.c

@@ -82,8 +82,8 @@ uint8_t bd0_2_status = 0;
 uint8_t bd1_1_status = 0;
 uint8_t bd1_2_status = 0;
 
-char *fwVersion = "V2.01.00.0000.00"; // Phihong version
-char* DebugVersion = "v2.01.01";      // Software debug version
+char *fwVersion = "V2.02.00.0000.00"; // Phihong version
+char* DebugVersion = "v2.02.01";      // Software debug version
 //sqlite3 *localDb;
 bool isDb_ready;
 
@@ -3838,7 +3838,6 @@ int main(void)
     bool isModelNameMatch = true;
     uint8_t _ocppProfileChkFlag;
     uint8_t gunIndex = 0;
-
     if (CreateAllCsuShareMemory() == FAIL) {
         log_error("create share memory error");
         return FAIL;
@@ -3874,6 +3873,7 @@ int main(void)
     log_info(" ********************************************************");
     log_info(" ******************  Project:DD360UCar  *****************");
     log_info(" ********************************************************");
+
     if (!InitialSystemDefaultConfig()) {
         log_error("InitialSystemDefaultConfig NG ");
         //StopProcessingLoop();

+ 1 - 0
EVSE/Projects/DD360UCar/Apps/Config.h

@@ -505,6 +505,7 @@ typedef struct StDcCommonInfo {
     RecordTransactionInfo TransactionInfo[2];
     RecordTransactionInfo UploadRedectInfo;
     RecordTransactionInfo ReAuthComplete;
+    int TzOffset;
 } DcCommonInfo;
 
 #endif /* CONFIG_H_ */

+ 1 - 4
EVSE/Projects/DD360UCar/Apps/ModuleDoComm/DoComm.c

@@ -839,10 +839,7 @@ static int miscCommandHandle(uint8_t dataLen, uint8_t plugNum, uint8_t *data)
         case MISC_CMD_TIME_OFFSET:
             TimeZoneOffset = value;
             log_info("Time Zone Offset: %d", TimeZoneOffset);
-            if (TimeZoneOffset == 480) {
-                system("export TZ=CST-8");
-                log_info("Set Time Zone CST 8");
-            }
+            ShmDcCommonData->TzOffset = TimeZoneOffset;
             break;
         default:
             clearMiscCommand();

+ 10 - 4
EVSE/Projects/DD360UCar/Apps/ModuleLcmCtrl/Module_LcmControl.c

@@ -757,6 +757,7 @@ void ShowSummaryPage()
     float data;
     uint8_t value[10] = {0};
     char start_hr[3],start_min[3],end_hr[3],end_min[3];
+    int t_hr;
     pDcChargingInfo = (struct ChargingInfoData *)GetDcChargingInfoData(pSysInfo->CurGunSelected);
     // Show Money
     data = pDcChargingInfo->ChargingFee;
@@ -774,9 +775,16 @@ void ShowSummaryPage()
     GetMinFormTimeString(pDcChargingInfo->StartDateTime,start_min);
     GetHrFormTimeString(pDcChargingInfo->StopDateTime,end_hr);
     GetMinFormTimeString(pDcChargingInfo->StopDateTime,end_min);
-    ChangeDisplay2Value(_Summary_Start_time_hr, atoi(start_hr));
+
+    t_hr = atoi(start_hr) + (ShmDcCommonData->TzOffset / 60);
+    if (t_hr >= 24)
+        t_hr -= 24;
+    ChangeDisplay2Value(_Summary_Start_time_hr, t_hr);
     ChangeDisplay2Value(_Summary_Start_time_min, atoi(start_min));
-    ChangeDisplay2Value(_Summary_end_time_hr, atoi(end_hr));
+    t_hr = atoi(end_hr) + (ShmDcCommonData->TzOffset / 60);
+    if (t_hr >= 24)
+        t_hr -= 24;
+    ChangeDisplay2Value(_Summary_end_time_hr, t_hr);
     ChangeDisplay2Value(_Summary_end_time_min, atoi(end_min));
     /*
     DisplayValueToLcm(_Summary_Start_time_hr, (uint8_t *)start_hr, sizeof(start_hr));
@@ -1201,7 +1209,6 @@ int main(void)
     _totalCount = pSysConfig->TotalConnectorCount;
     _everyPageRollChange = 0;
     //Initialization();
-    system("export TZ=CST-8");
     //printf("_LCM_COMPLETE ");
     //ChangeToOtherPage(_LCM_COMPLETE);
     //return 0;
@@ -1215,7 +1222,6 @@ int main(void)
             ShmStatusCodeData->AlarmCode.AlarmEvents.bits.LcmModuleCommFail = true;
 
         } else {
-
             // Show Default Text
             if (!defaulttext) {
                 ShowCabientVersionDefaultText();

BIN
EVSE/Projects/DD360UCar/Images/ramdisk.gz


BIN
EVSE/Projects/DD360UCar/output/FactoryConfig


BIN
EVSE/Projects/DD360UCar/output/Module_ChkSysTask


BIN
EVSE/Projects/DD360UCar/output/Module_DoComm


BIN
EVSE/Projects/DD360UCar/output/Module_EvComm


BIN
EVSE/Projects/DD360UCar/output/Module_EventLogging


BIN
EVSE/Projects/DD360UCar/output/Module_InternalComm


BIN
EVSE/Projects/DD360UCar/output/Module_LcmControl


BIN
EVSE/Projects/DD360UCar/output/Module_PrimaryComm


BIN
EVSE/Projects/DD360UCar/output/Module_UpdateFW


BIN
EVSE/Projects/DD360UCar/output/ReadCmdline


BIN
EVSE/Projects/DD360UCar/output/main


BIN
EVSE/Projects/DD360UCar/output/simulation