From 2013830677ab5761a815b1c0340f49adcbd4e619 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Tue, 30 Jul 2024 16:00:33 -0700 Subject: [PATCH] reolink: enable speed arg --- plugins/reolink/package-lock.json | 4 ++-- plugins/reolink/package.json | 2 +- plugins/reolink/src/reolink-api.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/reolink/package-lock.json b/plugins/reolink/package-lock.json index 9129245960..d60641ede4 100644 --- a/plugins/reolink/package-lock.json +++ b/plugins/reolink/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/reolink", - "version": "0.0.87", + "version": "0.0.88", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@scrypted/reolink", - "version": "0.0.87", + "version": "0.0.88", "license": "Apache", "dependencies": { "@scrypted/common": "file:../../common", diff --git a/plugins/reolink/package.json b/plugins/reolink/package.json index aeccf9a957..68ee27d630 100644 --- a/plugins/reolink/package.json +++ b/plugins/reolink/package.json @@ -1,6 +1,6 @@ { "name": "@scrypted/reolink", - "version": "0.0.87", + "version": "0.0.88", "description": "Reolink Plugin for Scrypted", "author": "Scrypted", "license": "Apache", diff --git a/plugins/reolink/src/reolink-api.ts b/plugins/reolink/src/reolink-api.ts index 2e90522a38..fd915ccfe5 100644 --- a/plugins/reolink/src/reolink-api.ts +++ b/plugins/reolink/src/reolink-api.ts @@ -260,7 +260,7 @@ export class ReolinkCameraClient { op += 'Up'; if (op) { - await this.ptzOp(op, (command.speed?.pan || command.speed?.tilt || 1) * 10); + await this.ptzOp(op, Math.round((command.speed?.pan || command.speed?.tilt || 1) * 10)); } if (command.zoom < 0) @@ -269,7 +269,7 @@ export class ReolinkCameraClient { op = 'ZoomInc'; if (op) { - await this.ptzOp(op, (command.speed?.zoom || 1) * 10); + await this.ptzOp(op, Math.round((command.speed?.zoom || 1) * 10)); } }