]> git.basschouten.com Git - openhab-addons.git/commitdiff
[neato] Fix slow cleaning of robot (#10724)
authorJan Wolf <mail@jan-wolf.de>
Tue, 15 Jun 2021 20:07:03 +0000 (22:07 +0200)
committerGitHub <noreply@github.com>
Tue, 15 Jun 2021 20:07:03 +0000 (22:07 +0200)
Signed-off-by: Jan Wolf <git@jan-wolf.de>
bundles/org.openhab.binding.neato/src/main/java/org/openhab/binding/neato/internal/NeatoRobot.java

index ca56304900c145d00c1a03dc406e66263063b782..115003091c3440fb6ffefc3f5d37c18c8702e458 100644 (file)
@@ -13,8 +13,6 @@
 package org.openhab.binding.neato.internal;
 
 import static org.openhab.binding.neato.internal.classes.Category.*;
-import static org.openhab.binding.neato.internal.classes.Mode.TURBO;
-import static org.openhab.binding.neato.internal.classes.NavigationMode.DEEP;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
@@ -146,21 +144,13 @@ public class NeatoRobot {
 
                 request.addParam("mode", this.state.getCleaning().getModeValue());
                 request.addParam("category", HOUSE.getCategory());
-
-                Integer navigationMode = this.state.getCleaning().getNavigationModeValue();
-                if (Integer.valueOf(TURBO.getMode()).equals(this.state.getCleaning().getModeValue())) {
-                    // From the Neato API Docs...
-                    // Note that navigationMode can only be set to 3 if mode is 2,
-                    // otherwise an error will be returned.
-                    navigationMode = DEEP.getNavigationMode();
-                }
-                request.addParam("navigationMode", navigationMode);
+                request.addParam("navigationMode", this.state.getCleaning().getNavigationModeValue());
             }
         } else if ("cleanWithMap".equalsIgnoreCase(command)) {
             request.setCmd("startCleaning");
             request.addParam("category", MAP.getCategory());
-            request.addParam("mode", TURBO.getMode());
-            request.addParam("navigationMode", DEEP.getNavigationMode());
+            request.addParam("mode", this.state.getCleaning().getModeValue());
+            request.addParam("navigationMode", this.state.getCleaning().getNavigationModeValue());
         } else if ("pause".equalsIgnoreCase(command)) {
             request.setCmd("pauseCleaning");
         } else if ("stop".equalsIgnoreCase(command)) {