mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
ArduSub: move some common init_ardupilot code up to AP_Vehicle
This commit is contained in:
parent
a5a75e61da
commit
e7e1cdcc45
@ -68,7 +68,6 @@
|
|||||||
#include <AP_JSButton/AP_JSButton.h> // Joystick/gamepad button function assignment
|
#include <AP_JSButton/AP_JSButton.h> // Joystick/gamepad button function assignment
|
||||||
#include <AP_LeakDetector/AP_LeakDetector.h> // Leak detector
|
#include <AP_LeakDetector/AP_LeakDetector.h> // Leak detector
|
||||||
#include <AP_TemperatureSensor/TSYS01.h>
|
#include <AP_TemperatureSensor/TSYS01.h>
|
||||||
#include <AP_Common/AP_FWVersion.h>
|
|
||||||
|
|
||||||
// Local modules
|
// Local modules
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
@ -135,7 +134,6 @@ public:
|
|||||||
void loop() override;
|
void loop() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const AP_FWVersion fwver;
|
|
||||||
|
|
||||||
// key aircraft parameters passed to multiple libraries
|
// key aircraft parameters passed to multiple libraries
|
||||||
AP_Vehicle::MultiCopter aparm;
|
AP_Vehicle::MultiCopter aparm;
|
||||||
@ -451,7 +449,7 @@ private:
|
|||||||
void Log_Sensor_Health();
|
void Log_Sensor_Health();
|
||||||
void Log_Write_GuidedTarget(uint8_t target_type, const Vector3f& pos_target, const Vector3f& vel_target);
|
void Log_Write_GuidedTarget(uint8_t target_type, const Vector3f& pos_target, const Vector3f& vel_target);
|
||||||
void Log_Write_Vehicle_Startup_Messages();
|
void Log_Write_Vehicle_Startup_Messages();
|
||||||
void load_parameters(void);
|
void load_parameters(void) override;
|
||||||
void userhook_init();
|
void userhook_init();
|
||||||
void userhook_FastLoop();
|
void userhook_FastLoop();
|
||||||
void userhook_50Hz();
|
void userhook_50Hz();
|
||||||
|
@ -14,17 +14,6 @@ static void failsafe_check_static()
|
|||||||
|
|
||||||
void Sub::init_ardupilot()
|
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();
|
BoardConfig.init();
|
||||||
#if HAL_WITH_UAVCAN
|
#if HAL_WITH_UAVCAN
|
||||||
BoardConfig_CAN.init();
|
BoardConfig_CAN.init();
|
||||||
|
Loading…
Reference in New Issue
Block a user