Skip to content

Commit

Permalink
Merge pull request #577 from visualapproach/development_v4
Browse files Browse the repository at this point in the history
Development v4
  • Loading branch information
visualapproach authored Jul 21, 2023
2 parents f9bc945 + 2bb7fc2 commit f7fda25
Show file tree
Hide file tree
Showing 42 changed files with 1,043 additions and 494 deletions.
85 changes: 85 additions & 0 deletions Code/data/calib.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<!DOCTYPE html>
<html>
<head>
<title>Lay-Z-Spa Module | SPA Manual calibration</title>
<meta charset="utf-8">
<link rel="icon" type="image/png" sizes="48x48" href="favicon.png">
<link rel="manifest" href="manifest.json">
<link rel="stylesheet" href="main.css">
<meta name="theme-color" content="#0066BF">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
<script src="function.js" type="text/javascript"></script>
</head>

<body>
<div id="site">
<header>
<span>SPA Manual calibration</span>
<a href="javascript:void(0);" class="topnavicon" onclick="topNav()"></a>
</header>

<div class="topnav" id="topnav">
<a href="./">Home</a>
<a href="hwconfig.html">Hardware Config</a>
<a href="config.html" class="active">SPA Config</a>
<a href="webconfig.html">Web Config</a>
<a href="wifi.html">Network Config</a>
<a href="mqtt.html">MQTT Config</a>
<a href="/dir/">Directory</a>
<a href="upload.html">File Uploader</a>
<a href="remove.html">File Remover</a>
<a href="chkupdatefw.html">Check firmware update</a>
<a href="/restart/">Restart ESP</a>
<!-- <a href="javascript:void(0);" class="bgred" onclick="sendCommand('restartEsp')">Restart ESP</a> -->
</div>

<section>
<table>
<tr>
<td><label for="maxtemp">Starting temp:</label></td>
<td><input type="text" id="maxtemp" value="30" maxlength="3" size="4"></td>
</tr>
<tr>
<td><label for="mintemp">Ending temp:</label></td>
<td><input type="text" id="mintemp" value="28" maxlength="3" size="4"></td>
</tr>
<tr>
<td><label for="amb">Avg. ambient temp.:</label></td>
<td><input type="text" id="amb" value="16" maxlength="3" size="4"></td>
</tr>
<tr>
<td><label for="finterval">time (minutes):</label></td>
<td><input type="text" id="minutes" value="120" maxlength="3" size="4"></td>
</tr>
<tr>
<td colspan="2" class="center"><button id="save" class="button" onclick="buttonConfirm(this);saveConfig()">Save</button></td>
</tr>
</table>
</section>

<script>

function saveConfig()
{
var maxtemp = document.getElementById('maxtemp').value;
var mintemp = document.getElementById('mintemp').value;
var amb = document.getElementById('amb').value;
var hours = document.getElementById('minutes').value / 60.0;
var r = hours/Math.log((maxtemp-amb)/(mintemp-amb));
console.log('r: ', r);
var req = new XMLHttpRequest();
req.open('POST', '/addcommand/');
var json = {
'CMD':21,
'VALUE':Math.round(r*1000000),
'XTIME':0,
'INTERVAL':0,
'TXT':'r set'
};
req.send(JSON.stringify(json));
console.log(json);
}

</script>
</body>
</html>
3 changes: 2 additions & 1 deletion Code/data/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
<tr>
<td><label for="calibration">Calibrated:</label><span data-text="If checked, the virtual temperature is calibrated. Redo calibration by unchecking and hitting SAVE button." class="tooltip">?</span></td>
<td><input type="checkbox" id="calibration" onclick="toggleCalibration()"><span data-text="Calibrate by keeping heat OFF and pump ON until temperature has dropped a couple of degrees. Do not toggle jets, bubbles etc meanwhile. Water temp must differ several degrees from ambient from start." class="tooltip">?</span></td>
<td><a href="calib.html">manual cal.</a></td>
</tr>
<tr>
<td colspan="2" class="center"><button id="save" class="button" onclick="buttonConfirm(this);saveConfig()">save</button></td>
Expand Down Expand Up @@ -124,7 +125,7 @@
</tr>
<tr>
<td><label for="txt">Text</label></td>
<td><input type="text" id="txt" value="" maxlength="16" size="16"> Text</td>
<td><input type="text" id="txt" value="" maxlength="24" size="16"> Text</td>
</tr>
<tr>
<td colspan="2" class="center"><button id="addcmd" class="button" onclick="buttonConfirm(this);addCommand()">add command</button></td>
Expand Down
144 changes: 144 additions & 0 deletions Code/data/furelise.mel
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
300
0.9
659
0.5
622
0.5
659
0.5
622
0.5
659
0.5
494
0.5
587
0.5
523
0.5
440
0.5
0
0.5
262
0.5
330
0.5
440
0.5
494
0.5
0
0.5
330
0.5
415
0.5
494
0.5
523
0.5
0
0.5
330
0.5
659
0.5
622
0.5
659
0.5
622
0.5
659
0.5
494
0.5
587
0.5
523
0.5
440
0.5
0
0.5
262
0.5
330
0.5
440
0.5
494
0.5
0
0.5
330
0.5
523
0.5
494
0.5
440
0.5
0
0.5
262
0.5
330
0.5
440
0.5
494
0.5
0
0.5
330
0.5
415
0.5
494
0.5
523
0.5
0
0.5
330
0.5
659
0.5
622
0.5
659
0.5
622
0.5
659
0.5
494
0.5
587
0.5
523
0.5
440
0.5
0
0.5
262
0.5
330
0.5
440
0.5
494
0.5
0
0.5
330
0.5
523
0.5
494
0.5
440
0.5
Loading

0 comments on commit f7fda25

Please sign in to comment.