diff options
Diffstat (limited to 'occ_manager.cpp')
-rw-r--r-- | occ_manager.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/occ_manager.cpp b/occ_manager.cpp index 040676b..6fd0652 100644 --- a/occ_manager.cpp +++ b/occ_manager.cpp @@ -82,6 +82,15 @@ void Manager::statusCallBack(bool status) } activeCount += status ? 1 : -1; + + // Only start presence detection if all the OCCs are bound + if (activeCount == statusObjects.size()) + { + for (auto &obj : statusObjects) + { + obj->addPresenceWatchMaster(); + } + } } #ifdef I2C_OCC |