From e7e1cdcc45f7c2a0e4de92db4f13f9fe2523c291 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 16 Jan 2020 21:40:53 +1100 Subject: [PATCH] ArduSub: move some common init_ardupilot code up to AP_Vehicle --- ArduSub/Sub.h | 4 +--- ArduSub/system.cpp | 11 ----------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/ArduSub/Sub.h b/ArduSub/Sub.h index 8d1ae593a8..974c05eb4f 100644 --- a/ArduSub/Sub.h +++ b/ArduSub/Sub.h @@ -68,7 +68,6 @@ #include // Joystick/gamepad button function assignment #include // Leak detector #include -#include // Local modules #include "defines.h" @@ -135,7 +134,6 @@ public: void loop() override; private: - static const AP_FWVersion fwver; // key aircraft parameters passed to multiple libraries AP_Vehicle::MultiCopter aparm; @@ -451,7 +449,7 @@ private: void Log_Sensor_Health(); void Log_Write_GuidedTarget(uint8_t target_type, const Vector3f& pos_target, const Vector3f& vel_target); void Log_Write_Vehicle_Startup_Messages(); - void load_parameters(void); + void load_parameters(void) override; void userhook_init(); void userhook_FastLoop(); void userhook_50Hz(); diff --git a/ArduSub/system.cpp b/ArduSub/system.cpp index 72d16c227d..aa390403ce 100644 --- a/ArduSub/system.cpp +++ b/ArduSub/system.cpp @@ -14,17 +14,6 @@ static void failsafe_check_static() void Sub::init_ardupilot() { - // initialise serial port - serial_manager.init_console(); - - hal.console->printf("\n\nInit %s" - "\n\nFree RAM: %u\n", - AP::fwversion().fw_string, - (unsigned)hal.util->available_memory()); - - // load parameters from EEPROM - load_parameters(); - BoardConfig.init(); #if HAL_WITH_UAVCAN BoardConfig_CAN.init();