|
@@ -1209,6 +1209,7 @@ int getReceiptInfo(uint8_t gun_index, char *receiptInfo)
|
|
|
|
|
|
json_object_object_add(receiptDetail, "hour", json_object_new_int(idxHour));
|
|
|
json_object_object_add(receiptDetail, "chargedEnergy", json_object_new_double(ShmCharger->gun_info[gun_index].presentChargedEnergyPeriod[idxHour]));
|
|
|
+ json_object_object_add(receiptDetail, "unitPrice", json_object_new_double(ShmSysConfigAndInfo->SysConfig.BillingData.Fee[idxHour]));
|
|
|
json_object_object_add(receiptDetail, "periodPrice", json_object_new_double(ShmCharger->gun_info[gun_index].presentChargedEnergyPeriod[idxHour]*ShmSysConfigAndInfo->SysConfig.BillingData.Fee[idxHour]));
|
|
|
|
|
|
totalEnergy += ShmCharger->gun_info[gun_index].presentChargedEnergyPeriod[idxHour];
|
|
@@ -1447,7 +1448,7 @@ int DB_Update_Record_Buf(sqlite3 *db, int gun_index)
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- DEBUG_INFO( "Delete local charging record buffer successfully\n");
|
|
|
+ //DEBUG_INFO( "Delete local charging record buffer successfully\n");
|
|
|
}
|
|
|
|
|
|
// Insert record buffer
|
|
@@ -1458,7 +1459,7 @@ int DB_Update_Record_Buf(sqlite3 *db, int gun_index)
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- DEBUG_INFO( "Insert local charging record buffer successfully\n");
|
|
|
+ //DEBUG_INFO( "Insert local charging record buffer successfully\n");
|
|
|
}
|
|
|
|
|
|
sqlite3_close(db);
|
|
@@ -5329,11 +5330,11 @@ int main(void)
|
|
|
// Debug information
|
|
|
if(DiffTimebWithNow(startTime[gun_index][TMR_IDX_LOGPPRINTOUT]) > TIMEOUT_SPEC_LOGPPRINTOUT)
|
|
|
{
|
|
|
- DEBUG_INFO("===============================================================\n");
|
|
|
+ DEBUG_INFO("==============================================================\n");
|
|
|
DEBUG_INFO("ShmSysConfigAndInfo->SysConfig.MaxChargingCurrent: %d \n", ShmSysConfigAndInfo->SysConfig.MaxChargingCurrent);
|
|
|
DEBUG_INFO("ShmCharger->gun_info[%d].primaryMcuCp_Pwn_Duty.max_current: %d\n", gun_index, ShmCharger->gun_info[gun_index].primaryMcuCp_Pwn_Duty.max_current);
|
|
|
DEBUG_INFO("ShmCharger->gun_info[%d].targetCurrent: %d\n", gun_index, ShmCharger->gun_info[gun_index].targetCurrent);
|
|
|
- DEBUG_INFO("===============================================================\n");
|
|
|
+ DEBUG_INFO("==============================================================\n");
|
|
|
ftime(&startTime[gun_index][TMR_IDX_LOGPPRINTOUT]);
|
|
|
|
|
|
getDateTimeString((char*)ShmSysConfigAndInfo->SysInfo.AcChargingData[gun_index].StopDateTime);
|