mirror of https://github.com/ArduPilot/ardupilot
Copter: tell the gcs that the number of available modes has changed when registering a custom mode
This commit is contained in:
parent
8a86e7da14
commit
840507970e
|
@ -448,6 +448,10 @@ AP_Vehicle::custom_mode_state* Copter::register_custom_mode(const uint8_t num, c
|
||||||
// Allocation failure
|
// Allocation failure
|
||||||
return nullptr;
|
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;
|
return &mode_guided_custom[i]->state;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue