Merge pull request #49 from vishwabmc/master

Supporting LED blink at user defined intervals
diff --git a/bin/Palmetto.py b/bin/Palmetto.py
index ee95999..7172364 100755
--- a/bin/Palmetto.py
+++ b/bin/Palmetto.py
@@ -19,7 +19,7 @@
 	'HOST_POWERED_ON',
 	'HOST_BOOTING',
 	'HOST_BOOTED',
-	'HOST_POWERED_DOWN',
+	'HOST_POWERED_OFF',
 ]
 
 EXIT_STATE_DEPEND = {
diff --git a/bin/hconsole b/bin/hconsole
index 7652dbc..0d2777c 100755
--- a/bin/hconsole
+++ b/bin/hconsole
@@ -2,6 +2,12 @@
 
 echo "Ctrl-a k  to exit console"
 echo "A session log is created in current directory"
+if screen -list | grep "hostconsole" | grep -q -i "Detached"; then
+  echo "You have an existing detached console session to host, you will be reconnected to that session"
+fi
+if screen -list | grep "hostconsole" | grep -q -i "Attached"; then
+  echo "You have an existing attached console session to host, you will be detached from that session and reconnected here instead"
+fi
 echo "[Enter] to continue"
 read a
-screen -U /dev/ttyS5
+screen -dR hostconsole -U /dev/ttyS5
diff --git a/objects/host_watchdog_obj.c b/objects/host_watchdog_obj.c
index e3da8cb..dbc4119 100644
--- a/objects/host_watchdog_obj.c
+++ b/objects/host_watchdog_obj.c
@@ -59,7 +59,7 @@
                 gpointer                user_data)

 {

   	remove_watchdog();

-  	watchdog_set_watchdog(wd,1);

+  	watchdog_set_watchdog(wd,0);

 	guint poll_interval = watchdog_get_poll_interval(wd);

     g_print("Starting watchdog with poll interval: %d\n", poll_interval);

   	watchdogid = g_timeout_add(poll_interval, poll_watchdog, user_data);