diff options
author | Mike Beattie <mike@ethernal.org> | 2012-03-22 23:02:32 +1300 |
---|---|---|
committer | Mike Beattie <mike@ethernal.org> | 2012-03-22 23:02:32 +1300 |
commit | 8749985e7acc57a373132568700c855dff06fbdd (patch) | |
tree | 2f7652a7f0d6f5403c7804adfd00e0a82436549b /HouseControl.ino | |
parent | bbcdb10933e35b4582985ee484381aeb6ccb42cb (diff) |
Add commented debug handler
Signed-off-by: Mike Beattie <mike@ethernal.org>
Diffstat (limited to 'HouseControl.ino')
-rw-r--r-- | HouseControl.ino | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/HouseControl.ino b/HouseControl.ino index e8b0841..4a9c700 100644 --- a/HouseControl.ino +++ b/HouseControl.ino @@ -331,6 +331,22 @@ void configSetHandler(WebServer &server, WebServer::ConnectionType type, char *u return; } +/*void debugHandler(WebServer &server, WebServer::ConnectionType type, char *url_tail, bool tail_complete) { + server.httpSuccess("text/plain"); + if (type == WebServer::GET) { + sprintf((char*)buf1, "Time Now: %d/%d/%d %02d:%02d:%02d\n\0", day(time), month(time), year(time), hour(time), minute(time), second(time)); + server.print((char*)buf1); + sprintf((char*)buf1, "Last NTP: %d/%d/%d %02d:%02d:%02d\n\nPacket:\n\0", day(lastNTPtime), month(lastNTPtime), year(lastNTPtime), hour(lastNTPtime), minute(lastNTPtime), second(lastNTPtime)); + server.print((char*)buf1); + + for (int i = 0; i < 48; i++) { + sprintf((char*)buf1, "%02X \0", pb[i]); + server.print((char*)buf1); + } + } +} +*/ + /*********************************************************************************/ /* Miscellaneous functions */ @@ -407,6 +423,8 @@ void setup() { httpServer.addCommand("config/get", &configGetHandler); httpServer.addCommand("config/set", &configSetHandler); +// httpServer.addCommand("debug", &debugHandler); + httpServer.begin(); setupDoor(&frontDoor, FDOOR_STRIKE, FDOOR_CLOSED, 255); |