firmware: reset with manual keys
authorrealraum <realraum@realraum.at>
Mon, 11 May 2009 18:04:54 +0000 (18:04 +0000)
committerrealraum <realraum@realraum.at>
Mon, 11 May 2009 18:04:54 +0000 (18:04 +0000)
door_daemon: updated status side

door_daemon.py
firmware/tuer.pde

index 7453238..60d0cb2 100755 (executable)
@@ -14,8 +14,8 @@ logging.basicConfig(level=logging.INFO,filename='/var/log/tuer.log',format="%(as
 
 class StatusDisplay():
   def __init__(self):
-    self.url_open = 'https://www.realraum.at/cgi/status.cgi?pass=jako16&set=%3Chtml%3E%3Cbody%20bgcolor=%22lime%22%3E%3Ch3%3E%3Ccenter%3ETuer%20ist%20Offen%3C/center%3E%3C/h3%3E%3C/body%3E%3C/html%3E';
-    self.url_closed = 'https://www.realraum.at/cgi/status.cgi?pass=jako16&set=%3Chtml%3E%3Cbody%20bgcolor=%22red%22%3E%3Ch3%3E%3Ccenter%3ETuer%20ist%20Geschlossen%3C/center%3E%3C/h3%3E%3C/body%3E%3C/html%3E';
+    self.url_open = 'https://www.realraum.at/cgi/status.cgi?pass=jako16&set=%3Chtml%3E%3Cbody%20bgcolor=%22lime%22%3E%3Ccenter%3E%3Cb%3ET%26uuml%3Br%20ist%20Offen%3C/b%3E%3C/center%3E%3C/body%3E%3C/html%3E'
+    self.url_closed = 'https://www.realraum.at/cgi/status.cgi?pass=jako16&set=%3Chtml%3E%3Cbody%20bgcolor=%22red%22%3E%3Cb%3E%3Ccenter%3ET%26uuml%3Br%20ist%20Geschlossen%3C/center%3E%3C/b%3E%3C/body%3E%3C/html%3E'
     self.last_status_set=""
     #object.__init__(self)
     
index d2c7a09..6c966a2 100644 (file)
@@ -571,11 +571,11 @@ void loop()
     else
       Serial.println("Error: unknown command");
   }
-  if(manual_open() && !is_opened() && current_state == IDLE) {
+  if(manual_open() && !is_opened() && (current_state == IDLE || current_state == ERROR)) {
     Serial.println("open forced manually");
     start_open();
   }
-  if(manual_close() && !is_closed() && current_state == IDLE) {
+  if(manual_close() && !is_closed() && (current_state == IDLE || current_state == ERROR)) {
     Serial.println("close forced manually");
     start_close();
   }