Copter: tell the gcs that the number of available modes has changed when registering a custom mode

This commit is contained in:
Iampete1 2024-11-14 17:48:08 +00:00 committed by Randy Mackay
parent 8a86e7da14
commit 840507970e
1 changed files with 4 additions and 0 deletions

View File

@ -448,6 +448,10 @@ AP_Vehicle::custom_mode_state* Copter::register_custom_mode(const uint8_t num, c
// Allocation failure
return nullptr;
}
// Registration sucsessful, notify the GCS that it should re-request the avalable modes
gcs().available_modes_changed();
return &mode_guided_custom[i]->state;
}
}