1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 19:40:31 +03:00

Clean up vtx.c includes, move all not directly used to where they belong.

This commit is contained in:
Anders Hoglund 2016-10-01 18:30:58 +02:00
parent 92d2e3ae91
commit 44abc8f2e4
14 changed files with 54 additions and 38 deletions

View file

@ -17,6 +17,8 @@
#pragma once
#include <stdbool.h>
#if FLASH_SIZE <= 128
#define MAX_PROFILE_COUNT 2
#else

View file

@ -17,49 +17,38 @@
#pragma once
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include "common/color.h"
#include "common/axis.h"
#include "config/config_profile.h"
#include "drivers/sensor.h"
#include "drivers/accgyro.h"
#include "drivers/pwm_rx.h"
#include "drivers/serial.h"
#include "sensors/sensors.h"
#include "sensors/gyro.h"
#include "sensors/acceleration.h"
#include "sensors/barometer.h"
#include "sensors/boardalignment.h"
#include "sensors/battery.h"
#include "fc/rc_controls.h"
#include "flight/failsafe.h"
#include "flight/mixer.h"
#include "flight/imu.h"
#include "flight/navigation.h"
#include "io/serial.h"
#include "io/gimbal.h"
#include "io/motors.h"
#include "io/servos.h"
#include "fc/rc_controls.h"
#include "io/ledstrip.h"
#include "io/gps.h"
#include "io/osd.h"
#include "io/ledstrip.h"
#include "io/vtx.h"
#include "rx/rx.h"
#include "telemetry/telemetry.h"
#include "flight/mixer.h"
#include "flight/pid.h"
#include "flight/imu.h"
#include "flight/failsafe.h"
#include "flight/altitudehold.h"
#include "flight/navigation.h"
#include "config/config.h"
#include "config/config_profile.h"
#include "config/config_master.h"
#include "sensors/sensors.h"
#include "sensors/gyro.h"
#include "sensors/acceleration.h"
#include "sensors/boardalignment.h"
#include "sensors/barometer.h"
#include "sensors/battery.h"
// System-wide

View file

@ -17,6 +17,11 @@
#pragma once
#include "config/config.h"
#include "common/axis.h"
#include "fc/rc_controls.h"
#include "flight/pid.h"
typedef struct profile_s {
pidProfile_t pidProfile;
uint8_t activeRateProfile;

View file

@ -17,6 +17,8 @@
#pragma once
#include "drivers/sensor.h"
#ifndef MPU_I2C_INSTANCE
#define MPU_I2C_INSTANCE I2C_DEVICE
#endif

View file

@ -17,6 +17,8 @@
#pragma once
#include "drivers/timer.h"
typedef enum {
INPUT_FILTERING_DISABLED = 0,
INPUT_FILTERING_ENABLED

View file

@ -17,6 +17,8 @@
#pragma once
#include <stdbool.h>
typedef enum {
BOXARM = 0,
BOXANGLE,

View file

@ -17,6 +17,11 @@
#pragma once
#include "common/axis.h"
#include "common/maths.h"
#include "sensors/acceleration.h"
extern int16_t throttleAngleCorrection;
extern uint32_t accTimeSum;
extern int accSumCount;

View file

@ -17,6 +17,8 @@
#pragma once
#include <stdbool.h>
#define GYRO_I_MAX 256 // Gyro I 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

View file

@ -17,6 +17,9 @@
#pragma once
#include <string.h>
#include "common/color.h"
#define LED_MAX_STRIP_LENGTH 32
#define LED_CONFIGURABLE_COLOR_COUNT 16
#define LED_MODE_COUNT 6

View file

@ -17,6 +17,8 @@
#pragma once
#include "drivers/serial.h"
typedef enum {
PORTSHARING_UNUSED = 0,
PORTSHARING_NOT_SHARED,

View file

@ -15,27 +15,21 @@
* along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdbool.h>
#include <stdint.h>
// Get target build configuration
#include "platform.h"
#ifdef VTX
#include "drivers/vtx_rtc6705.h"
#include "fc/rc_controls.h"
#include "fc/runtime_config.h"
#include "flight/pid.h"
#include "io/beeper.h"
// Own interfaces
#include "io/vtx.h"
#include "config/config.h"
#include "config/config_eeprom.h"
#include "config/config_profile.h"
//External dependencies
#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;

View file

@ -17,6 +17,8 @@
#pragma once
#include "fc/rc_controls.h"
#define VTX_BAND_MIN 1
#define VTX_BAND_MAX 5
#define VTX_CHANNEL_MIN 1

View file

@ -17,6 +17,9 @@
#pragma once
#include "drivers/accgyro.h"
#include "sensors/sensors.h"
// Type of accelerometer used/detected
typedef enum {
ACC_DEFAULT = 0,

View file

@ -17,6 +17,9 @@
#pragma once
#include "drivers/accgyro.h"
#include "common/axis.h"
typedef enum {
GYRO_NONE = 0,
GYRO_DEFAULT,