incyclist-devices 2.3.11 → 2.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.
@@ -229,19 +229,19 @@ class BleFmAdapter extends adapter_1.default {
229
229
  return __awaiter(this, arguments, void 0, function* (request, enforced = false) {
230
230
  if (!enforced && (this.paused || !this.device))
231
231
  return;
232
- if (!this.hasCapability(types_1.IncyclistCapability.Control))
233
- return;
234
232
  if (!enforced && (this.stopped && !this.isStarting()))
235
233
  return;
236
234
  try {
237
235
  const update = this.getCyclingMode().sendBikeUpdate(request);
238
236
  this.logEvent({ message: 'send bike update requested', profile: this.getProfile(), update, request });
239
237
  const device = this.getSensor();
240
- if (update.slope !== undefined) {
241
- yield device.setSlope(update.slope);
242
- }
243
- if (update.targetPower !== undefined) {
244
- yield device.setTargetPower(update.targetPower);
238
+ if (this.hasCapability(types_1.IncyclistCapability.Control)) {
239
+ if (update.slope !== undefined) {
240
+ yield device.setSlope(update.slope);
241
+ }
242
+ if (update.targetPower !== undefined) {
243
+ yield device.setTargetPower(update.targetPower);
244
+ }
245
245
  }
246
246
  }
247
247
  catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "incyclist-devices",
3
- "version": "2.3.11",
3
+ "version": "2.3.12",
4
4
  "dependencies": {
5
5
  "@serialport/bindings-interface": "^1.2.2",
6
6
  "@serialport/parser-byte-length": "^9.0.1",