Skip to content

Commit

Permalink
Merge pull request snaptec#2320 from benderl/bugfix
Browse files Browse the repository at this point in the history
fix energy charged
  • Loading branch information
benderl authored Jul 22, 2022
2 parents 6a05750 + 62a52d8 commit 295784e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ladelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ processChargepoint(){
gelr=$(echo "scale=0;$bishergeladen * 100 / ${!averageConsumptionVariableName}" |bc)
echo "$gelr" > "${RAMDISKDIR}/gelr${chargePointKey}"
# calculate time remaining if energy limit is set
energyChargeLimitVariableName="lademkwh$chargePointKey"
energyChargeLimitVariableName="lademkwh$chargePointKey2"
restzeit=$(echo "scale=0;(${!energyChargeLimitVariableName} - $bishergeladen) * 1000 * 60 / $ladeleistung" |bc)
echo "$restzeit" > "${RAMDISKDIR}/restzeit${chargePointKey}m"
# format time charged
Expand Down
2 changes: 1 addition & 1 deletion runs/initRamdisk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ initRamdisk(){
echo 0 > $RamdiskPath/llv3lp6
echo 0 > $RamdiskPath/llv3lp7
echo 0 > $RamdiskPath/llv3lp8
echo 0 > $RamdiskPath/pluggedladungbishergeladen
echo 0 > $RamdiskPath/pluggedladungbishergeladenlp1
echo 0 > $RamdiskPath/pluggedladungbishergeladenlp2
echo 0 > $RamdiskPath/pluggedladungbishergeladenlp3
echo 0 > $RamdiskPath/pluggedladungbishergeladenlp4
Expand Down
2 changes: 1 addition & 1 deletion runs/pubmqtt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ mqttvar["lp/5/boolChargeStat"]=chargestatlp5
mqttvar["lp/6/boolChargeStat"]=chargestatlp6
mqttvar["lp/7/boolChargeStat"]=chargestatlp7
mqttvar["lp/8/boolChargeStat"]=chargestatlp8
mqttvar["lp/1/kWhChargedSincePlugged"]=pluggedladungbishergeladen
mqttvar["lp/1/kWhChargedSincePlugged"]=pluggedladungbishergeladenlp1
mqttvar["lp/2/kWhChargedSincePlugged"]=pluggedladungbishergeladenlp2
mqttvar["lp/3/kWhChargedSincePlugged"]=pluggedladungbishergeladenlp3
mqttvar["lp/4/kWhChargedSincePlugged"]=pluggedladungbishergeladenlp4
Expand Down
2 changes: 1 addition & 1 deletion slavemode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ function endChargeAndAbortOnChargeLimits() {
local energyChargedSincePlugin=0

if (( chargePoint == 1 )); then
energyChargedSincePlugin=$(<"ramdisk/pluggedladungbishergeladen")
energyChargedSincePlugin=$(<"ramdisk/pluggedladungbishergeladenlp1")
elif (( chargePoint == 2 )); then
energyChargedSincePlugin=$(<"ramdisk/pluggedladungbishergeladenlp2")
elif (( chargePoint == 3 )); then
Expand Down

0 comments on commit 295784e

Please sign in to comment.