mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 11:59:58 +03:00
Clean up vtx.c includes, move all not directly used to where they belong.
This commit is contained in:
parent
92d2e3ae91
commit
44abc8f2e4
14 changed files with 54 additions and 38 deletions
|
@ -17,6 +17,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
#if FLASH_SIZE <= 128
|
#if FLASH_SIZE <= 128
|
||||||
#define MAX_PROFILE_COUNT 2
|
#define MAX_PROFILE_COUNT 2
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -17,49 +17,38 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "common/color.h"
|
#include "config/config_profile.h"
|
||||||
#include "common/axis.h"
|
|
||||||
|
|
||||||
#include "drivers/sensor.h"
|
|
||||||
#include "drivers/accgyro.h"
|
|
||||||
#include "drivers/pwm_rx.h"
|
#include "drivers/pwm_rx.h"
|
||||||
#include "drivers/serial.h"
|
|
||||||
|
|
||||||
#include "sensors/sensors.h"
|
#include "fc/rc_controls.h"
|
||||||
#include "sensors/gyro.h"
|
|
||||||
#include "sensors/acceleration.h"
|
#include "flight/failsafe.h"
|
||||||
#include "sensors/barometer.h"
|
#include "flight/mixer.h"
|
||||||
#include "sensors/boardalignment.h"
|
#include "flight/imu.h"
|
||||||
#include "sensors/battery.h"
|
#include "flight/navigation.h"
|
||||||
|
|
||||||
#include "io/serial.h"
|
#include "io/serial.h"
|
||||||
#include "io/gimbal.h"
|
#include "io/gimbal.h"
|
||||||
#include "io/motors.h"
|
#include "io/motors.h"
|
||||||
#include "io/servos.h"
|
#include "io/servos.h"
|
||||||
#include "fc/rc_controls.h"
|
|
||||||
#include "io/ledstrip.h"
|
|
||||||
#include "io/gps.h"
|
#include "io/gps.h"
|
||||||
#include "io/osd.h"
|
#include "io/osd.h"
|
||||||
|
#include "io/ledstrip.h"
|
||||||
#include "io/vtx.h"
|
#include "io/vtx.h"
|
||||||
|
|
||||||
#include "rx/rx.h"
|
#include "rx/rx.h"
|
||||||
|
|
||||||
#include "telemetry/telemetry.h"
|
#include "telemetry/telemetry.h"
|
||||||
|
|
||||||
#include "flight/mixer.h"
|
#include "sensors/sensors.h"
|
||||||
#include "flight/pid.h"
|
#include "sensors/gyro.h"
|
||||||
#include "flight/imu.h"
|
#include "sensors/acceleration.h"
|
||||||
#include "flight/failsafe.h"
|
#include "sensors/boardalignment.h"
|
||||||
#include "flight/altitudehold.h"
|
#include "sensors/barometer.h"
|
||||||
#include "flight/navigation.h"
|
#include "sensors/battery.h"
|
||||||
|
|
||||||
#include "config/config.h"
|
|
||||||
#include "config/config_profile.h"
|
|
||||||
#include "config/config_master.h"
|
|
||||||
|
|
||||||
|
|
||||||
// System-wide
|
// System-wide
|
||||||
|
|
|
@ -17,6 +17,11 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "config/config.h"
|
||||||
|
#include "common/axis.h"
|
||||||
|
#include "fc/rc_controls.h"
|
||||||
|
#include "flight/pid.h"
|
||||||
|
|
||||||
typedef struct profile_s {
|
typedef struct profile_s {
|
||||||
pidProfile_t pidProfile;
|
pidProfile_t pidProfile;
|
||||||
uint8_t activeRateProfile;
|
uint8_t activeRateProfile;
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "drivers/sensor.h"
|
||||||
|
|
||||||
#ifndef MPU_I2C_INSTANCE
|
#ifndef MPU_I2C_INSTANCE
|
||||||
#define MPU_I2C_INSTANCE I2C_DEVICE
|
#define MPU_I2C_INSTANCE I2C_DEVICE
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "drivers/timer.h"
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
INPUT_FILTERING_DISABLED = 0,
|
INPUT_FILTERING_DISABLED = 0,
|
||||||
INPUT_FILTERING_ENABLED
|
INPUT_FILTERING_ENABLED
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
BOXARM = 0,
|
BOXARM = 0,
|
||||||
BOXANGLE,
|
BOXANGLE,
|
||||||
|
|
|
@ -17,6 +17,11 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "common/axis.h"
|
||||||
|
#include "common/maths.h"
|
||||||
|
|
||||||
|
#include "sensors/acceleration.h"
|
||||||
|
|
||||||
extern int16_t throttleAngleCorrection;
|
extern int16_t throttleAngleCorrection;
|
||||||
extern uint32_t accTimeSum;
|
extern uint32_t accTimeSum;
|
||||||
extern int accSumCount;
|
extern int accSumCount;
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
#define GYRO_I_MAX 256 // Gyro I limiter
|
#define GYRO_I_MAX 256 // Gyro I limiter
|
||||||
#define YAW_P_LIMIT_MIN 100 // Maximum value for yaw P limiter
|
#define YAW_P_LIMIT_MIN 100 // Maximum value for yaw P limiter
|
||||||
#define YAW_P_LIMIT_MAX 500 // Maximum value for yaw P limiter
|
#define YAW_P_LIMIT_MAX 500 // Maximum value for yaw P limiter
|
||||||
|
|
|
@ -17,6 +17,9 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#include "common/color.h"
|
||||||
|
|
||||||
#define LED_MAX_STRIP_LENGTH 32
|
#define LED_MAX_STRIP_LENGTH 32
|
||||||
#define LED_CONFIGURABLE_COLOR_COUNT 16
|
#define LED_CONFIGURABLE_COLOR_COUNT 16
|
||||||
#define LED_MODE_COUNT 6
|
#define LED_MODE_COUNT 6
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "drivers/serial.h"
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
PORTSHARING_UNUSED = 0,
|
PORTSHARING_UNUSED = 0,
|
||||||
PORTSHARING_NOT_SHARED,
|
PORTSHARING_NOT_SHARED,
|
||||||
|
|
|
@ -15,27 +15,21 @@
|
||||||
* along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
|
* along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
|
// Get target build configuration
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
|
|
||||||
#ifdef VTX
|
#ifdef VTX
|
||||||
|
|
||||||
#include "drivers/vtx_rtc6705.h"
|
// Own interfaces
|
||||||
|
|
||||||
#include "fc/rc_controls.h"
|
|
||||||
#include "fc/runtime_config.h"
|
|
||||||
|
|
||||||
#include "flight/pid.h"
|
|
||||||
|
|
||||||
#include "io/beeper.h"
|
|
||||||
#include "io/vtx.h"
|
#include "io/vtx.h"
|
||||||
|
|
||||||
#include "config/config.h"
|
//External dependencies
|
||||||
#include "config/config_eeprom.h"
|
|
||||||
#include "config/config_profile.h"
|
|
||||||
#include "config/config_master.h"
|
#include "config/config_master.h"
|
||||||
|
#include "config/config_eeprom.h"
|
||||||
|
#include "drivers/vtx_rtc6705.h"
|
||||||
|
#include "fc/runtime_config.h"
|
||||||
|
#include "io/beeper.h"
|
||||||
|
|
||||||
|
|
||||||
static uint8_t locked = 0;
|
static uint8_t locked = 0;
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "fc/rc_controls.h"
|
||||||
|
|
||||||
#define VTX_BAND_MIN 1
|
#define VTX_BAND_MIN 1
|
||||||
#define VTX_BAND_MAX 5
|
#define VTX_BAND_MAX 5
|
||||||
#define VTX_CHANNEL_MIN 1
|
#define VTX_CHANNEL_MIN 1
|
||||||
|
|
|
@ -17,6 +17,9 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "drivers/accgyro.h"
|
||||||
|
#include "sensors/sensors.h"
|
||||||
|
|
||||||
// Type of accelerometer used/detected
|
// Type of accelerometer used/detected
|
||||||
typedef enum {
|
typedef enum {
|
||||||
ACC_DEFAULT = 0,
|
ACC_DEFAULT = 0,
|
||||||
|
|
|
@ -17,6 +17,9 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "drivers/accgyro.h"
|
||||||
|
#include "common/axis.h"
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GYRO_NONE = 0,
|
GYRO_NONE = 0,
|
||||||
GYRO_DEFAULT,
|
GYRO_DEFAULT,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue