Skip to content

Commit

Permalink
Merge pull request #2780 from benderl/bugfix
Browse files Browse the repository at this point in the history
minor layout fixes
  • Loading branch information
benderl authored Aug 18, 2023
2 parents dd1d8da + 960b477 commit f474397
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 93 deletions.
9 changes: 8 additions & 1 deletion web/display/minimal/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@
list($key, $value) = explode("=", $line, 2);
${$key."old"} = trim( $value, " '\t\n\r\0\x0B" ); // remove all garbage and single quotes
}
if ($lastmanagementold == "1") {
// filter local connections
$valid_evsecon = ["modbusevse", "daemon", "ipevse", "dac"];
if (!in_array($evsecons1old, $valid_evsecon)) {
$lastmanagementold = "0";
}
}
?>

<script src="display/minimal/gauge.js?ver=20230106"></script>
Expand Down Expand Up @@ -190,7 +197,7 @@ function checkTime(i) {
// functions for processing messages
'display/minimal/processAllMqttMsg.js?ver=20230204',
// functions performing mqtt and start mqtt-service
'display/minimal/setupMqttServices.js?ver=20221229',
'display/minimal/setupMqttServices.js?ver=20230818',
];

scriptsToLoad.forEach(function(src) {
Expand Down
17 changes: 11 additions & 6 deletions web/display/minimal/setupMqttServices.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,19 @@ var topicsToSubscribe = [
["openWB/lp/1/boolPlugStat", 1],
["openWB/lp/1/boolChargeStat", 1],
["openWB/lp/1/ChargePointEnabled", 1],
["openWB/lp/2/W", 1],
["openWB/lp/2/%Soc", 1],
["openWB/lp/2/boolSocConfigured"],
["openWB/lp/2/boolPlugStat", 1],
["openWB/lp/2/ChargePointEnabled", 1],
["openWB/lp/2/boolChargeStat", 1],
];

if (lastmanagementold == 1) {
topicsToSubscribe.push(
["openWB/lp/2/W", 1],
["openWB/lp/2/%Soc", 1],
["openWB/lp/2/boolSocConfigured"],
["openWB/lp/2/boolPlugStat", 1],
["openWB/lp/2/ChargePointEnabled", 1],
["openWB/lp/2/boolChargeStat", 1],
);
}

// holds number of topics flagged 1 initially
var countTopicsNotForPreloader = topicsToSubscribe.filter(row => row[1] === 1).length;

Expand Down
Loading

0 comments on commit f474397

Please sign in to comment.