Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
bnystrom committed Dec 2, 2024
2 parents ebd01f3 + 3937720 commit da722b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ocpp/ocpp-cp-json.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
cmddata: { value: "", required: false},
log: { value: false, required: true },
pathlog: {value: "", required: false},
wsdelayconnect: {value: true, required: true},
wsdelayconnect: {value: false, required: true},
wstomin: {value: 5, required: false},
wstomax: {value: 360, required: false},
wstoinc: {value: 5, required: false}
Expand Down
4 changes: 2 additions & 2 deletions ocpp/ocpp-cp-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module.exports = function(RED) {
this.logging = config.log || false;
this.pathlog = config.pathlog;

this.auto_connect = config.wsdelayconnect || false;
this.delay_auto_connect = config.wsdelayconnect || false;
this.wstomin = (isNaN(Number.parseInt(config.wstomin))) ? WSTOMIN_DEF : Number.parseInt(config.wstomin);
let _wstomax = (isNaN(Number.parseInt(config.wstomax))) ? WSTOMAX_DEF : Number.parseInt(config.wstomax);
this.wstomax = parseInt((_wstomax >= this.wstomin)? _wstomax : this.wstomin);
Expand Down Expand Up @@ -308,7 +308,7 @@ module.exports = function(RED) {

// Only do this if auto-connect is enabled
//
if (node.auto_connect && csmsURL){
if (!(node.delay_auto_connect) && csmsURL){
node.status({fill: 'blue', shape: 'dot', text: `Connecting...`});
wsConnect();
}
Expand Down

0 comments on commit da722b2

Please sign in to comment.