Fixed Satation change bug.

Fixed a bug that caused an error when a master station was enabled and
station names or options were changed.
This commit is contained in:
Dan-in-CA 2013-10-10 13:48:50 -07:00
parent 8e1aa8afe0
commit 731c5aee00
3 changed files with 1033 additions and 1058 deletions

2071
ospi.py

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
Vars held in the settings dict (gv.sd), default values shown
??Vars held in the settings dict (gv.sd), default values shown
from controller values (cvalues):
en:1 enabled (operation)
@ -7,20 +7,20 @@ mm:0 manual mode (bool)
rbt:0 reboot (bool)
from options:
htp:8080 http port the program will run on
seq:1 sequential/concurrent operation
htp:8080 http port the program will use
seq:1 sequential/concurrent operation (bool)
sdt:0 station delay time
mton:0 master on delay
mtoff:0 master off delay
nbrd:1 number of boards
tz:16 time zone
urs:0 use rain sensor
rst:1 Rain sensor type (normaly open =1, dafault, or normaly closed = 0) - not used
wl:100 water level (percent adjustment to watering time)
urs:0 use rain sensor (bool)
rst:1 Rain sensor type (normaly open=1 (dafault), or normaly closed=0) - not used
wl:100 water level (percent adjustment of watering time)
mas:0 master station index
ipas:1 ignore passwprd (bool)
pwd:"b3BlbmRvb3I=" encoded password (default shown here)
loc:"" location (for weather - not used)
loc:"" location (for weather) - not used
rdst:0 rain delay stop time (unix time stamp)
rs:0 rain sensed
nopts:14 Number of optiions to be displayed
@ -38,4 +38,4 @@ nst:8 number of stations
for logging:
lg:0 log runs if = "checked"
lr:100 limit number of log records to keep, 0 = no limit
lr:30 limit number of log records to keep, 0 = no limit

View File

@ -10,6 +10,10 @@ function rst() {
var sid,sn;
for(sid=0;sid<sd['nbrd']*8;sid++) {
sn=sid+1;
console.log(sn)
if (document.getElementById("n"+sid)== null) {
continue;
}
document.getElementById("n"+sid).value="S"+(sn/10>>0)+(sn%10);
}
}