Browse Source

Merge pull request #2013 from mcspr/web/sch-init-order

Since relayState is no longer in the same obj as relayConfig, init relays when matching relayConfig.
Also a small update to the scheduler (...which needs more cleanup...), fix getSetting("schType", i, 0) when sending ws data
master
Max Prokhorov 5 years ago
committed by GitHub
parent
commit
960b32cd93
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 9120 additions and 9120 deletions
  1. BIN
      code/espurna/data/index.all.html.gz
  2. BIN
      code/espurna/data/index.light.html.gz
  3. BIN
      code/espurna/data/index.lightfox.html.gz
  4. BIN
      code/espurna/data/index.rfbridge.html.gz
  5. BIN
      code/espurna/data/index.rfm69.html.gz
  6. BIN
      code/espurna/data/index.sensor.html.gz
  7. BIN
      code/espurna/data/index.small.html.gz
  8. BIN
      code/espurna/data/index.thermostat.html.gz
  9. +1
    -1
      code/espurna/scheduler.ino
  10. +524
    -524
      code/espurna/static/index.all.html.gz.h
  11. +509
    -509
      code/espurna/static/index.light.html.gz.h
  12. +1054
    -1054
      code/espurna/static/index.lightfox.html.gz.h
  13. +1157
    -1157
      code/espurna/static/index.rfbridge.html.gz.h
  14. +2459
    -2459
      code/espurna/static/index.rfm69.html.gz.h
  15. +1209
    -1209
      code/espurna/static/index.sensor.html.gz.h
  16. +1054
    -1054
      code/espurna/static/index.small.html.gz.h
  17. +1147
    -1147
      code/espurna/static/index.thermostat.html.gz.h
  18. +6
    -6
      code/html/custom.js

BIN
code/espurna/data/index.all.html.gz View File


BIN
code/espurna/data/index.light.html.gz View File


BIN
code/espurna/data/index.lightfox.html.gz View File


BIN
code/espurna/data/index.rfbridge.html.gz View File


BIN
code/espurna/data/index.rfm69.html.gz View File


BIN
code/espurna/data/index.sensor.html.gz View File


BIN
code/espurna/data/index.small.html.gz View File


BIN
code/espurna/data/index.thermostat.html.gz View File


+ 1
- 1
code/espurna/scheduler.ino View File

@ -55,7 +55,7 @@ void _schWebSocketOnConnected(JsonObject &root){
switch_.add(getSetting("schSwitch", i, 0).toInt()); switch_.add(getSetting("schSwitch", i, 0).toInt());
action.add(getSetting("schAction", i, 0).toInt()); action.add(getSetting("schAction", i, 0).toInt());
type.add(getSetting("schType", i, 0).toInt());
type.add(getSetting("schType", i, SCHEDULER_TYPE_SWITCH).toInt());
hour.add(getSetting("schHour", i, 0).toInt()); hour.add(getSetting("schHour", i, 0).toInt());
minute.add(getSetting("schMinute", i, 0).toInt()); minute.add(getSetting("schMinute", i, 0).toInt());
weekdays.add(getSetting("schWDs", i, SCHEDULER_WEEKDAYS)); weekdays.add(getSetting("schWDs", i, SCHEDULER_WEEKDAYS));


+ 524
- 524
code/espurna/static/index.all.html.gz.h
File diff suppressed because it is too large
View File


+ 509
- 509
code/espurna/static/index.light.html.gz.h
File diff suppressed because it is too large
View File


+ 1054
- 1054
code/espurna/static/index.lightfox.html.gz.h
File diff suppressed because it is too large
View File


+ 1157
- 1157
code/espurna/static/index.rfbridge.html.gz.h
File diff suppressed because it is too large
View File


+ 2459
- 2459
code/espurna/static/index.rfm69.html.gz.h
File diff suppressed because it is too large
View File


+ 1209
- 1209
code/espurna/static/index.sensor.html.gz.h
File diff suppressed because it is too large
View File


+ 1054
- 1054
code/espurna/static/index.small.html.gz.h
File diff suppressed because it is too large
View File


+ 1147
- 1147
code/espurna/static/index.thermostat.html.gz.h
File diff suppressed because it is too large
View File


+ 6
- 6
code/html/custom.js View File

@ -983,8 +983,7 @@ function addSchedule(event) {
var type = (1 === event.data.schType) ? "switch" : "light"; var type = (1 === event.data.schType) ? "switch" : "light";
template = $("#" + type + "ActionTemplate").children(); template = $("#" + type + "ActionTemplate").children();
var actionLine = template.clone();
$(line).find("#schActionDiv").append(actionLine);
$(line).find("#schActionDiv").append(template.clone());
$(line).find("input").each(function() { $(line).find("input").each(function() {
$(this).attr("tabindex", tabindex); $(this).attr("tabindex", tabindex);
@ -1028,10 +1027,6 @@ function initRelays(data) {
$("label.toggle", line).prop("for", "relay" + i) $("label.toggle", line).prop("for", "relay" + i)
line.appendTo("#relays"); line.appendTo("#relays");
// Populate the relay SELECTs
$("select.isrelay").append(
$("<option></option>").attr("value",i).text("Switch #" + i));
} }
} }
@ -1096,6 +1091,11 @@ function initRelayConfig(data) {
} }
line.appendTo("#relayConfig"); line.appendTo("#relayConfig");
// Populate the relay SELECTs
$("select.isrelay").append(
$("<option></option>").attr("value",i).text("Switch #" + i));
} }
} }


Loading…
Cancel
Save