summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeija <norrepli@gmail.com>2012-08-08 20:33:14 +0200
committerJeija <norrepli@gmail.com>2012-08-08 20:33:14 +0200
commit7ed60c75b90fdc89d0b10bc885e5178d61e61062 (patch)
tree098b3415c2284d8dc9435880a1477b0d0cba5718
parentf701dad7393c0db47177ce58244a8d7aa727c54f (diff)
downloadmesecons-7ed60c75b90fdc89d0b10bc885e5178d61e61062.tar
mesecons-7ed60c75b90fdc89d0b10bc885e5178d61e61062.tar.gz
mesecons-7ed60c75b90fdc89d0b10bc885e5178d61e61062.tar.bz2
mesecons-7ed60c75b90fdc89d0b10bc885e5178d61e61062.tar.xz
mesecons-7ed60c75b90fdc89d0b10bc885e5178d61e61062.zip
Bugfix for the battery: Use receptor_on/off
-rw-r--r--mesecons_battery/init.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/mesecons_battery/init.lua b/mesecons_battery/init.lua
index f87ca6d..beddb4c 100644
--- a/mesecons_battery/init.lua
+++ b/mesecons_battery/init.lua
@@ -97,6 +97,7 @@ nodenames = {"mesecons_battery:battery_charging_1", "mesecons_battery:battery_ch
batterystate = batterystate + 1
else
node.name=string.gsub(node.name, "charging", "discharging")
+ mesecon:receptor_on(pos)
end
if string.find(node.name, tostring(math.ceil(batterystate/20))) == nil then
@@ -122,6 +123,7 @@ nodenames = {"mesecons_battery:battery_discharging_1", "mesecons_battery:battery
batterystate = batterystate - 1
else
node.name=string.gsub(node.name, "discharging", "charging")
+ mesecon:receptor_off(pos)
end
if string.find(node.name, tostring(math.ceil(batterystate/20))) == nil then