--- a/www-thermferm/simulator.php Wed Jul 25 14:18:39 2018 +0200 +++ b/www-thermferm/simulator.php Wed Jul 25 20:08:13 2018 +0200 @@ -1,6 +1,6 @@ <?php /***************************************************************************** - * Copyright (C) 2014 + * Copyright (C) 2014-2018 * * Michiel Broek <mbroek at mbse dot eu> * @@ -78,6 +78,7 @@ * @param string $_POST['VolumeAir'] The simulator Air volume * @param string $_POST['VolumeBeer'] The simulator Beer volume * @param string $_POST['RoomTemperature'] The simulator room temp + * @param string $_POST['RoomHumidity'] The simulator room humidity * @param string $_POST['CoolerTemp'] The simulator cold temp * @param string $_POST['CoolerTime'] The simulator time to reach this * @param string $_POST['CoolerSize'] The simulator plate size @@ -101,6 +102,7 @@ $cmd[] = "VOLUME_AIR,".$_POST['VolumeAir']; $cmd[] = "VOLUME_BEER,".$_POST['VolumeBeer']; $cmd[] = "ROOM_TEMPERATURE,".$_POST['RoomTemperature']; + $cmd[] = "ROOM_HUMIDITY,".$_POST['RoomHumidity']; $cmd[] = "COOLER_TEMP,".$_POST['CoolerTemp']; $cmd[] = "COOLER_TIME,".$_POST['CoolerTime']; $cmd[] = "COOLER_SIZE,".$_POST['CoolerSize']; @@ -117,6 +119,7 @@ unset($_POST['VolumeAir']); unset($_POST['VolumeBeer']); unset($_POST['RoomTemperature']); + unset($_POST['RoomHumidity']); unset($_POST['CoolerTemp']); unset($_POST['CoolerTime']); unset($_POST['CoolerSize']); @@ -139,6 +142,7 @@ * @param string $_POST['VolumeAir'] The simulator Air volume * @param string $_POST['VolumeBeer'] The simulator Beer volume * @param string $_POST['RoomTemperature'] The simulator room temp + * @param string $_POST['RoomHumidity'] The simulator room humidity * @param string $_POST['CoolerTemp'] The simulator cold temp * @param string $_POST['CoolerTime'] The simulator time to reach this * @param string $_POST['CoolerSize'] The simulator plate size @@ -160,7 +164,7 @@ global $arr; if (isset($_POST['UUID']) && isset($_POST['Name']) && isset($_POST['VolumeAir']) && isset($_POST['VolumeBeer']) && - isset($_POST['RoomTemperature']) && isset($_POST['CoolerTemp']) && isset($_POST['CoolerTime']) && + isset($_POST['RoomTemperature']) && isset($_POST['RoomHumidity']) && isset($_POST['CoolerTemp']) && isset($_POST['CoolerTime']) && isset($_POST['CoolerSize']) && isset($_POST['HeaterTemp']) && isset($_POST['HeaterTime']) && isset($_POST['HeaterSize']) && isset($_POST['FrigoIsolation']) && isset($_POST['key']) && isset($_POST['command'])) { @@ -282,6 +286,12 @@ $outstr .= ' <td class="editfield"><input type="text" name="RoomTemperature" size="5" value="'.$f[1].'"></td>'.PHP_EOL; $outstr .= ' </tr>'.PHP_EOL; } + if ($f[0] == "ROOM_HUMIDITY") { + $outstr .= ' <tr class="editor">'.PHP_EOL; + $outstr .= ' <td class="editname">Room Humidity</td>'.PHP_EOL; + $outstr .= ' <td class="editfield"><input type="text" name="RoomHumidity" size="5" value="'.$f[1].'"></td>'.PHP_EOL; + $outstr .= ' </tr>'.PHP_EOL; + } if ($f[0] == "COOLER_TEMP") { $outstr .= ' <tr class="editor">'.PHP_EOL; $outstr .= ' <td class="editname">Cooler Temperature</td>'.PHP_EOL; @@ -417,6 +427,7 @@ $outstr .= '<input type="hidden" value="150" name="VolumeAir">'; $outstr .= '<input type="hidden" value="50" name="VolumeBeer">'; $outstr .= '<input type="hidden" value="20.0" name="RoomTemperature">'; + $outstr .= '<input type="hidden" value="48.5" name="RoomHumidity">'; $outstr .= '<input type="hidden" value="-3.0" name="CoolerTemp">'; $outstr .= '<input type="hidden" value="720" name="CoolerTime">'; $outstr .= '<input type="hidden" value="0.8" name="CoolerSize">';