# HG changeset patch # User Michiel Broek # Date 1405624762 -7200 # Node ID cf3f906ffe0dd28c00f43141c7a48de6ddbbe2ad # Parent d82c5499285cb6fda5b25b2cc494a30b232147b9 Created control panel layout diff -r d82c5499285c -r cf3f906ffe0d www-thermferm/css/style.css --- a/www-thermferm/css/style.css Wed Jul 16 13:42:14 2014 +0200 +++ b/www-thermferm/css/style.css Thu Jul 17 21:19:22 2014 +0200 @@ -93,15 +93,88 @@ float: left; } +#fermentor_panel { + width: 240px; + height: 270px; + float: left; + background-color: #f0f0f0; +} + +#fermentor_selector { + width: 160px; + height: 160px; + float: left; +} + +#fermentor_powerled { + width: 80px; + height: 160px; + float: left; +} + +#fermentor_display1 { + width: 80px; + height: 40px; + float: left; +} + +#fermentor_display2 { + width: 80px; + height: 40px; + float: left; +} + +#fermentor_display3 { + width: 80px; + height: 40px; + float: left; +} + +#fermentor_led1 { + width: 80px; + height: 40px; + float: left; +} + +#fermentor_led2 { + width: 80px; + height: 40px; + float: left; +} + +#fermentor_led3 { + width: 80px; + height: 40px; + float: left; +} + +#fermentor_toggle1 { + width: 80px; + height: 40px; + float: left; +} + +#fermentor_toggle2 { + width: 80px; + height: 40px; + float: left; +} + +#fermentor_toggle3 { + width: 80px; + height: 40px; + float: left; +} + #fermentor_control { width: 240px; - height: 300px; + height: 40px; float: right; } #fermentor_edit { width: 240px; - height: 50px; + height: 40px; float: right; } diff -r d82c5499285c -r cf3f906ffe0d www-thermferm/index.php --- a/www-thermferm/index.php Wed Jul 16 13:42:14 2014 +0200 +++ b/www-thermferm/index.php Thu Jul 17 21:19:22 2014 +0200 @@ -31,6 +31,7 @@ $outstr .= ' '.PHP_EOL; $outstr .= ' ThermFerm monitor'.PHP_EOL; $outstr .= ' '.PHP_EOL; +$outstr .= ' '.PHP_EOL; $outstr .= ' '.PHP_EOL; $outstr .= ' '.PHP_EOL; $outstr .= '
'.PHP_EOL; @@ -45,6 +46,8 @@ $outstr .= liveview(); $outstr .= '
'.PHP_EOL; $outstr .= ' '.PHP_EOL; +$outstr .= ' '.PHP_EOL; +//$outstr .= ' '.PHP_EOL; $outstr .= ' '.PHP_EOL; $outstr .= ''.PHP_EOL; diff -r d82c5499285c -r cf3f906ffe0d www-thermferm/liveview.php --- a/www-thermferm/liveview.php Wed Jul 16 13:42:14 2014 +0200 +++ b/www-thermferm/liveview.php Thu Jul 17 21:19:22 2014 +0200 @@ -26,7 +26,7 @@ -function showunit($unit) +function showunit($unit, $unr) { $outstr = ''; $air_state = $beer_state = 1; @@ -79,30 +79,60 @@ $outstr .= '
'.PHP_EOL; $outstr .= ' '.PHP_EOL; $outstr .= '
'.PHP_EOL; - $outstr .= '
'.PHP_EOL; } if (strcmp($vals[0], "MODE") == 0) { - $outstr .= ' mode ' . $vals[1] . '
' .PHP_EOL; + $mode = $vals[1]; } if (strcmp($vals[0], "AIR_STATE") == 0) { $air_state = $vals[1]; } if (strcmp($vals[0], "AIR_TEMPERATURE") == 0) { if ($air_state == 0) - $outstr .= ' air temperature ' . $vals[1] . '
' .PHP_EOL; + $air_temperature = $vals[1]; else - $outstr .= ' air temperature N/A
' .PHP_EOL; + $air_temperature = "N/A"; } if (strcmp($vals[0], "BEER_STATE") == 0) { $beer_state = $vals[1]; } if (strcmp($vals[0], "BEER_TEMPERATURE") == 0) { if ($beer_state == 0) - $outstr .= ' beer temperature ' . $vals[1] . '
' .PHP_EOL; + $beer_temperature = $vals[1]; else - $outstr .= ' beer temperature N/A
' .PHP_EOL; + $beer_temperature = "N/A"; } } + $outstr .= '
'.PHP_EOL; + $outstr .= '
'.PHP_EOL; + $outstr .= ' Mode '.$mode.PHP_EOL; + $outstr .= '
'.PHP_EOL; + $outstr .= '
'.PHP_EOL; + $outstr .= '
'.PHP_EOL; + $outstr .= '
'.PHP_EOL; + $outstr .= '
'.PHP_EOL; + $outstr .= '
'.PHP_EOL; + $outstr .= ' Air
'.$air_temperature.PHP_EOL; + $outstr .= '
'.PHP_EOL; + $outstr .= '
'.PHP_EOL; + $outstr .= ' Beer
'.$beer_temperature.PHP_EOL; + $outstr .= '
'.PHP_EOL; + $outstr .= '
'.PHP_EOL; + $outstr .= '
'.PHP_EOL; + $outstr .= '
'.PHP_EOL; + $outstr .= '
'.PHP_EOL; + $outstr .= '
'.PHP_EOL; + $outstr .= '
'.PHP_EOL; + $outstr .= '
'.PHP_EOL; + $outstr .= '
'.PHP_EOL; + $outstr .= '
'.PHP_EOL; + $outstr .= '
'.PHP_EOL; + $outstr .= '
'.PHP_EOL; + $outstr .= '
'.PHP_EOL; + $outstr .= '
'.PHP_EOL; + $outstr .= '
'.PHP_EOL; +// $outstr .= ' mode ' . $mode . '
' .PHP_EOL; +// $outstr .= ' air temperature ' . $air_temperature . '
' .PHP_EOL; +// $outstr .= ' beer temperature ' . $beer_temperature . '
' .PHP_EOL; $outstr .= '
'.PHP_EOL; $outstr .= '
'.PHP_EOL; $outstr .= ' '.PHP_EOL; @@ -142,7 +172,7 @@ if (strcmp($arr[$i], ".") == 0) break; $parts = explode(",", $arr[$i]); - $outstr .= showunit($parts[1]); + $outstr .= showunit($parts[1], $i); $i++; } }