diff options
author | Mike Beattie <mike@ethernal.org> | 2012-03-22 18:27:26 +1300 |
---|---|---|
committer | Mike Beattie <mike@ethernal.org> | 2012-03-22 18:27:26 +1300 |
commit | c4133319bdea3aeec494b90edf7e9f26b875e0b5 (patch) | |
tree | 15b1b91ff723e65649d7489fe3fd02fbb10a6796 | |
parent | 38f52e440655f1617f236065567169fabe53b230 (diff) |
move config init to variable declaration (cleaner)
Signed-off-by: Mike Beattie <mike@ethernal.org>
-rw-r--r-- | HouseControl.ino | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/HouseControl.ino b/HouseControl.ino index a8f7650..bd15c57 100644 --- a/HouseControl.ino +++ b/HouseControl.ino @@ -72,7 +72,29 @@ struct st_door { time_t time; time_t blinkTime = 0; -struct st_config config; +struct st_config config = { + // Config version. Set to 0 to debug (doesn't read from eeprom) + //5, + 0, + + // Ethernet MAC address + 0x00, 0xA5, 0xCB, 0x28, 0xF4, 0xCC, // "Production" + //0x00, 0xA5, 0xCB, 0x28, 0xF4, 0xCD, // "Testing" + + 10, 113, 1, 160, // Default IP if no DHCP + 255, 255, 255, 0, // Default Netmask if no DHCP + 10, 113, 1, 254, // Default GW if no DHCP + + 10, 113, 1, 1, // NTP Server + 1300, // UTC offset + + 10, 113, 1, 255, // Host to send UDP status packets to + 8888, // Port to send UDP status packets to + + 7, // "Dawn" + 21 // "Dusk" - used to shut garage doors at night. + +}; struct st_door frontDoor; struct st_door garageDoor1; @@ -405,6 +427,7 @@ void toggleDoorControl(struct st_door *door) { void setup() { byte eepromVersion; +/* config.configVersion = 3; config.mac[0] = 0x00; @@ -437,6 +460,7 @@ void setup() { config.dawn = 7; config.dusk = 21; +*/ eepromRead(0, eepromVersion); |