Skip to content

Commit

Permalink
fix(bvp): don't remove rtc cooperate status
Browse files Browse the repository at this point in the history
Signed-off-by: satoshi-ota <[email protected]>
  • Loading branch information
satoshi-ota committed May 16, 2024
1 parent 89f81c0 commit 8526341
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,11 @@ class SceneModuleManagerInterfaceWithRTC : public SceneModuleManagerInterface

void removeRTCStatus(const UUID & uuid) { rtc_interface_.removeCooperateStatus(uuid); }

void publishRTCStatus(const Time & stamp) { rtc_interface_.publishCooperateStatus(stamp); }
void publishRTCStatus(const Time & stamp)
{
rtc_interface_.removeExpiredCooperateStatus();
rtc_interface_.publishCooperateStatus(stamp);
}

UUID getUUID(const int64_t & module_id) const;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,10 @@ void SceneModuleManagerInterfaceWithRTC::deleteExpiredModules(

for (const auto & scene_module : copied_scene_modules) {
if (isModuleExpired(scene_module)) {
removeRTCStatus(getUUID(scene_module->getModuleId()));
const UUID uuid = getUUID(scene_module->getModuleId());
updateRTCStatus(
uuid, scene_module->isSafe(), State::SUCCEEDED, std::numeric_limits<double>::lowest(),
clock_->now());
removeUUID(scene_module->getModuleId());
unregisterModule(scene_module);
}
Expand Down

0 comments on commit 8526341

Please sign in to comment.