From 296090bb11f0fe3a3d53aa7ae6a8bf9c05ee4cb1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 30 Dec 2019 10:52:23 +1100 Subject: [PATCH] AP_BoardConfig: call init_vehicle() this allows a single location for init_vehicle --- libraries/AP_BoardConfig/AP_BoardConfig.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libraries/AP_BoardConfig/AP_BoardConfig.cpp b/libraries/AP_BoardConfig/AP_BoardConfig.cpp index 43d9afdbfa..c5917a16bf 100644 --- a/libraries/AP_BoardConfig/AP_BoardConfig.cpp +++ b/libraries/AP_BoardConfig/AP_BoardConfig.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #if HAL_WITH_UAVCAN @@ -315,6 +315,12 @@ void AP_BoardConfig::init() printf("SDCard failed to start\n"); } #endif + + // run any the vehicle initialization routines + AP_Vehicle *vehicle = AP::vehicle(); + if (vehicle) { + vehicle->init_vehicle(); + } } // set default value for BRD_SAFETY_MASK