Skip to content

Commit

Permalink
Fix charge property
Browse files Browse the repository at this point in the history
  • Loading branch information
GPlay97 committed Oct 31, 2020
1 parent dfc9734 commit 705070b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/logs.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const submitToLatestLog = asyncHandler(async (req, res, next) => {
const telemetryObj = req.body.telemetry || {};
const baseData = {
akey: req.headers.akey,
charge: telemetryObj.charging,
charge: parseInt(telemetryObj.charging) || 0,
startSOC: telemetryObj.soc_display || telemetryObj.soc_bms,
startODO: telemetryObj.odo,
startCEC: telemetryObj.cumulative_energy_charged,
Expand Down

0 comments on commit 705070b

Please sign in to comment.