mirror of https://github.com/ArduPilot/ardupilot
AP_SerialManager: move serial_manager parameters up to base class
This commit is contained in:
parent
684b621b8c
commit
b623b8ec94
|
@ -20,6 +20,10 @@
|
|||
find which serial port they should use
|
||||
*/
|
||||
|
||||
#include "AP_SerialManager_config.h"
|
||||
|
||||
#if AP_SERIALMANAGER_ENABLED
|
||||
|
||||
#include <AP_HAL/AP_HAL.h>
|
||||
#include <AP_Math/AP_Math.h>
|
||||
#include <AP_RCProtocol/AP_RCProtocol.h>
|
||||
|
@ -867,3 +871,5 @@ AP_SerialManager &serialmanager()
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // AP_SERIALMANAGER_ENABLED
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
#pragma once
|
||||
|
||||
#include "AP_SerialManager_config.h"
|
||||
|
||||
#if AP_SERIALMANAGER_ENABLED
|
||||
|
||||
#include <AP_Param/AP_Param.h>
|
||||
|
||||
class AP_SerialManager {
|
||||
|
@ -207,3 +210,5 @@ private:
|
|||
namespace AP {
|
||||
AP_SerialManager &serialmanager();
|
||||
};
|
||||
|
||||
#endif // AP_SERIALMANAGER_ENABLED
|
||||
|
|
|
@ -39,6 +39,10 @@
|
|||
#define HAL_NUM_SERIAL_PORTS SERIALMANAGER_NUM_PORTS
|
||||
#endif
|
||||
|
||||
#ifndef AP_SERIALMANAGER_ENABLED
|
||||
#define AP_SERIALMANAGER_ENABLED 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
array size for state[]. This needs to be at least
|
||||
SERIALMANAGER_NUM_PORTS, but we want it to be the same length on
|
||||
|
|
|
@ -294,8 +294,10 @@ void AP_Vehicle::setup()
|
|||
// load the default values of variables listed in var_info[]
|
||||
AP_Param::setup_sketch_defaults();
|
||||
|
||||
#if AP_SERIALMANAGER_ENABLED
|
||||
// initialise serial port
|
||||
serial_manager.init_console();
|
||||
#endif
|
||||
|
||||
DEV_PRINTF("\n\nInit %s"
|
||||
"\n\nFree RAM: %u\n",
|
||||
|
@ -345,8 +347,10 @@ void AP_Vehicle::setup()
|
|||
gcs().init();
|
||||
#endif
|
||||
|
||||
#if AP_SERIALMANAGER_ENABLED
|
||||
// initialise serial ports
|
||||
serial_manager.init();
|
||||
#endif
|
||||
#if HAL_GCS_ENABLED
|
||||
gcs().setup_console();
|
||||
#endif
|
||||
|
|
|
@ -354,7 +354,10 @@ protected:
|
|||
#if AP_VIDEOTX_ENABLED
|
||||
AP_VideoTX vtx;
|
||||
#endif
|
||||
|
||||
#if AP_SERIALMANAGER_ENABLED
|
||||
AP_SerialManager serial_manager;
|
||||
#endif
|
||||
|
||||
#if AP_RELAY_ENABLED
|
||||
AP_Relay relay;
|
||||
|
|
Loading…
Reference in New Issue