97 $cmd[] = "HEATER_ADDRESS,".$_POST['HeaterAddress']; |
97 $cmd[] = "HEATER_ADDRESS,".$_POST['HeaterAddress']; |
98 $cmd[] = "HEATER_DELAY,".$_POST['HeaterDelay']; |
98 $cmd[] = "HEATER_DELAY,".$_POST['HeaterDelay']; |
99 $cmd[] = "COOLER_ADDRESS,".$_POST['CoolerAddress']; |
99 $cmd[] = "COOLER_ADDRESS,".$_POST['CoolerAddress']; |
100 $cmd[] = "COOLER_DELAY,".$_POST['CoolerDelay']; |
100 $cmd[] = "COOLER_DELAY,".$_POST['CoolerDelay']; |
101 $cmd[] = "FAN_ADDRESS,".$_POST['FanAddress']; |
101 $cmd[] = "FAN_ADDRESS,".$_POST['FanAddress']; |
|
102 $cmd[] = "FAN_DELAY,".$_POST['FanDelay']; |
102 $cmd[] = "LIGHT_ADDRESS,".$_POST['LightAddress']; |
103 $cmd[] = "LIGHT_ADDRESS,".$_POST['LightAddress']; |
103 $cmd[] = "LIGHT_DELAY,".$_POST['LightDelay']; |
104 $cmd[] = "LIGHT_DELAY,".$_POST['LightDelay']; |
104 $cmd[] = "DOOR_ADDRESS,".$_POST['DoorAddress']; |
105 $cmd[] = "DOOR_ADDRESS,".$_POST['DoorAddress']; |
105 $cmd[] = "PSU_ADDRESS,".$_POST['PSUAddress']; |
106 $cmd[] = "PSU_ADDRESS,".$_POST['PSUAddress']; |
106 $cmd[] = "TEMP_SET_MIN,".$_POST['TempSetMin']; |
107 $cmd[] = "TEMP_SET_MIN,".$_POST['TempSetMin']; |
126 unset($_POST['CoolerAddress']); |
127 unset($_POST['CoolerAddress']); |
127 unset($_POST['CoolerDelay']); |
128 unset($_POST['CoolerDelay']); |
128 unset($_POST['LightAddress']); |
129 unset($_POST['LightAddress']); |
129 unset($_POST['LightDelay']); |
130 unset($_POST['LightDelay']); |
130 unset($_POST['FanAddress']); |
131 unset($_POST['FanAddress']); |
|
132 unset($_POST['FanDelay']); |
131 unset($_POST['DoorAddress']); |
133 unset($_POST['DoorAddress']); |
132 unset($_POST['PSUAddress']); |
134 unset($_POST['PSUAddress']); |
133 unset($_POST['TempSetMin']); |
135 unset($_POST['TempSetMin']); |
134 unset($_POST['TempSetMax']); |
136 unset($_POST['TempSetMax']); |
135 unset($_POST['IdleRangeL']); |
137 unset($_POST['IdleRangeL']); |
160 * 7 = HeaterDelay out of range |
162 * 7 = HeaterDelay out of range |
161 * 8 = CoolerDelay out of range |
163 * 8 = CoolerDelay out of range |
162 * 9 = IdleRangeL out of range |
164 * 9 = IdleRangeL out of range |
163 * 10 = IdleRangeH out of range |
165 * 10 = IdleRangeH out of range |
164 * 11 = LightDelay out of range |
166 * 11 = LightDelay out of range |
|
167 * 12 = FanDelay out of range |
165 * 99 = Cancel key |
168 * 99 = Cancel key |
166 */ |
169 */ |
167 function test_thedata() { |
170 function test_thedata() { |
168 |
171 |
169 global $arr; |
172 global $arr; |
170 |
173 |
171 if (isset($_POST['UUID']) && isset($_POST['Name']) && isset($_POST['Volume']) && isset($_POST['AirAddress']) && |
174 if (isset($_POST['UUID']) && isset($_POST['Name']) && isset($_POST['Volume']) && isset($_POST['AirAddress']) && |
172 isset($_POST['BeerAddress']) && isset($_POST['HeaterAddress']) && isset($_POST['CoolerAddress']) && isset($_POST['LightAddress']) && |
175 isset($_POST['BeerAddress']) && isset($_POST['HeaterAddress']) && isset($_POST['CoolerAddress']) && isset($_POST['LightAddress']) && |
173 isset($_POST['HeaterDelay']) && isset($_POST['CoolerDelay']) && isset($_POST['LightDelay']) && isset($_POST['PSUAddress']) && |
176 isset($_POST['HeaterDelay']) && isset($_POST['CoolerDelay']) && isset($_POST['LightDelay']) && isset($_POST['PSUAddress']) && |
174 isset($_POST['FanAddress']) && isset($_POST['DoorAddress']) && isset($_POST['TempSetMin']) && isset($_POST['TempSetMax']) && |
177 isset($_POST['FanAddress']) && isset($_POST['DoorAddress']) && isset($_POST['TempSetMin']) && isset($_POST['TempSetMax']) && |
175 isset($_POST['PID_Kp']) && isset($_POST['PID_Kd']) && isset($_POST['PID_Ki']) && |
178 isset($_POST['PID_Kp']) && isset($_POST['PID_Kd']) && isset($_POST['PID_Ki']) && isset($_POST['FanDelay']) && |
176 isset($_POST['IdleRangeL']) && isset($_POST['IdleRangeH']) && isset($_POST['key']) && isset($_POST['command'])) { |
179 isset($_POST['IdleRangeL']) && isset($_POST['IdleRangeH']) && isset($_POST['key']) && isset($_POST['command'])) { |
177 |
180 |
178 if ($_POST['key'] == 'Cancel') |
181 if ($_POST['key'] == 'Cancel') |
179 return 99; |
182 return 99; |
180 |
183 |
444 } |
452 } |
445 $j++; |
453 $j++; |
446 } |
454 } |
447 } |
455 } |
448 $outstr .= ' </select></td>'.PHP_EOL; |
456 $outstr .= ' </select></td>'.PHP_EOL; |
|
457 $outstr .= ' </tr>'.PHP_EOL; |
|
458 } |
|
459 if ($f[0] == "FAN_DELAY") { |
|
460 $outstr .= ' <tr class="editor">'.PHP_EOL; |
|
461 $outstr .= ' <td class="editname">Fan Switch Delay</td>'.PHP_EOL; |
|
462 $outstr .= ' <td class="editfield"><input type="text" name="FanDelay" size="5" value="'.$f[1].'"> seconds (0..720)</td>'.PHP_EOL; |
449 $outstr .= ' </tr>'.PHP_EOL; |
463 $outstr .= ' </tr>'.PHP_EOL; |
450 } |
464 } |
451 if ($f[0] == "LIGHT_ADDRESS") { |
465 if ($f[0] == "LIGHT_ADDRESS") { |
452 $outstr .= ' <tr class="editor">'.PHP_EOL; |
466 $outstr .= ' <tr class="editor">'.PHP_EOL; |
453 $outstr .= ' <td class="editname">Lights Address</td>'.PHP_EOL; |
467 $outstr .= ' <td class="editname">Lights Address</td>'.PHP_EOL; |