Update to interface changes
parent
e69aa17a8a
commit
2b07c19315
|
|
@ -145,16 +145,7 @@
|
|||
{
|
||||
"id": "1f774998-5fa7-4e3b-8ab0-a8402dd561bb",
|
||||
"name": "startCleaning",
|
||||
"displayName": "Start cleaning",
|
||||
"paramTypes": [
|
||||
{
|
||||
"id": "08a86cca-cdc9-4520-af1d-8413a0c274b5",
|
||||
"name": "zone",
|
||||
"displayName": "Zones to clean",
|
||||
"type": "QString",
|
||||
"defaultValue": ""
|
||||
}
|
||||
]
|
||||
"displayName": "Start cleaning"
|
||||
},
|
||||
{
|
||||
"id": "e731faa6-88c9-406d-b505-f89b5f0868b0",
|
||||
|
|
|
|||
|
|
@ -181,18 +181,11 @@ def executeAction(info):
|
|||
zone = info.paramValue(robotStartCleaningActionZoneParamTypeId)
|
||||
logger.log("zone", zone)
|
||||
|
||||
if zone != "":
|
||||
ids = zone[9:];
|
||||
mapId = ids.split(";")[0]
|
||||
boundaryId = ids.split(";")[1]
|
||||
cleanWithRobot(info.thing, mapId, boundaryId)
|
||||
|
||||
refreshRobot(info.thing)
|
||||
if info.thing.stateValue(robotRobotStateStateTypeId) == "paused":
|
||||
thingsAndRobots[info.thing].resume_cleaning()
|
||||
else:
|
||||
refreshRobot(info.thing)
|
||||
if info.thing.stateValue(robotRobotStateStateTypeId) == "paused":
|
||||
thingsAndRobots[info.thing].resume_cleaning()
|
||||
else:
|
||||
cleanWithRobot(info.thing, None, None)
|
||||
cleanWithRobot(info.thing, None, None)
|
||||
|
||||
refreshRobot(info.thing)
|
||||
info.finish(nymea.ThingErrorNoError)
|
||||
|
|
@ -241,7 +234,7 @@ def cleanWithRobot(robotThing, mapID, boundaryID):
|
|||
else:
|
||||
intNogo = 4
|
||||
logger.log("Settings: Eco:", boolEco, "Care:", boolCare, "Enable nogo:", boolNogo, "mapID:", mapID, "boundaryID:", boundaryID)
|
||||
thingsAndRobots[robotThing].start_cleaning(mode=intEco, navigation_mode=intCare, category=intNogo, boundary_id=boundaryID, map_id=mapID)
|
||||
# thingsAndRobots[robotThing].start_cleaning(mode=intEco, navigation_mode=intCare, category=intNogo, boundary_id=boundaryID, map_id=mapID)
|
||||
|
||||
|
||||
def browseThing(browseResult):
|
||||
|
|
|
|||
Loading…
Reference in New Issue