Skip to content

Commit

Permalink
mission_raw: disable mission_changed in pure mode
Browse files Browse the repository at this point in the history
  • Loading branch information
julianoes committed Nov 22, 2022
1 parent 122cfb9 commit dc9da9d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/mavsdk/plugins/mission_raw/mission_raw_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,13 @@ MissionRaw::MissionProgress MissionRawImpl::mission_progress()
MissionRaw::MissionChangedHandle
MissionRawImpl::subscribe_mission_changed(const MissionRaw::MissionChangedCallback& callback)
{
// Listening for MISSION_ACKs can work, however, it is not guaranteed that these acks
// will be received. This should be specced properly, hence it's not in Pure mode.
if (_parent->compatibility_mode() == System::CompatibilityMode::Pure) {
LogErr() << "mission changed subscription not supported";
return;
}

std::lock_guard<std::mutex> lock(_mission_changed.mutex);
return _mission_changed.callbacks.subscribe(callback);
}
Expand Down

0 comments on commit dc9da9d

Please sign in to comment.