mirror of https://github.com/ArduPilot/ardupilot
AP_MSP: add and use AP_MSP_config.h
This commit is contained in:
parent
008eec5838
commit
da36de3b80
|
@ -19,12 +19,13 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AP_OSD/AP_OSD.h>
|
||||
|
||||
#include "AP_MSP_Telem_Backend.h"
|
||||
#include "AP_MSP_config.h"
|
||||
|
||||
#if HAL_MSP_ENABLED
|
||||
|
||||
#include <AP_OSD/AP_OSD.h>
|
||||
#include "AP_MSP_Telem_Backend.h"
|
||||
|
||||
#define MSP_MAX_INSTANCES 3
|
||||
#define MSP_OSD_START 2048
|
||||
#define MSP_OSD_STEP_X 1
|
||||
|
|
|
@ -16,6 +16,10 @@
|
|||
*/
|
||||
#pragma once
|
||||
|
||||
#include "AP_MSP_config.h"
|
||||
|
||||
#if HAL_MSP_ENABLED
|
||||
|
||||
#include <AP_RCTelemetry/AP_RCTelemetry.h>
|
||||
#include <AP_SerialManager/AP_SerialManager.h>
|
||||
#include <AP_OSD/AP_OSD.h>
|
||||
|
@ -24,8 +28,6 @@
|
|||
|
||||
#include <time.h>
|
||||
|
||||
#if HAL_MSP_ENABLED
|
||||
|
||||
#define MSP_TIME_SLOT_MAX 12
|
||||
#define CELLFULL 4.35
|
||||
#define MSP_TXT_BUFFER_SIZE 15U // 11 + 3 utf8 chars + terminator
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
#pragma once
|
||||
|
||||
#include <AP_HAL/AP_HAL_Boards.h>
|
||||
|
||||
#ifndef HAL_MSP_ENABLED
|
||||
#define HAL_MSP_ENABLED !HAL_MINIMIZE_FEATURES
|
||||
#endif
|
||||
|
||||
// define for enabling MSP sensor drivers
|
||||
#ifndef HAL_MSP_SENSORS_ENABLED
|
||||
#define HAL_MSP_SENSORS_ENABLED HAL_MSP_ENABLED && !HAL_MINIMIZE_FEATURES && !defined(HAL_BUILD_AP_PERIPH)
|
||||
#endif
|
||||
|
||||
// define for enabling MSP DisplayPort
|
||||
#ifndef HAL_WITH_MSP_DISPLAYPORT
|
||||
#define HAL_WITH_MSP_DISPLAYPORT HAL_MSP_ENABLED && !HAL_MINIMIZE_FEATURES && !defined(HAL_BUILD_AP_PERIPH)
|
||||
#endif
|
|
@ -1,20 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <AP_HAL/AP_HAL.h>
|
||||
#include "AP_MSP_config.h"
|
||||
|
||||
#ifndef HAL_MSP_ENABLED
|
||||
#define HAL_MSP_ENABLED !HAL_MINIMIZE_FEATURES
|
||||
#endif
|
||||
|
||||
// define for enabling MSP sensor drivers
|
||||
#ifndef HAL_MSP_SENSORS_ENABLED
|
||||
#define HAL_MSP_SENSORS_ENABLED HAL_MSP_ENABLED && !HAL_MINIMIZE_FEATURES && !defined(HAL_BUILD_AP_PERIPH)
|
||||
#endif
|
||||
|
||||
// define for enabling MSP DisplayPort
|
||||
#ifndef HAL_WITH_MSP_DISPLAYPORT
|
||||
#define HAL_WITH_MSP_DISPLAYPORT HAL_MSP_ENABLED && !HAL_MINIMIZE_FEATURES && !defined(HAL_BUILD_AP_PERIPH)
|
||||
#endif
|
||||
#if HAL_MSP_ENABLED
|
||||
|
||||
#include <AP_HAL/UARTDriver.h>
|
||||
|
||||
|
@ -24,8 +12,6 @@
|
|||
#include "msp_version.h"
|
||||
#include "msp_sensors.h"
|
||||
|
||||
#if HAL_MSP_ENABLED
|
||||
|
||||
// betaflight/src/main/common/utils.h
|
||||
#define MSP_ARRAYEND(x) (&(x)[ARRAY_SIZE(x)])
|
||||
#define MSP_UNUSED(x) (void)(x)
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include <stdint.h>
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace MSP
|
||||
{
|
||||
// src/main/msp/msp_protocol_v2_sensor_msg.h
|
||||
|
|
Loading…
Reference in New Issue