Added door and lights status leds.

Sat, 12 Jan 2019 20:18:54 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Sat, 12 Jan 2019 20:18:54 +0100
changeset 188
0ef62ec2d5b0
parent 187
77e00fcca24e
child 189
6470e5c6a001

Added door and lights status leds.

www/css/style.css file | annotate | diff | comparison | revisions
www/js/mon_fermenter.js file | annotate | diff | comparison | revisions
www/mon_fermenter.php file | annotate | diff | comparison | revisions
--- a/www/css/style.css	Sat Jan 12 19:57:29 2019 +0100
+++ b/www/css/style.css	Sat Jan 12 20:18:54 2019 +0100
@@ -103,12 +103,8 @@
 
 /*
  * +----------panel_top------------+
- * |+-------------++--------------+|
- * ||             ||   powerled   ||
- * ||  selector   |+--------------+|
- * ||             |+--------------+|
- * ||             || mode control ||
- * |+-------------++--------------+|
+ * |  door light alarm power LEDs  |
+ * |                               |
  * +-------------------------------+
  * +---------panel_display---------+
  * |+-------------++--------------+|
@@ -138,29 +134,16 @@
   border-radius: 5px 5px 5px 5px;
 }
 
-#fermenter_selector {
-  width: 100px;
-  height: 198px;
-  margin-top: 3px;
+#fermenter_doorled,
+#fermenter_lightled,
+#fermenter_alarmled,
+#fermenter_powerled {
+  width: 50px;
+  height: 30px;
   float: left;
-}
-
-#fermenter_alarmled {
-width: 50px;
-height: 30px;
-float: left;
-text-align: center;
-margin-top: 10px;
-margin-left: 20px;
-}
-
-#fermenter_powerled {
-width: 50px;
-height: 30px;
-float: left;
-text-align: center;
-margin-top: 10px;
-margin-left: 42px;
+  text-align: center;
+  margin-top: 10px;
+  margin-left: 20px;
 }
 
 
--- a/www/js/mon_fermenter.js	Sat Jan 12 19:57:29 2019 +0100
+++ b/www/js/mon_fermenter.js	Sat Jan 12 20:18:54 2019 +0100
@@ -264,6 +264,17 @@
 				$("#target_hi").jqxNumberInput({ readOnly: true, Width: 50, spinButtons: false });
 			}
 
+			if (record.online && (record.door_state != "0")) {
+				$("#fermenter_doorled").html('<div class="LEDyellow_on"></div>Door');
+			} else {
+				$("#fermenter_doorled").html('<div class="LEDyellow_off"></div>Door');
+			}
+			if (record.online && (record.light_state != "0")) {
+				$("#fermenter_lightled").html('<div class="LEDyellow_on"></div>Light');
+			} else {
+				$("#fermenter_lightled").html('<div class="LEDyellow_off"></div>Light');
+			}
+
 			if (record.online && (record.mode != "OFF")) {
 				$("#fermenter_powerled").html('<div class="LEDblue_on"></div>Power');
 				$("#select_beer").jqxDropDownList({ disabled: true });
--- a/www/mon_fermenter.php	Sat Jan 12 19:57:29 2019 +0100
+++ b/www/mon_fermenter.php	Sat Jan 12 20:18:54 2019 +0100
@@ -28,8 +28,8 @@
 
     <div style="float: right; width: 295px;">
      <div id="fermenter_panel_top">
-      <div id="fermenter_selector">
-      </div>
+      <div id="fermenter_doorled"></div>
+      <div id="fermenter_lightled"></div>
       <div id="fermenter_alarmled"></div>
       <div id="fermenter_powerled"></div>
      </div> <!-- fermenter_panel_top -->

mercurial