@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.
@@ -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
- await driver.paint(bitmap, { address, aesKey: device.aesKey, connectTimeoutMs, reframe: device.reframe });
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 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhizomatics/signalk-einklabel-plugin",
3
- "version": "1.2.3",
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.31.0",
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",