www-thermferm/liveview.php

changeset 523
eca3813c21ee
parent 522
4d9ed666431d
child 529
00b45f2aaac3
equal deleted inserted replaced
522:4d9ed666431d 523:eca3813c21ee
147 $outstr .= ' caption: { value: \'Beer\', position: \'bottom\', offset: [0, 10] }'.PHP_EOL; 147 $outstr .= ' caption: { value: \'Beer\', position: \'bottom\', offset: [0, 10] }'.PHP_EOL;
148 $outstr .= ' });'.PHP_EOL; 148 $outstr .= ' });'.PHP_EOL;
149 } 149 }
150 150
151 if ("$chiller_state" == "OK") { 151 if ("$chiller_state" == "OK") {
152 $outstr .= ' $(\'#gaugeContainer_chiller'.$unr.'\').jqxLinearGauge({'.PHP_EOL; 152 $outstr .= ' $(\'#gaugeContainer_chiller'.$unr.'\').jqxGauge({'.PHP_EOL;
153 $outstr .= ' min: -20, max: 25, width: 100, height: 275,'.PHP_EOL; 153 $outstr .= ' min: -20, max: 25, width: 150, height: 150,'.PHP_EOL;
154 $outstr .= ' ranges: [{ startValue: -20, endValue: 0, style: { fill: \'#3399FF\', stroke: \'#3399FF\' }},'.PHP_EOL; 154 $outstr .= ' ranges: [{ startValue: -20, endValue: 0, startWidth: 5, endWidth: 5, style: { fill: \'#3399FF\', stroke: \'#3399FF\' }},'.PHP_EOL;
155 $outstr .= ' { startValue: 1, endValue: 25, style: { fill: \'#FC6A6A\', stroke: \'#FC6A6A\' }}],'.PHP_EOL; 155 $outstr .= ' { startValue: 0, endValue: 25, startWidth: 5, endWidth: 5, style: { fill: \'#FC6A6A\', stroke: \'#FC6A6A\' }}],'.PHP_EOL;
156 $outstr .= ' ticksMinor: { interval: 1, size: \'5%\' },'.PHP_EOL; 156 $outstr .= ' ticksMinor: { interval: 1, size: \'5%\' },'.PHP_EOL;
157 $outstr .= ' ticksMajor: { interval: 5, size: \'9%\' },'.PHP_EOL; 157 $outstr .= ' ticksMajor: { interval: 5, size: \'9%\' },'.PHP_EOL;
158 $outstr .= ' labels: { interval: 5, position: \'far\' },'.PHP_EOL; 158 $outstr .= ' labels: { interval: 5 },'.PHP_EOL;
159 $outstr .= ' value: '.$chiller_temperature.','.PHP_EOL; 159 $outstr .= ' value: '.$chiller_temperature.','.PHP_EOL;
160 $outstr .= ' ticksPosition: \'far\','.PHP_EOL; 160 $outstr .= ' colorScheme: \'scheme05\','.PHP_EOL;
161 $outstr .= ' colorScheme: \'scheme04\','.PHP_EOL; 161 $outstr .= ' animationDuration: 5000,'.PHP_EOL;
162 $outstr .= ' animationDuration: 1200'.PHP_EOL; 162 $outstr .= ' caption: { value: \'Chiller\', position: \'bottom\', offset: [0, 10] }'.PHP_EOL;
163 $outstr .= ' });'.PHP_EOL; 163 $outstr .= ' });'.PHP_EOL;
164 } 164 }
165 165
166 $outstr .= ' setInterval(function(){'.PHP_EOL; 166 $outstr .= ' setInterval(function(){'.PHP_EOL;
167 $outstr .= ' $.getJSON("getstate.php?uuid='.$unit.'", function(data) {'.PHP_EOL; 167 $outstr .= ' $.getJSON("getstate.php?uuid='.$unit.'", function(data) {'.PHP_EOL;
208 $outstr .= ' });'.PHP_EOL; 208 $outstr .= ' });'.PHP_EOL;
209 $outstr .= ' </script>'.PHP_EOL; 209 $outstr .= ' </script>'.PHP_EOL;
210 210
211 $outstr .= ' <div id="fermentor">'.PHP_EOL; 211 $outstr .= ' <div id="fermentor">'.PHP_EOL;
212 $outstr .= ' <div id="fermentor_thermometers">'.PHP_EOL; 212 $outstr .= ' <div id="fermentor_thermometers">'.PHP_EOL;
213 if ("$air_state" == "OK") { 213 if (("$air_state" == "OK") && ("$beer_state" == "OK") && ("$chiller_state" == "OK")) {
214 $outstr .= ' <div id="gaugeContainer_air'.$unr.'" style="float: left; margin-top: 10px; margin-left: 10px;"></div>'.PHP_EOL; 214 $outstr .= ' <div id="gaugeContainer_air'.$unr.'" style="float: left; margin-top: 10px; margin-left: 10px;"></div>'.PHP_EOL;
215 } 215 $outstr .= ' <div id="gaugeContainer_beer'.$unr.'" style="float: right; margin-top: 10px; margin-right: 10px;"></div>'.PHP_EOL;
216 if ("$beer_state" == "OK") { 216 $outstr .= ' <div id="gaugeContainer_chiller'.$unr.'" style="float: left; margin-top: 200px;"></div>'.PHP_EOL;
217 $outstr .= ' <div id="gaugeContainer_beer'.$unr.'" style="float: left; margin-top: 10px; margin-left: 10px;"></div>'.PHP_EOL; 217 } else if (("$air_state" == "OK") && ("$beer_state" == "OK")) {
218 } 218 $outstr .= ' <div id="gaugeContainer_air'.$unr.'" style="float: left; margin-top: 48px; margin-left: 48px;"></div>'.PHP_EOL;
219 if ("$chiller_state" == "OK") { 219 $outstr .= ' <div id="gaugeContainer_beer'.$unr.'" style="float: right; margin-top: 48px; margin-right: 48px;"></div>'.PHP_EOL;
220 $outstr .= ' <div id="gaugeContainer_chiller'.$unr.'" style="float: left; margin-top: 10px; margin-left: 10px;"></div>'.PHP_EOL; 220 } else if ("$air_state" == "OK") {
221 $outstr .= ' <div id="gaugeContainer_air'.$unr.'" style="margin-top: 48px; margin-left: 222px;"></div>'.PHP_EOL;
221 } 222 }
222 $outstr .= ' </div>'.PHP_EOL; 223 $outstr .= ' </div>'.PHP_EOL;
223 224
224 $outstr .= ' <div id="fermentor_panel_top">'.PHP_EOL; 225 $outstr .= ' <div id="fermentor_panel_top">'.PHP_EOL;
225 $outstr .= ' <div id="fermentor_selector">'.PHP_EOL; 226 $outstr .= ' <div id="fermentor_selector">'.PHP_EOL;

mercurial