desky-agent 0.3.10 → 0.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/firmware/firmware.bin +0 -0
- package/firmware/manifest.json +3 -3
- package/package.json +1 -1
- package/src/board.js +2 -2
- package/src/link.js +2 -0
- package/ui/app.html +1666 -1625
package/firmware/firmware.bin
CHANGED
|
Binary file
|
package/firmware/manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clawd-desk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.12",
|
|
4
4
|
"chip": "esp32s3",
|
|
5
5
|
"board": "waveshare-esp32-s3-zero",
|
|
6
6
|
"flash_size": "4MB",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
{
|
|
27
27
|
"file": "firmware.bin",
|
|
28
28
|
"address": "0x10000",
|
|
29
|
-
"size":
|
|
30
|
-
"sha256": "
|
|
29
|
+
"size": 340960,
|
|
30
|
+
"sha256": "6c4958db2e620ff3ff4bf0813b45aab30cd4768b397f5606fbb40674ac1ab5f2"
|
|
31
31
|
}
|
|
32
32
|
]
|
|
33
33
|
}
|
package/package.json
CHANGED
package/src/board.js
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
const PKG_VERSION = require('../package.json').version;
|
|
6
6
|
const PROTO = 3; // the command set this package speaks
|
|
7
7
|
|
|
8
|
-
/** "clawd-desk 3 fw=0.2.0 chip=esp32s3 sn=
|
|
8
|
+
/** "clawd-desk 3 fw=0.2.0 chip=esp32s3 sn=DSK-0007 id=d83bda1a2b3c" -> { proto, fw, chip, sn, id }; null when the line is not Desky's.
|
|
9
9
|
* Protocol 2 boards say only "clawd-desk 2": fw, chip and sn come back null. Unknown fields are kept, order is free. */
|
|
10
10
|
function parseWho(line) {
|
|
11
11
|
const parts = String(line || '').trim().split(/\s+/);
|
|
12
12
|
if (parts[0] !== 'clawd-desk') return null;
|
|
13
13
|
const proto = Number.parseInt(parts[1], 10);
|
|
14
|
-
const info = { proto: Number.isFinite(proto) ? proto : null, fw: null, chip: null, sn: null };
|
|
14
|
+
const info = { proto: Number.isFinite(proto) ? proto : null, fw: null, chip: null, sn: null, id: null }; // id: firmware 0.3.11+
|
|
15
15
|
for (const p of parts.slice(2)) {
|
|
16
16
|
const eq = p.indexOf('=');
|
|
17
17
|
if (eq > 0) info[p.slice(0, eq)] = p.slice(eq + 1);
|
package/src/link.js
CHANGED
|
@@ -186,6 +186,8 @@ class Link {
|
|
|
186
186
|
parser.on('data', ln => {
|
|
187
187
|
ln = String(ln).trim();
|
|
188
188
|
if (ln) {
|
|
189
|
+
const who = parseWho(ln); // a later "who" (after "sn") updates the board's numbers
|
|
190
|
+
if (who && this.port === port) this.info = who;
|
|
189
191
|
try { this.onLine(ln); } catch (e) { /* the daemon's problem, not the port's */ }
|
|
190
192
|
}
|
|
191
193
|
});
|