Skip to content

Commit

Permalink
Allow spotHeight and spotWidth to be zero
Browse files Browse the repository at this point in the history
  • Loading branch information
arensman committed Dec 23, 2023
1 parent bfd171a commit ee5effd
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -643,7 +639,7 @@ function prepareRobotsStructure(robots, devices, callback) {
read: true,
write: true,
def: 100,
min: 100,
min: 0,
unit: 'cm',
role: 'level.width'
}
Expand All @@ -654,7 +650,7 @@ function prepareRobotsStructure(robots, devices, callback) {
read: true,
write: true,
def: 100,
min: 100,
min: 0,
unit: 'cm',
role: 'level.height'
}
Expand Down

0 comments on commit ee5effd

Please sign in to comment.