mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 22:35:23 +03:00
Re-organise included files and functions thanks Karate
This commit is contained in:
parent
36f7379d6f
commit
a853b6ced3
12 changed files with 7 additions and 23 deletions
|
@ -23,7 +23,6 @@ PG_SRC = \
|
|||
pg/msp.c \
|
||||
pg/pg.c \
|
||||
pg/piniobox.c \
|
||||
pg/autopilot.c \
|
||||
pg/pinio.c \
|
||||
pg/pin_pull_up_down.c \
|
||||
pg/pos_hold.c \
|
||||
|
@ -163,8 +162,8 @@ COMMON_SRC = \
|
|||
fc/rc_controls.c \
|
||||
fc/rc_modes.c \
|
||||
flight/alt_hold.c \
|
||||
flight/pos_hold.c \
|
||||
flight/autopilot.c \
|
||||
flight/pos_hold.c \
|
||||
flight/dyn_notch_filter.c \
|
||||
flight/failsafe.c \
|
||||
flight/gps_rescue.c \
|
||||
|
|
|
@ -70,7 +70,6 @@
|
|||
#include "flight/mixer.h"
|
||||
#include "flight/pid.h"
|
||||
#include "flight/position.h"
|
||||
#include "flight/autopilot.h"
|
||||
#include "flight/rpm_filter.h"
|
||||
#include "flight/servos.h"
|
||||
#include "flight/imu.h"
|
||||
|
|
|
@ -110,7 +110,6 @@ bool cliMode = false;
|
|||
#include "flight/mixer.h"
|
||||
#include "flight/pid.h"
|
||||
#include "flight/position.h"
|
||||
#include "flight/autopilot.h"
|
||||
#include "flight/servos.h"
|
||||
|
||||
#include "io/asyncfatfs/asyncfatfs.h"
|
||||
|
|
|
@ -64,9 +64,6 @@
|
|||
#include "flight/mixer.h"
|
||||
#include "flight/pid.h"
|
||||
#include "flight/position.h"
|
||||
#include "flight/autopilot.h"
|
||||
#include "flight/alt_hold.h"
|
||||
#include "flight/pos_hold.h"
|
||||
#include "flight/rpm_filter.h"
|
||||
#include "flight/servos.h"
|
||||
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
#include "flight/autopilot.h"
|
||||
#include "flight/gps_rescue.h"
|
||||
#include "flight/position.h"
|
||||
#include "flight/autopilot.h"
|
||||
|
||||
static uint16_t gpsRescueConfig_minStartDistM; //meters
|
||||
static uint8_t gpsRescueConfig_altitudeMode;
|
||||
|
@ -116,10 +115,10 @@ const OSD_Entry cms_menuGpsRescuePidEntries[] =
|
|||
{
|
||||
{"--- GPS RESCUE PID---", OME_Label, NULL, NULL},
|
||||
|
||||
{ "ALTITUDE P", OME_UINT8 | REBOOT_REQUIRED, NULL, &(OSD_UINT8_t){ &autopilotConfig_altitude_P, 0, 255, 1 } },
|
||||
{ "ALTITUDE I", OME_UINT8 | REBOOT_REQUIRED, NULL, &(OSD_UINT8_t){ &autopilotConfig_altitude_I, 0, 255, 1 } },
|
||||
{ "ALTITUDE D", OME_UINT8 | REBOOT_REQUIRED, NULL, &(OSD_UINT8_t){ &autopilotConfig_altitude_D, 0, 255, 1 } },
|
||||
{ "ALTITUDE F", OME_UINT8 | REBOOT_REQUIRED, NULL, &(OSD_UINT8_t){ &autopilotConfig_altitude_F, 0, 255, 1 } },
|
||||
{ "ALTITUDE P", OME_UINT8 | REBOOT_REQUIRED, NULL, &(OSD_UINT8_t){ &autopilotConfig_altitude_P, 0, 200, 1 } },
|
||||
{ "ALTITUDE I", OME_UINT8 | REBOOT_REQUIRED, NULL, &(OSD_UINT8_t){ &autopilotConfig_altitude_I, 0, 200, 1 } },
|
||||
{ "ALTITUDE D", OME_UINT8 | REBOOT_REQUIRED, NULL, &(OSD_UINT8_t){ &autopilotConfig_altitude_D, 0, 200, 1 } },
|
||||
{ "ALTITUDE F", OME_UINT8 | REBOOT_REQUIRED, NULL, &(OSD_UINT8_t){ &autopilotConfig_altitude_F, 0, 200, 1 } },
|
||||
|
||||
{ "YAW P", OME_UINT8 | REBOOT_REQUIRED, NULL, &(OSD_UINT8_t){ &gpsRescueConfig_yawP, 0, 200, 1 } },
|
||||
|
||||
|
|
|
@ -95,7 +95,6 @@
|
|||
#include "fc/tasks.h"
|
||||
|
||||
#include "flight/alt_hold.h"
|
||||
#include "flight/pos_hold.h"
|
||||
#include "flight/autopilot.h"
|
||||
#include "flight/failsafe.h"
|
||||
#include "flight/imu.h"
|
||||
|
@ -104,6 +103,7 @@
|
|||
#include "flight/pid.h"
|
||||
#include "flight/pid_init.h"
|
||||
#include "flight/position.h"
|
||||
#include "flight/pos_hold.h"
|
||||
#include "flight/servos.h"
|
||||
|
||||
#include "io/asyncfatfs/asyncfatfs.h"
|
||||
|
|
|
@ -21,12 +21,12 @@
|
|||
#ifdef USE_ALT_HOLD_MODE
|
||||
|
||||
#include "build/debug.h"
|
||||
|
||||
#include "common/maths.h"
|
||||
#include "config/config.h"
|
||||
|
||||
#include "fc/rc.h"
|
||||
#include "fc/runtime_config.h"
|
||||
|
||||
#include "flight/autopilot.h"
|
||||
#include "flight/failsafe.h"
|
||||
#include "flight/position.h"
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "fc/rc.h"
|
||||
|
||||
#include "flight/imu.h"
|
||||
#include "flight/pid.h"
|
||||
#include "flight/position.h"
|
||||
#include "rx/rx.h"
|
||||
|
||||
|
@ -195,10 +194,6 @@ bool isBelowLandingAltitude(void)
|
|||
return getAltitudeCm() < 100.0f * autopilotConfig()->landing_altitude_m;
|
||||
}
|
||||
|
||||
const pidCoefficient_t *getAltitudePidCoeffs(void)
|
||||
{
|
||||
return &altitudePidCoeffs;
|
||||
|
||||
float getAutopilotThrottle(void)
|
||||
{
|
||||
return throttleOut;
|
||||
|
|
|
@ -30,7 +30,6 @@ void resetPositionControl(void);
|
|||
void altitudeControl(float targetAltitudeCm, float taskIntervalS, float verticalVelocity, float targetAltitudeStep);
|
||||
void positionControl(gpsLocation_t targetLocation, float deadband);
|
||||
|
||||
|
||||
bool isBelowLandingAltitude(void);
|
||||
const pidCoefficient_t *getAltitudePidCoeffs(void);
|
||||
float getAutopilotThrottle(void);
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
#include "flight/mixer_init.h"
|
||||
#include "flight/mixer_tricopter.h"
|
||||
#include "flight/pid.h"
|
||||
#include "flight/autopilot.h"
|
||||
#include "flight/rpm_filter.h"
|
||||
|
||||
#include "io/gps.h"
|
||||
|
|
|
@ -48,7 +48,6 @@
|
|||
|
||||
#include "flight/alt_hold.h"
|
||||
#include "flight/autopilot.h"
|
||||
#include "flight/pos_hold.h"
|
||||
#include "flight/gps_rescue.h"
|
||||
#include "flight/imu.h"
|
||||
#include "flight/mixer.h"
|
||||
|
|
|
@ -478,7 +478,6 @@ althold_unittest_SRC := \
|
|||
$(USER_DIR)/flight/alt_hold.c \
|
||||
$(USER_DIR)/flight/autopilot.c \
|
||||
$(USER_DIR)/common/maths.c \
|
||||
$(USER_DIR)/flight/autopilot.c \
|
||||
$(USER_DIR)/pg/rx.c
|
||||
|
||||
althold_unittest_DEFINES := \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue