Fix byte alignments #273

This commit is contained in:
Robert Strouse 2024-04-18 18:56:33 -07:00
parent 25c8a66869
commit f8b3bc4133
14 changed files with 109 additions and 56 deletions

View file

@ -8,9 +8,9 @@
<meta name="apple-mobile-web-app-title" content="ESPSomfy RTS App">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="main.css?v=2.4.2b" type="text/css" />
<link rel="stylesheet" href="widgets.css?v=2.4.2b" type="text/css" />
<link rel="stylesheet" href="icons.css?v=2.4.2b" type="text/css" />
<link rel="stylesheet" href="main.css?v=2.4.2c" type="text/css" />
<link rel="stylesheet" href="widgets.css?v=2.4.2c" type="text/css" />
<link rel="stylesheet" href="icons.css?v=2.4.2c" type="text/css" />
<link rel="icon" type="image/png" href="favicon.png" />
<!-- iPad retina icon -->
@ -114,7 +114,7 @@
rel="apple-touch-startup-image">
<script type="text/javascript" src="index.js?v=2.4.2b"></script>
<script type="text/javascript" src="index.js?v=2.4.2c"></script>
</head>
<body>
<div id="divContainer" class="container main" data-auth="false">
@ -221,18 +221,27 @@
</button>
</div>
</div>
<div id="divFirmware" class="subtab-content" style="display:none;">
<div style="font-size:17px;">
<span style="text-align:right;display:inline-block;color:#00bcd4;width:127px;margin-top:-27px;">Hardware: </span>
<span style="padding-left: 4px; display: inline-block;">ESP32<span id="spanHwVersion" style="text-transform:uppercase; text-align:left;width:120px;"></span></span>
<div>
<div style="font-size:17px;">
<span style="text-align:right;display:inline-block;color:#00bcd4;width:127px;margin-top:-27px;">Hardware: </span>
<span style="padding-left: 4px; display: inline-block;">ESP32<span id="spanHwVersion" style="text-transform:uppercase; text-align:left;width:120px;"></span></span>
</div>
<div style="font-size:17px;">
<span style="text-align:right;display:inline-block;color:#00bcd4;width:127px;margin-top:-27px;">Firmware:</span>
<span id="spanFwVersion" style="padding-left:4px;display:inline-block;text-align:left;width:120px;">v-.--</span>
</div>
<div style="font-size:17px;">
<span style="text-align:right;display:inline-block;color:#00bcd4;width:127px;">Application:</span>
<span id="spanAppVersion" style="padding-left:4px;display:inline-block;text-align:left;width:120px;">v-.--</span>
</div>
</div>
<div style="font-size:17px;">
<span style="text-align:right;display:inline-block;color:#00bcd4;width:127px;margin-top:-27px;">Firmware:</span>
<span id="spanFwVersion" style="padding-left:4px;display:inline-block;text-align:left;width:120px;">v-.--</span>
</div>
<div style="font-size:17px;">
<span style="text-align:right;display:inline-block;color:#00bcd4;width:127px;">Application:</span>
<span id="spanAppVersion" style="padding-left:4px;display:inline-block;text-align:left;width:120px;">v-.--</span>
<div>
<div style="font-size:17px;">
<span style="text-align:right;display:inline-block;color:#00bcd4;width:127px;margin-top:-27px;">Memory: </span>
<span style="padding-left: 4px; display: inline-block;"><span id="spanMemory" style="text-align:right;width:120px;"></span></span>
</div>
</div>
<div class="button-container">
<button id="btnUpdateGithub" type="button" onclick="firmware.updateGithub();">

View file

@ -491,6 +491,9 @@ async function initSockets() {
return value;
});
switch (eventName) {
case 'memStatus':
firmware.procMemoryStatus(msg);
break;
case 'updateProgress':
firmware.procUpdateProgress(msg);
break;
@ -2772,7 +2775,7 @@ class Somfy {
}
pinMaps = [
{ name: '', maxPins: 39, inputs: [0, 1, 6, 7, 8, 9, 10, 11, 37, 38], outputs: [3, 6, 7, 8, 9, 10, 11, 34, 35, 36, 37, 38, 39] },
{ name: 's2', maxPins: 46, inputs: [0, 15, 16, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 45], outputs: [0, 15, 16, 19, 20, 26, 27, 28, 29, 30, 31, 32, 45, 46]},
{ name: 's2', maxPins: 46, inputs: [0, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 45], outputs: [0, 19, 20, 26, 27, 28, 29, 30, 31, 32, 45, 46]},
{ name: 's3', maxPins: 48, inputs: [0, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 39, 40, 41, 42, 43], outputs: [0, 19, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 39, 40, 41, 42, 43] },
{ name: 'c3', maxPins: 21, inputs: [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], outputs: [11, 12, 13, 14, 15, 16, 17, 21] }
];
@ -4299,6 +4302,12 @@ class Firmware {
div.innerHTML = html;
return div;
}
procMemoryStatus(mem) {
console.log(mem);
let sp = document.getElementById('spanMemory');
sp.innerHTML = mem.max.fmt("#,##0 bytes");
}
procFwStatus(rel) {
console.log(rel);
let div = document.getElementById('divFirmwareUpdate');