From: Bernhard Tittelbach Date: Tue, 8 Oct 2013 03:57:56 +0000 (+0000) Subject: sensors in 768x1366 X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=1fd2e2eaf515f15a1a38a59d4259edf920b33c5d;p=svn42.git sensors in 768x1366 --- diff --git a/raspberry-kiosk/kiosk.css b/raspberry-kiosk/kiosk.css index 13d0dca..50a0d81 100644 --- a/raspberry-kiosk/kiosk.css +++ b/raspberry-kiosk/kiosk.css @@ -59,6 +59,7 @@ div.headerphoto2 { div.contentborder, div.calendar, div.sensorgraphs, +div.sensorgauges, div.gpluswall { display:block; @@ -116,6 +117,14 @@ div.sensorgraphs { margin-right:auto; } +div.sensorgauges { + text-align:center; + width:268px; + padding-bottom:1em; + margin-left:auto; + margin-right:auto; +} + table.status { width:397px; display:inline; diff --git a/raspberry-kiosk/kiosk.html b/raspberry-kiosk/kiosk.html index e396155..9313be9 100644 --- a/raspberry-kiosk/kiosk.html +++ b/raspberry-kiosk/kiosk.html @@ -40,7 +40,7 @@ - +
diff --git a/raspberry-kiosk/kiosk.js b/raspberry-kiosk/kiosk.js index bb69932..827861f 100644 --- a/raspberry-kiosk/kiosk.js +++ b/raspberry-kiosk/kiosk.js @@ -165,6 +165,18 @@ function loadCalendarMainPage() } +function drawGauge(targetelem, label, temp, options) { + var data = google.visualization.arrayToDataTable([["Label", "Value"],[label,temp]]); + // Create and draw the visualization. + if (targetelem) + { + options["width"] = targetelem.getAttribute("width"); + options["height"] = targetelem.getAttribute("height"); + var chart = new google.visualization.Gauge(targetelem); + chart.draw(data, options); + } +} + function writeAnwesenheitStatus(data) { var html=""; @@ -198,6 +210,7 @@ function writeAnwesenheitStatus(data) sensorstd+='Temperatur'; $.each( data.sensors.temperature, function(s, sensorobj) { sensorstd+='
'+sensorobj.location+': '+sensorobj.value.toFixed(2)+sensorobj.unit; + drawGauge(document.getElementById('tempgauge'), "Temp "+sensorobj.location, sensorobj.value, {redFrom: 33, redTo: 40, yellowFrom:29, yellowTo: 33, minorTicks: 4, min:0, max:40}); }); sensorstd+=''; } @@ -206,6 +219,7 @@ function writeAnwesenheitStatus(data) sensorstd+='Licht'; $.each( data.sensors.ext_illumination, function(s, sensorobj) { sensorstd+='
'+sensorobj.location+': '+sensorobj.value; + drawGauge(document.getElementById('lightgauge'), "Licht "+sensorobj.location, sensorobj.value, {redFrom: 950, redTo: 1024,yellowFrom:0, yellowTo: 200,minorTicks: 4, min:0, max:1024}); }); sensorstd+=''; } diff --git a/raspberry-kiosk/kiosk1.html b/raspberry-kiosk/kiosk1.html index 6a59db1..8c674d0 100644 --- a/raspberry-kiosk/kiosk1.html +++ b/raspberry-kiosk/kiosk1.html @@ -34,7 +34,7 @@
- +
diff --git a/raspberry-kiosk/kiosk768x1366.html b/raspberry-kiosk/kiosk768x1366.html index f1a4ea2..b11d22e 100644 --- a/raspberry-kiosk/kiosk768x1366.html +++ b/raspberry-kiosk/kiosk768x1366.html @@ -5,12 +5,15 @@ - + +
- +
@@ -19,10 +22,22 @@

Veranstaltungskalender

Kalendar lädt ...
+ + + +
+
+

Sensorwerte

+
Lädt ...
+
Lädt ...
+
+
+
+

Google+

Lädt ...
- +