Skip to content

Commit d448da3

Browse files
committed
fixed layout issues in advanced settings and control agorithm
1 parent 0b2608a commit d448da3

File tree

3 files changed

+51
-39
lines changed

3 files changed

+51
-39
lines changed

css/style.css

+4-14
Original file line numberDiff line numberDiff line change
@@ -393,16 +393,14 @@ button#maintenance{
393393
}
394394

395395
#advanced-settings{
396+
height: auto;
396397
}
397398

398-
#control-settings-container{
399-
height: 250px;
400-
overflow:auto;
401-
}
402-
399+
#control-settings-container,
403400
#control-constants-container{
404401
height: 250px;
405402
overflow:auto;
403+
padding: 5px;
406404
}
407405

408406

@@ -417,7 +415,6 @@ button#maintenance{
417415
#maintenance-panel .setting-container{
418416
float: left;
419417
clear: both;
420-
padding:10px;
421418
margin: 20px 15px;
422419
width: 90%;
423420

@@ -434,6 +431,7 @@ button#maintenance{
434431
#maintenance-panel .section-explanation{
435432
float: left;
436433
clear: both;
434+
margin: 20px 15px;
437435
width: 710px;
438436
}
439437

@@ -458,14 +456,6 @@ button#maintenance{
458456
left: 100px;
459457
}
460458

461-
462-
#control-constants-container,
463-
#control-settings-container{
464-
padding-bottom: 15px;
465-
margin-bottom: 15px;
466-
overflow: auto;
467-
}
468-
469459
#maintenance-panel .container-title{
470460
float: left;
471461
margin-top: 5px;

js/profile-table.js

-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,6 @@ BeerProfileTable.prototype = {
404404
invalidCells--; // don't count empty last cell, decrease count by 1
405405
}
406406
}
407-
console.log(invalidCells);
408407
return (invalidCells > 0);
409408
},
410409
toJSON: function() {

maintenance-panel.php

+47-24
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
</div>
154154
</div>
155155
<div class = "header ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
156-
<span class='container-title'>Peak detection for predictive ON/OFF control</span>
156+
<span class='container-title'>Predictive ON/OFF and peak detection</span>
157157
<button class="cs update-from-arduino">Update control settings</button>
158158
<button class="cv update-from-arduino">Update control variables</button>
159159
<button class="cc update-from-arduino">Update control constants</button>
@@ -243,13 +243,15 @@
243243
<button class="send-button">Send to Arduino</button>
244244
</div>
245245
<div class="setting-container">
246-
<span class="setting-name">Temperature setting minimum</span><input type="text" name="tempSetMin" class="cc tempSetMin">
246+
<span class="setting-name">Temperature setting minimum</span>
247247
<span class="explanation">The fridge and beer temperatures cannot go below this value.</span>
248+
<input type="text" name="tempSetMin" class="cc tempSetMin">
248249
<button class="send-button">Send to Arduino</button>
249250
</div>
250251
<div class="setting-container">
251-
<span class="setting-name">Temperature setting maximum</span><input type="text" name="tempSetMax" class="cc tempSetMax">
252+
<span class="setting-name">Temperature setting maximum</span>
252253
<span class="explanation">The fridge and beer temperatures cannot go above this value.</span>
254+
<input type="text" name="tempSetMax" class="cc tempSetMax">
253255
<button class="send-button">Send to Arduino</button>
254256
</div>
255257
<span class="section-explanation">The fridge temperature is controlled with PID. The fridge setting = beer setting + PID.
@@ -258,109 +260,130 @@
258260
The derivative part is in the opposite direction to the proportional part. This prevents overshoot: it lowers the PID value when there's 'momentum' in the right direction.
259261
</span>
260262
<div class="setting-container">
261-
<span class="setting-name">PID: Kp</span><input type="text" name="Kp" class="cc Kp">
263+
<span class="setting-name">PID: Kp</span>
262264
<span class="explanation">The beer temperature error is multiplied by Kp to give the proportional part of the PID value.</span>
265+
<input type="text" name="Kp" class="cc Kp">
263266
<button class="send-button">Send to Arduino</button>
264267
</div>
265268
<div class="setting-container">
266-
<span class="setting-name">PID: Ki</span><input type="text" name="Ki" class="cc Ki">
269+
<span class="setting-name">PID: Ki</span>
267270
<span class="explanation">When the integral is active, the error is added to the integral every 30 seconds. The result is multiplied by Ki to give the integral part.</span>
271+
<input type="text" name="Ki" class="cc Ki">
268272
<button class="send-button">Send to Arduino</button>
269273
</div>
270274
<div class="setting-container">
271-
<span class="setting-name">PID: Kd</span><input type="text" name="Kd" class="cc Kd">
275+
<span class="setting-name">PID: Kd</span>
272276
<span class="explanation">The derivative of the beer temperature is multiplied by Kd to give the derivative part of the PID value.</span>
277+
<input type="text" name="Kd" class="cc Kd">
273278
<button class="send-button">Send to Arduino</button>
274279
</div>
275280
<div class="setting-container">
276-
<span class="setting-name">PID: maximum</span><input type="text" name="pidMax" class="cc pidMax">
281+
<span class="setting-name">PID: maximum</span>
277282
<span class="explanation">You can define the maximum difference between the beer temp setting and fridge temp setting here. The fridge setting will be clipped to this range.</span>
283+
<input type="text" name="pidMax" class="cc pidMax">
278284
<button class="send-button">Send to Arduino</button>
279285
</div>
280286
<div class="setting-container">
281-
<span class="setting-name">Integrator: maximum temp error &deg;<?php echo $tempFormat ?></span><input type="text" name="iMaxErr" class="cc iMaxErr">
287+
<span class="setting-name">Integrator: maximum temp error &deg;<?php echo $tempFormat ?></span>
282288
<span class="explanation">The integral is only active when the temperature is close to the target temperature. This is the maximum error for which the integral is active..</span>
289+
<input type="text" name="iMaxErr" class="cc iMaxErr">
283290
<button class="send-button">Send to Arduino</button>
284291
</div>
285292
<div class="setting-container">
286-
<span class="setting-name">Temperature idle range top</span><input type="text" name="idleRangeH" class="cc idleRangeH">
293+
<span class="setting-name">Temperature idle range top</span>
287294
<span class="explanation">When the fridge temperature is within this range, it won't heat or cool, regardless of other settings.</span>
295+
<input type="text" name="idleRangeH" class="cc idleRangeH">
288296
<button class="send-button">Send to Arduino</button>
289297
</div>
290298
<div class="setting-container">
291-
<span class="setting-name">Temperature idle range bottom</span><input type="text" name="idleRangeL" class="cc idleRangeL">
299+
<span class="setting-name">Temperature idle range bottom</span>
292300
<span class="explanation">When the fridge temperature is within this range, it won't heat or cool, regardless of other settings.</span>
301+
<input type="text" name="idleRangeL" class="cc idleRangeL">
293302
<button class="send-button">Send to Arduino</button>
294303
</div>
295304
<div class="setting-container">
296-
<span class="setting-name">Heating target upper bound</span><input type="text" name="heatTargetH" class="cc heatingTargetH">
305+
<span class="setting-name">Heating target upper bound</span>
297306
<span class="explanation">When the overshoot lands under this value, the peak is within target range and the estimator is not adjusted.</span>
307+
<input type="text" name="heatTargetH" class="cc heatingTargetH">
298308
<button class="send-button">Send to Arduino</button>
299309
</div>
300310
<div class="setting-container">
301-
<span class="setting-name">Heating target lower bound</span><input type="text" name="heatTargetL" class="cc heatingTargetL">
311+
<span class="setting-name">Heating target lower bound</span>
302312
<span class="explanation">When the overshoot lands above this value, the peak is within target range and the estimator is not adjusted.</span>
313+
<input type="text" name="heatTargetL" class="cc heatingTargetL">
303314
<button class="send-button">Send to Arduino</button>
304315
</div>
305316
<div class="setting-container">
306-
<span class="setting-name">Cooling target upper bound</span><input type="text" name="coolTargetH" class="cc coolingTargetH">
317+
<span class="setting-name">Cooling target upper bound</span>
307318
<span class="explanation">When the overshoot lands under this value, the peak is within target range and the estimator is not adjusted.</span>
319+
<input type="text" name="coolTargetH" class="cc coolingTargetH">
308320
<button class="send-button">Send to Arduino</button>
309321
</div>
310322
<div class="setting-container">
311-
<span class="setting-name">Cooling target lower bound</span><input type="text" name="coolTargetL" class="cc coolingTargetL">
323+
<span class="setting-name">Cooling target lower bound</span>
312324
<span class="explanation">When the overshoot lands above this value, the peak is within target range and the estimator is not adjusted.</span>
325+
<input type="text" name="coolTargetL" class="cc coolingTargetL">
313326
<button class="send-button">Send to Arduino</button>
314327
</div>
315328
<div class="setting-container">
316-
<span class="setting-name">Maximum time in seconds for heating overshoot estimator</span><input type="text" name="maxHeatTimeForEst" class="cc maxHeatTimeForEst">
329+
<span class="setting-name">Maximum time in seconds for heating overshoot estimator</span>
317330
<span class="explanation">The time the fridge has been heating is used to estimate overshoot. This is the maximum time that is taken into account.</span>
331+
<input type="text" name="maxHeatTimeForEst" class="cc maxHeatTimeForEst">
318332
<button class="send-button">Send to Arduino</button>
319333
</div>
320334
<div class="setting-container">
321-
<span class="setting-name">Maximum time in seconds for cooling overshoot estimator</span><input type="text" name="maxCoolTimeForEst" class="cc maxCoolTimeForEst">
335+
<span class="setting-name">Maximum time in seconds for cooling overshoot estimator</span>
322336
<span class="explanation">The time the fridge has been cooling is used to estimate overshoot. This is the maximum time that is taken into account.</span>
337+
<input type="text" name="maxCoolTimeForEst" class="cc maxCoolTimeForEst">
323338
<button class="send-button">Send to Arduino</button>
324339
</div>
325340
<div class="setting-container">
326-
<span class="setting-name">Beer fast filter delay time</span> <?php echoFilterSelect("beerFastFilt") ?>
341+
<span class="setting-name">Beer fast filter delay time</span>
327342
<span class="explanation">The beer fast filter is used for display and data logging. More filtering give a smoother line, but also more delay.</span>
343+
<?php echoFilterSelect("beerFastFilt") ?>
328344
<button class="send-button">Send to Arduino</button>
329345
</div>
330346
<div class="setting-container">
331-
<span class="setting-name">Beer slow filter delay time</span> <?php echoFilterSelect("beerSlowFilt") ?>
347+
<span class="setting-name">Beer slow filter delay time</span>
332348
<span class="explanation">The beer slow filter is used for the control algorithm. The fridge temperature setting is calculated from this filter.
333349
Because a small difference in beer temperature causes a large adjustment in the fridge temperature, more smoothing is needed.</span>
350+
<?php echoFilterSelect("beerSlowFilt") ?>
334351
<button class="send-button">Send to Arduino</button>
335352
</div>
336353
<div class="setting-container">
337-
<span class="setting-name">Beer slope filter delay time</span> <?php echoSlopeFilterSelect("beerSlopeFilt") ?>
354+
<span class="setting-name">Beer slope filter delay time</span>
338355
<span class="explanation">The slope is calculated every 30 seconds and fed to this filter. More filtering means a smoother fridge setting.</span>
356+
<?php echoSlopeFilterSelect("beerSlopeFilt") ?>
339357
<button class="send-button">Send to Arduino</button>
340358
</div>
341359
<div class="setting-container">
342-
<span class="setting-name">Fridge fast filter delay time</span> <?php echoFilterSelect("fridgeFastFilt") ?>
360+
<span class="setting-name">Fridge fast filter delay time</span>
343361
<span class="explanation">The fridge fast filter is used for on-off control, display and logging. It needs to have a small delay.</span>
362+
<?php echoFilterSelect("fridgeFastFilt") ?>
344363
<button class="send-button">Send to Arduino</button>
345364
</div>
346365
<div class="setting-container">
347-
<span class="setting-name">Fridge slow filter delay time</span> <?php echoFilterSelect("fridgeSlowFilt") ?>
366+
<span class="setting-name">Fridge slow filter delay time</span>
348367
<span class="explanation">The fridge slow filter is used for peak detection to adjust the overshoot estimators. More smoothing is needed to prevent small fluctiations to be recognized as peaks.</span>
368+
<?php echoFilterSelect("fridgeSlowFilt") ?>
349369
<button class="send-button">Send to Arduino</button>
350370
</div>
351371
<div class="setting-container">
352-
<span class="setting-name">Fridge slope filter delay time</span> <?php echoSlopeFilterSelect("fridgeSlopeFilt") ?>
372+
<span class="setting-name">Fridge slope filter delay time</span>
353373
<span class="explanation">The fridge slope filter is not used in the current version.</span>
374+
<?php echoSlopeFilterSelect("fridgeSlopeFilt") ?>
354375
<button class="send-button">Send to Arduino</button>
355376
</div>
356377
<div class="setting-container">
357-
<span class="setting-name">Use light as heater</span><?php echoYesNoSelect("lah") ?>
378+
<span class="setting-name">Use light as heater</span>
358379
<span class="explanation">If this option is set to 'Yes' the light wil be used as a heater..</span>
380+
<?php echoYesNoSelect("lah") ?>
359381
<button class="send-button">Send to Arduino</button>
360382
</div>
361383
<div class="setting-container">
362-
<span class="setting-name">Trigger rotary encoder at every ...</span> <?php echoRotarySelect("hs") ?>
384+
<span class="setting-name">Trigger rotary encoder at every ...</span>
363385
<span class="explanation">When you feel like you have to turn your rotary encoder two steps for every trigger, set this to half step.</span>
386+
<?php echoRotarySelect("hs") ?>
364387
<button class="send-button">Send to Arduino</button>
365388
</div>
366389
</div>

0 commit comments

Comments
 (0)