uorb: fix Subscription::ChangeInstance() bug

This commit is contained in:
Robbie Drage 2023-10-19 08:52:43 +13:00 committed by Daniel Agar
parent 96ee73f295
commit 68bc90bab5
1 changed files with 1 additions and 1 deletions

View File

@ -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;