mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 08:48:53 +08:00
uorb: fix Subscription::ChangeInstance() bug
This commit is contained in:
committed by
Daniel Agar
parent
96ee73f295
commit
68bc90bab5
@@ -76,7 +76,7 @@ void Subscription::unsubscribe()
|
||||
bool Subscription::ChangeInstance(uint8_t instance)
|
||||
{
|
||||
if (instance != _instance) {
|
||||
if (uORB::Manager::orb_device_node_exists(_orb_id, _instance)) {
|
||||
if (uORB::Manager::orb_device_node_exists(_orb_id, instance)) {
|
||||
// if desired new instance exists, unsubscribe from current
|
||||
unsubscribe();
|
||||
_instance = instance;
|
||||
|
||||
Reference in New Issue
Block a user