@rhizomatics/signalk-einklabel-plugin 1.2.3 → 1.3.0-beta2
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/CHANGELOG.md +4 -0
- package/README.md +55 -6
- package/dist/cli/index.js +5 -5
- package/dist/config.d.ts +7 -0
- package/dist/config.js +14 -0
- package/dist/devices/bleBackend.d.ts +20 -0
- package/dist/devices/bleBackend.js +106 -0
- package/dist/devices/bleDiscovery.d.ts +11 -0
- package/dist/devices/bleDiscovery.js +89 -0
- package/dist/devices/discoveryCoordinator.d.ts +7 -6
- package/dist/devices/discoveryCoordinator.js +81 -9
- package/dist/devices/gattConnection.d.ts +9 -0
- package/dist/devices/gattConnection.js +2 -0
- package/dist/devices/gicisky/index.d.ts +7 -2
- package/dist/devices/gicisky/index.js +107 -96
- package/dist/devices/types.d.ts +26 -6
- package/dist/devices/zhsunyco/index.d.ts +8 -2
- package/dist/devices/zhsunyco/index.js +83 -79
- package/dist/plugin.js +27 -9
- package/dist/repaintScheduler.js +4 -2
- package/docs/assets/images/mini_tidal_clock.png +0 -0
- package/package.json +2 -2
package/dist/repaintScheduler.js
CHANGED
|
@@ -7,6 +7,7 @@ const path_1 = require("path");
|
|
|
7
7
|
const fs_1 = require("fs");
|
|
8
8
|
const config_1 = require("./config");
|
|
9
9
|
const bleDiscovery_1 = require("./devices/bleDiscovery");
|
|
10
|
+
const bleBackend_1 = require("./devices/bleBackend");
|
|
10
11
|
const discoveredDevicesStore_1 = require("./devices/discoveredDevicesStore");
|
|
11
12
|
const discoveryCoordinator_1 = require("./devices/discoveryCoordinator");
|
|
12
13
|
const registry_1 = require("./devices/registry");
|
|
@@ -200,7 +201,7 @@ async function resolveTargets(app, config, device) {
|
|
|
200
201
|
let records = (0, discoveredDevicesStore_1.loadDiscoveredDevices)(app);
|
|
201
202
|
if (Object.keys(records).length === 0) {
|
|
202
203
|
app.debug(`"${device.friendlyName}": device is "${config_1.ALL_DEVICES}" and nothing discovered yet - scanning for ${config.scanDurationSeconds}s`);
|
|
203
|
-
records = (await (0, discoveryCoordinator_1.ensureScan)(app, config.scanDurationSeconds)).merged;
|
|
204
|
+
records = (await (0, discoveryCoordinator_1.ensureScan)(app, config.scanDurationSeconds, config.useBleApi && !!app.bleApi)).merged;
|
|
204
205
|
}
|
|
205
206
|
const targets = [];
|
|
206
207
|
for (const record of Object.values(records)) {
|
|
@@ -349,7 +350,8 @@ async function considerRepaint(app, config, device, target, state, getApiUrl) {
|
|
|
349
350
|
app.debug(`${label}: attempting paint ${attempt}/${config.paintRetries}`);
|
|
350
351
|
}
|
|
351
352
|
const startedAt = Date.now();
|
|
352
|
-
|
|
353
|
+
const gattBackend = config.useBleApi && app.bleApi ? (0, bleBackend_1.bleApiBackend)(app.bleApi, pluginVersion_1.PLUGIN_NAME) : undefined;
|
|
354
|
+
await driver.paint(bitmap, { address, aesKey: device.aesKey, connectTimeoutMs, reframe: device.reframe, gattBackend });
|
|
353
355
|
paintDurationMs = Date.now() - startedAt;
|
|
354
356
|
});
|
|
355
357
|
(0, discoveredDevicesStore_1.touchDiscoveredDevice)(app, { address, vendor: target.vendor, pid: target.pid, hwVersion: target.hwVersion, metadata });
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rhizomatics/signalk-einklabel-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0-beta2",
|
|
4
4
|
"description": "Display SignalK data on eInk Electronic Shelf Labels, includes working examples for tide clock and watch schedule.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ble",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"pngjs": "^7.0.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@signalk/server-api": "^2.
|
|
67
|
+
"@signalk/server-api": "^2.32.0",
|
|
68
68
|
"@types/luxon": "^3.7.1",
|
|
69
69
|
"@types/node": "^26.4.0",
|
|
70
70
|
"@types/pngjs": "^6.0.5",
|