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