forked from Archive/PX4-Autopilot
uorb: fix Subscription::ChangeInstance() bug
This commit is contained in:
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;
|
||||
|
|
Loading…
Reference in New Issue