control: mapped_floor: use setFloorHold
Start using Zone::setFloorHold() in the MappedFloor action. This way
other actions, or other instances of this action, can also set the floor
without worrying about undercutting each other.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ie55341d183894819b72819ad58a4a786a7ffb405
diff --git a/control/json/actions/mapped_floor.cpp b/control/json/actions/mapped_floor.cpp
index 2f077f1..f0563d3 100644
--- a/control/json/actions/mapped_floor.cpp
+++ b/control/json/actions/mapped_floor.cpp
@@ -324,11 +324,11 @@
if (newFloor && !missingGroupProperty)
{
- zone.setFloor(*newFloor);
+ zone.setFloorHold(getUniqueName(), *newFloor, true);
}
else
{
- zone.setFloor(zone.getDefaultFloor());
+ zone.setFloorHold(getUniqueName(), zone.getDefaultFloor(), true);
}
}