Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
Ensure configuration key have default settings values
Browse files Browse the repository at this point in the history
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
  • Loading branch information
Jérôme Benoit committed Mar 13, 2022
1 parent ae711c8 commit 00db15b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/charging-station/ChargingStation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -632,9 +632,9 @@ export default class ChargingStation {
reboot: false,
};
}
const readonly = options.readonly;
const visible = options.visible;
const reboot = options.reboot;
const readonly = options.readonly ?? false;
const visible = options.visible ?? true;
const reboot = options.reboot ?? false;
let keyFound = this.getConfigurationKey(key);
if (keyFound && params?.overwrite) {
this.deleteConfigurationKey(keyFound.key, { save: false });
Expand Down
2 changes: 1 addition & 1 deletion src/charging-station/ocpp/1.6/OCPP16ResponseService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default class OCPP16ResponseService extends OCPPResponseService {
this.chargingStation.addConfigurationKey(
OCPP16StandardParametersKey.HeartbeatInterval,
payload.interval.toString(),
{ visible: false, reboot: false },
{ visible: false },
{ overwrite: true, save: true }
);
this.chargingStation.heartbeatSetInterval
Expand Down

0 comments on commit 00db15b

Please sign in to comment.