From 1303c7f39c847a84c5bf31de9749c6dbcda4c4d1 Mon Sep 17 00:00:00 2001 From: Mike Beattie Date: Thu, 22 Mar 2012 18:07:25 +1300 Subject: 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 --- HouseControl.ino | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3