mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_HAL_Linux: move Util instantiation
The util object may be used by all other objects so we need to instantiate it as earlier as possible.
This commit is contained in:
parent
ca31ced2b4
commit
1d51e60571
@ -16,6 +16,12 @@
|
||||
|
||||
using namespace Linux;
|
||||
|
||||
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIO || CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_RASPILOT || CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_ERLEBRAIN2
|
||||
static UtilRPI utilInstance;
|
||||
#else
|
||||
static Util utilInstance;
|
||||
#endif
|
||||
|
||||
// 3 serial ports on Linux for now
|
||||
static UARTDriver uartADriver(true);
|
||||
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIO
|
||||
@ -140,11 +146,6 @@ static Empty::EmptyRCOutput rcoutDriver;
|
||||
#endif
|
||||
|
||||
static Scheduler schedulerInstance;
|
||||
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIO || CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_RASPILOT || CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_ERLEBRAIN2
|
||||
static UtilRPI utilInstance;
|
||||
#else
|
||||
static Util utilInstance;
|
||||
#endif
|
||||
|
||||
HAL_Linux::HAL_Linux() :
|
||||
AP_HAL::HAL(
|
||||
|
Loading…
Reference in New Issue
Block a user