summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Beattie <mike@ethernal.org>2012-03-22 18:07:25 +1300
committerMike Beattie <mike@ethernal.org>2012-03-22 18:07:25 +1300
commit1303c7f39c847a84c5bf31de9749c6dbcda4c4d1 (patch)
treee068ae1704e376f93691c9fabc15cfa3753f298a
parent79279aa73a15010c036546f1750eb2b2b4ef7840 (diff)
Configuration updates
* Add Dawn/Dusk hours (garage door auto close) * space out ntpServer initialisation more neatly * init dawn/dusk * Set config version. Signed-off-by: Mike Beattie <mike@ethernal.org>
-rw-r--r--HouseControl.ino10
1 files changed, 9 insertions, 1 deletions
diff --git a/HouseControl.ino b/HouseControl.ino
index efc5f45..5638cfa 100644
--- a/HouseControl.ino
+++ b/HouseControl.ino
@@ -49,6 +49,9 @@ struct st_config {
byte notifyHost[4];
unsigned int notifyPort;
+
+ byte dawn;
+ byte dusk;
};
struct st_door {
@@ -341,6 +344,8 @@ void toggleDoorControl(struct st_door *door) {
void setup() {
#if RECONFIGURE
+ config.configVersion = 3;
+
config.mac[0] = 0x00;
config.mac[1] = 0xA5;
config.mac[2] = 0xCB;
@@ -365,9 +370,12 @@ void setup() {
config.ntpServer[0] = 10;
config.ntpServer[1] = 113;
- config.ntpServer[2] = config.ntpServer[3] = 1;
+ config.ntpServer[2] = 1;
+ config.ntpServer[3] = 1;
config.UTC_offset = 1300;
+ config.dawn = 7;
+ config.dusk = 21;
eepromWrite(0, config);
#endif