AP_Vehicle: initialise generator before init_ardupilot

each of the vehicles does a load-defaults-from-files.  Use that fact to ensure any generator backend parameter's defaults are loaded.
This commit is contained in:
Peter Barker 2023-06-13 21:54:15 +10:00 committed by Andrew Tridgell
parent 8665ccbe8f
commit 5daa38ffba

View File

@ -220,6 +220,10 @@ void AP_Vehicle::setup()
externalAHRS.init();
#endif
#if HAL_GENERATOR_ENABLED
generator.init();
#endif
// init_ardupilot is where the vehicle does most of its initialisation.
init_ardupilot();
@ -272,10 +276,6 @@ void AP_Vehicle::setup()
send_watchdog_reset_statustext();
#if HAL_GENERATOR_ENABLED
generator.init();
#endif
#if AP_OPENDRONEID_ENABLED
opendroneid.init();
#endif