[fsync] include phase information when updating sensor info to the server

This commit is contained in:
Bart Van Der Meerssche 2011-04-26 10:25:14 +02:00
parent 52959b11be
commit 997dbc4071
1 changed files with 9 additions and 0 deletions

View File

@ -407,6 +407,15 @@ local function phone_home()
config["constant"] = tonumber(flukso[i]["constant"]) config["constant"] = tonumber(flukso[i]["constant"])
config["enable"] = tonumber(flukso[i]["enable"]) config["enable"] = tonumber(flukso[i]["enable"])
if config["class"] == "analog" then
local phase = tonumber(flukso.main.phase)
if phase == 1 or
phase == 3 and i == "1" then
config["phase"] = phase
end
end
return luci.json.encode{ config = config } return luci.json.encode{ config = config }
end end