presence: Add sensor to redundancy policy api
Include a reference to the sensor changing state when sensor
implementations ping the policy object.
This allows policy logic based on multiple sensors, simultaneously.
Change-Id: I44cf00c7ecd220d0cc99e51ca6093bac6da7343c
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/presence/tach.cpp b/presence/tach.cpp
index deed040..0d96ce5 100644
--- a/presence/tach.cpp
+++ b/presence/tach.cpp
@@ -137,7 +137,7 @@
if (currentState != newState)
{
- getPolicy().stateChanged(newState);
+ getPolicy().stateChanged(newState, *this);
currentState = newState;
}
}