AP_Vehicle: initialize scripting serial device sim ports early

Necessary for mavlink in particular to notice the port and hook up the
protocol internally.
This commit is contained in:
Thomas Watson 2024-06-01 23:07:16 -05:00 committed by Peter Barker
parent f5cc0b3093
commit 4cb684e8a9
1 changed files with 8 additions and 0 deletions

View File

@ -367,6 +367,14 @@ void AP_Vehicle::setup()
networking.init();
#endif
#if AP_SCRIPTING_ENABLED
#if AP_SCRIPTING_SERIALDEVICE_ENABLED
// must be done now so ports are registered and drivers get set up properly
// (in particular mavlink which checks during init_ardupilot())
scripting.init_serialdevice_ports();
#endif
#endif
#if AP_SCHEDULER_ENABLED
// Register scheduler_delay_cb, which will run anytime you have
// more than 5ms remaining in your call to hal.scheduler->delay