From ee5effdfe3af8b92efb9067e1dc9f234d77ebef2 Mon Sep 17 00:00:00 2001 From: Alexander Rensmann Date: Sat, 23 Dec 2023 14:48:44 +0100 Subject: [PATCH] Allow `spotHeight` and `spotWidth` to be zero --- main.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/main.js b/main.js index 6b649ed..75d0d9a 100644 --- a/main.js +++ b/main.js @@ -527,12 +527,8 @@ function updateRobot(robot, callback) { adapter.setState(robot.name + '.status.modelName', state.meta.modelName, true); adapter.setState(robot.name + '.status.firmware', state.meta.firmware, true); adapter.setState(robot.name + '.commands.eco', robot.eco, true); - if (robot.spotWidth) { - adapter.setState(robot.name + '.commands.spotWidth', robot.spotWidth, true); - } - if (robot.spotHeight) { - adapter.setState(robot.name + '.commands.spotHeight', robot.spotHeight, true); - } + adapter.setState(robot.name + '.commands.spotWidth', robot.spotWidth, true); + adapter.setState(robot.name + '.commands.spotHeight', robot.spotHeight, true); adapter.setState(robot.name + '.commands.spotRepeat', robot.spotRepeat, true); if (typeof callback === 'function') { callback(null); @@ -643,7 +639,7 @@ function prepareRobotsStructure(robots, devices, callback) { read: true, write: true, def: 100, - min: 100, + min: 0, unit: 'cm', role: 'level.width' } @@ -654,7 +650,7 @@ function prepareRobotsStructure(robots, devices, callback) { read: true, write: true, def: 100, - min: 100, + min: 0, unit: 'cm', role: 'level.height' }