diff --git a/Makefile b/Makefile index 68364d7b7..c65876bca 100644 --- a/Makefile +++ b/Makefile @@ -122,9 +122,9 @@ endif REVISION = $(shell git log -1 --format="%h") -FC_VER_MAJOR := $(shell grep " FC_VERSION_MAJOR" src/main/version.h | awk '{print $$3}' ) -FC_VER_MINOR := $(shell grep " FC_VERSION_MINOR" src/main/version.h | awk '{print $$3}' ) -FC_VER_PATCH := $(shell grep " FC_VERSION_PATCH" src/main/version.h | awk '{print $$3}' ) +FC_VER_MAJOR := $(shell grep " FC_VERSION_MAJOR" src/main/build/version.h | awk '{print $$3}' ) +FC_VER_MINOR := $(shell grep " FC_VERSION_MINOR" src/main/build/version.h | awk '{print $$3}' ) +FC_VER_PATCH := $(shell grep " FC_VERSION_PATCH" src/main/build/version.h | awk '{print $$3}' ) FC_VER := $(FC_VER_MAJOR).$(FC_VER_MINOR).$(FC_VER_PATCH) @@ -357,19 +357,19 @@ INCLUDE_DIRS := $(INCLUDE_DIRS) \ VPATH := $(VPATH):$(TARGET_DIR) COMMON_SRC = \ - build_config.c \ - debug.c \ - version.c \ + build/build_config.c \ + build/debug.c \ + build/version.c \ $(TARGET_DIR_SRC) \ main.c \ - mw.c \ + fc/mw.c \ common/encoding.c \ common/filter.c \ common/maths.c \ common/printf.c \ common/typeconversion.c \ config/config.c \ - config/runtime_config.c \ + fc/runtime_config.c \ drivers/adc.c \ drivers/buf_writer.c \ drivers/bus_i2c_soft.c \ @@ -395,8 +395,8 @@ COMMON_SRC = \ flight/pid_legacy.c \ flight/pid_betaflight.c \ io/beeper.c \ - io/rc_controls.c \ - io/rc_curves.c \ + fc/rc_controls.c \ + fc/rc_curves.c \ io/serial.c \ io/serial_4way.c \ io/serial_4way_avrootloader.c \ diff --git a/src/main/blackbox/blackbox.c b/src/main/blackbox/blackbox.c index d2fcb40a5..0ac0b0ff7 100644 --- a/src/main/blackbox/blackbox.c +++ b/src/main/blackbox/blackbox.c @@ -19,11 +19,12 @@ #include #include "platform.h" -#include "version.h" -#include "debug.h" #ifdef BLACKBOX +#include "build/version.h" +#include "build/debug.h" + #include "common/maths.h" #include "common/axis.h" #include "common/color.h" @@ -52,7 +53,7 @@ #include "io/beeper.h" #include "io/display.h" #include "io/escservo.h" -#include "io/rc_controls.h" +#include "fc/rc_controls.h" #include "io/gimbal.h" #include "io/gps.h" #include "io/ledstrip.h" @@ -75,7 +76,8 @@ #include "flight/pid.h" #include "flight/navigation.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + #include "config/config.h" #include "config/config_profile.h" #include "config/config_master.h" diff --git a/src/main/blackbox/blackbox_io.c b/src/main/blackbox/blackbox_io.c index 88306767c..8f7d81ac2 100644 --- a/src/main/blackbox/blackbox_io.c +++ b/src/main/blackbox/blackbox_io.c @@ -4,8 +4,8 @@ #include "blackbox_io.h" -#include "version.h" -#include "build_config.h" +#include "build/version.h" +#include "build/build_config.h" #include "common/maths.h" #include "common/axis.h" @@ -34,7 +34,7 @@ #include "io/display.h" #include "io/escservo.h" #include "rx/rx.h" -#include "io/rc_controls.h" +#include "fc/rc_controls.h" #include "io/osd.h" #include "io/vtx.h" @@ -56,7 +56,8 @@ #include "flight/pid.h" #include "flight/navigation.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + #include "config/config.h" #include "config/config_profile.h" #include "config/config_master.h" diff --git a/src/main/common/atomic.h b/src/main/build/atomic.h similarity index 100% rename from src/main/common/atomic.h rename to src/main/build/atomic.h diff --git a/src/main/build_config.c b/src/main/build/build_config.c similarity index 100% rename from src/main/build_config.c rename to src/main/build/build_config.c diff --git a/src/main/build_config.h b/src/main/build/build_config.h similarity index 100% rename from src/main/build_config.h rename to src/main/build/build_config.h diff --git a/src/main/debug.c b/src/main/build/debug.c similarity index 100% rename from src/main/debug.c rename to src/main/build/debug.c diff --git a/src/main/debug.h b/src/main/build/debug.h similarity index 100% rename from src/main/debug.h rename to src/main/build/debug.h diff --git a/src/main/version.c b/src/main/build/version.c similarity index 100% rename from src/main/version.c rename to src/main/build/version.c diff --git a/src/main/version.h b/src/main/build/version.h similarity index 100% rename from src/main/version.h rename to src/main/build/version.h diff --git a/src/main/common/printf.c b/src/main/common/printf.c index e11d49d15..39d072dbe 100644 --- a/src/main/common/printf.c +++ b/src/main/common/printf.c @@ -36,12 +36,11 @@ #include "platform.h" -#include "build_config.h" +#include "build/build_config.h" #include "drivers/serial.h" #include "io/serial.h" -#include "build_config.h" #include "printf.h" #ifdef REQUIRE_PRINTF_LONG_SUPPORT diff --git a/src/main/common/typeconversion.c b/src/main/common/typeconversion.c index 4e3f8b4c2..469d0b725 100644 --- a/src/main/common/typeconversion.c +++ b/src/main/common/typeconversion.c @@ -17,7 +17,7 @@ #include #include #include -#include "build_config.h" +#include "build/build_config.h" #include "maths.h" #ifdef REQUIRE_PRINTF_LONG_SUPPORT diff --git a/src/main/config/config.c b/src/main/config/config.c index da0aaea2c..1db98cec8 100755 --- a/src/main/config/config.c +++ b/src/main/config/config.c @@ -20,10 +20,9 @@ #include #include "platform.h" -#include "debug.h" -#include "build_config.h" -#include "debug.h" +#include "build/build_config.h" +#include "build/debug.h" #include "blackbox/blackbox_io.h" @@ -56,8 +55,8 @@ #include "io/serial.h" #include "io/gimbal.h" #include "io/escservo.h" -#include "io/rc_controls.h" -#include "io/rc_curves.h" +#include "fc/rc_controls.h" +#include "fc/rc_curves.h" #include "io/ledstrip.h" #include "io/gps.h" #include "io/osd.h" @@ -74,7 +73,8 @@ #include "flight/altitudehold.h" #include "flight/navigation.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + #include "config/config.h" #include "config/config_profile.h" diff --git a/src/main/drivers/accgyro_l3gd20.c b/src/main/drivers/accgyro_l3gd20.c index e227d7f8d..a9323004f 100644 --- a/src/main/drivers/accgyro_l3gd20.c +++ b/src/main/drivers/accgyro_l3gd20.c @@ -19,8 +19,8 @@ #include #include "platform.h" -#include "build_config.h" -#include "debug.h" +#include "build/build_config.h" +#include "build/debug.h" #include "common/maths.h" diff --git a/src/main/drivers/accgyro_lsm303dlhc.c b/src/main/drivers/accgyro_lsm303dlhc.c index 80a270b9f..43b75d585 100644 --- a/src/main/drivers/accgyro_lsm303dlhc.c +++ b/src/main/drivers/accgyro_lsm303dlhc.c @@ -22,7 +22,7 @@ #ifdef USE_ACC_LSM303DLHC -#include "debug.h" +#include "build/debug.h" #include "common/maths.h" #include "common/axis.h" diff --git a/src/main/drivers/accgyro_mpu.c b/src/main/drivers/accgyro_mpu.c index 428469721..b8d7d176a 100644 --- a/src/main/drivers/accgyro_mpu.c +++ b/src/main/drivers/accgyro_mpu.c @@ -21,8 +21,9 @@ #include #include "platform.h" -#include "build_config.h" -#include "debug.h" + +#include "build/build_config.h" +#include "build/debug.h" #include "common/maths.h" diff --git a/src/main/drivers/accgyro_mpu6050.c b/src/main/drivers/accgyro_mpu6050.c index 78e8b8e80..5d2198524 100644 --- a/src/main/drivers/accgyro_mpu6050.c +++ b/src/main/drivers/accgyro_mpu6050.c @@ -20,8 +20,9 @@ #include #include "platform.h" -#include "build_config.h" -#include "debug.h" + +#include "build/build_config.h" +#include "build/debug.h" #include "common/maths.h" diff --git a/src/main/drivers/accgyro_spi_mpu9250.c b/src/main/drivers/accgyro_spi_mpu9250.c index 0406e6023..c1c1169ae 100644 --- a/src/main/drivers/accgyro_spi_mpu9250.c +++ b/src/main/drivers/accgyro_spi_mpu9250.c @@ -27,7 +27,8 @@ #include #include "platform.h" -#include "light_led.h" + +#include "build/debug.h" #include "common/axis.h" #include "common/maths.h" @@ -38,7 +39,7 @@ #include "exti.h" #include "bus_spi.h" #include "gyro_sync.h" -#include "debug.h" +#include "light_led.h" #include "sensor.h" #include "accgyro.h" diff --git a/src/main/drivers/adc.c b/src/main/drivers/adc.c index 6bba10939..16b70f6c6 100644 --- a/src/main/drivers/adc.c +++ b/src/main/drivers/adc.c @@ -19,8 +19,9 @@ #include #include "platform.h" -#include "build_config.h" -#include "debug.h" + +#include "build/build_config.h" +#include "build/debug.h" #include "system.h" diff --git a/src/main/drivers/adc_stm32f10x.c b/src/main/drivers/adc_stm32f10x.c index 1ac85621d..19d7edf6f 100644 --- a/src/main/drivers/adc_stm32f10x.c +++ b/src/main/drivers/adc_stm32f10x.c @@ -23,7 +23,7 @@ #ifdef USE_ADC -#include "build_config.h" +#include "build/build_config.h" #include "system.h" #include "sensor.h" diff --git a/src/main/drivers/barometer_bmp085.c b/src/main/drivers/barometer_bmp085.c index 9b35646b6..9f022f6fe 100644 --- a/src/main/drivers/barometer_bmp085.c +++ b/src/main/drivers/barometer_bmp085.c @@ -20,7 +20,7 @@ #include -#include "build_config.h" +#include "build/build_config.h" #include "barometer.h" diff --git a/src/main/drivers/barometer_bmp280.c b/src/main/drivers/barometer_bmp280.c index 6d4245848..bebf45ac3 100644 --- a/src/main/drivers/barometer_bmp280.c +++ b/src/main/drivers/barometer_bmp280.c @@ -20,7 +20,7 @@ #include -#include "build_config.h" +#include "build/build_config.h" #include "barometer.h" diff --git a/src/main/drivers/barometer_ms5611.c b/src/main/drivers/barometer_ms5611.c index 468f86046..4864324de 100644 --- a/src/main/drivers/barometer_ms5611.c +++ b/src/main/drivers/barometer_ms5611.c @@ -20,14 +20,14 @@ #include +#include "build/build_config.h" + #include "barometer.h" #include "gpio.h" #include "system.h" #include "bus_i2c.h" -#include "build_config.h" - // MS5611, Standard address 0x77 #define MS5611_ADDR 0x77 diff --git a/src/main/drivers/bus_i2c_soft.c b/src/main/drivers/bus_i2c_soft.c index 42ea8cadc..540a13942 100644 --- a/src/main/drivers/bus_i2c_soft.c +++ b/src/main/drivers/bus_i2c_soft.c @@ -20,7 +20,8 @@ #include -#include "build_config.h" +#include "build/build_config.h" + #include "bus_i2c.h" #include "io.h" diff --git a/src/main/drivers/compass_ak8963.c b/src/main/drivers/compass_ak8963.c index d5b9a59de..d8e8fa6d5 100644 --- a/src/main/drivers/compass_ak8963.c +++ b/src/main/drivers/compass_ak8963.c @@ -20,11 +20,10 @@ #include -#include "build_config.h" - #include "platform.h" -#include "debug.h" +#include "build/build_config.h" +#include "build/debug.h" #include "common/axis.h" #include "common/maths.h" diff --git a/src/main/drivers/compass_ak8975.c b/src/main/drivers/compass_ak8975.c index 0e4d3677c..df6cfd4f1 100644 --- a/src/main/drivers/compass_ak8975.c +++ b/src/main/drivers/compass_ak8975.c @@ -24,7 +24,7 @@ #ifdef USE_MAG_AK8975 -#include "build_config.h" +#include "build/build_config.h" #include "common/axis.h" #include "common/maths.h" diff --git a/src/main/drivers/compass_hmc5883l.c b/src/main/drivers/compass_hmc5883l.c index 10fa9b3c6..6d9161454 100644 --- a/src/main/drivers/compass_hmc5883l.c +++ b/src/main/drivers/compass_hmc5883l.c @@ -24,7 +24,7 @@ #ifdef USE_MAG_HMC5883 -#include "debug.h" +#include "build/debug.h" #include "common/axis.h" #include "common/maths.h" diff --git a/src/main/drivers/gpio_stm32f4xx.c b/src/main/drivers/gpio_stm32f4xx.c index 0129bf68f..7c5281191 100644 --- a/src/main/drivers/gpio_stm32f4xx.c +++ b/src/main/drivers/gpio_stm32f4xx.c @@ -20,7 +20,7 @@ #include "platform.h" -#include "build_config.h" +#include "build/build_config.h" #include "gpio.h" diff --git a/src/main/drivers/light_ws2811strip.c b/src/main/drivers/light_ws2811strip.c index d9c29af37..3c1b5d447 100644 --- a/src/main/drivers/light_ws2811strip.c +++ b/src/main/drivers/light_ws2811strip.c @@ -32,7 +32,7 @@ #ifdef LED_STRIP -#include "build_config.h" +#include "build/build_config.h" #include "common/color.h" #include "common/colorconversion.h" diff --git a/src/main/drivers/max7456.c b/src/main/drivers/max7456.c index 7ddc2a058..bea03d8c0 100644 --- a/src/main/drivers/max7456.c +++ b/src/main/drivers/max7456.c @@ -22,8 +22,6 @@ #ifdef USE_MAX7456 -#include "version.h" - #include "common/printf.h" #include "bus_spi.h" diff --git a/src/main/drivers/pwm_rx.c b/src/main/drivers/pwm_rx.c index 60af85e97..cb40782c9 100644 --- a/src/main/drivers/pwm_rx.c +++ b/src/main/drivers/pwm_rx.c @@ -22,8 +22,8 @@ #ifndef SKIP_RX_PWM_PPM -#include "build_config.h" -#include "debug.h" +#include "build/build_config.h" +#include "build/debug.h" #include "common/utils.h" diff --git a/src/main/drivers/serial_softserial.c b/src/main/drivers/serial_softserial.c index d8fafdf78..a5e41c8ec 100644 --- a/src/main/drivers/serial_softserial.c +++ b/src/main/drivers/serial_softserial.c @@ -22,10 +22,10 @@ #if defined(USE_SOFTSERIAL1) || defined(USE_SOFTSERIAL2) -#include "build_config.h" +#include "build/build_config.h" +#include "build/atomic.h" #include "common/utils.h" -#include "common/atomic.h" #include "nvic.h" #include "system.h" diff --git a/src/main/drivers/serial_uart.c b/src/main/drivers/serial_uart.c index 466370117..68a43289e 100644 --- a/src/main/drivers/serial_uart.c +++ b/src/main/drivers/serial_uart.c @@ -25,7 +25,7 @@ #include "platform.h" -#include "build_config.h" +#include "build/build_config.h" #include "common/utils.h" #include "gpio.h" diff --git a/src/main/drivers/serial_usb_vcp.c b/src/main/drivers/serial_usb_vcp.c index 50c6055dd..81d71a7ed 100644 --- a/src/main/drivers/serial_usb_vcp.c +++ b/src/main/drivers/serial_usb_vcp.c @@ -20,7 +20,8 @@ #include "platform.h" -#include "build_config.h" +#include "build/build_config.h" + #include "common/utils.h" #include "io.h" diff --git a/src/main/drivers/sonar_hcsr04.c b/src/main/drivers/sonar_hcsr04.c index cbfcf80a1..dd0e9b684 100644 --- a/src/main/drivers/sonar_hcsr04.c +++ b/src/main/drivers/sonar_hcsr04.c @@ -19,7 +19,8 @@ #include #include "platform.h" -#include "build_config.h" + +#include "build/build_config.h" #include "system.h" #include "nvic.h" diff --git a/src/main/drivers/timer.c b/src/main/drivers/timer.c index 5051588c9..da2889ac9 100755 --- a/src/main/drivers/timer.c +++ b/src/main/drivers/timer.c @@ -20,8 +20,10 @@ #include #include "platform.h" + +#include "build/atomic.h" + #include "common/utils.h" -#include "common/atomic.h" #include "nvic.h" diff --git a/src/main/mw.c b/src/main/fc/mw.c similarity index 99% rename from src/main/mw.c rename to src/main/fc/mw.c index b2c569e98..98ad21ba7 100644 --- a/src/main/mw.c +++ b/src/main/fc/mw.c @@ -21,7 +21,8 @@ #include #include "platform.h" -#include "debug.h" + +#include "build/debug.h" #include "common/maths.h" #include "common/axis.h" @@ -53,8 +54,8 @@ #include "io/beeper.h" #include "io/display.h" #include "io/escservo.h" -#include "io/rc_controls.h" -#include "io/rc_curves.h" +#include "fc/rc_controls.h" +#include "fc/rc_curves.h" #include "io/gimbal.h" #include "io/gps.h" #include "io/ledstrip.h" @@ -82,7 +83,7 @@ #include "flight/gtune.h" #include "flight/navigation.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" #include "config/config.h" #include "config/config_profile.h" #include "config/config_master.h" diff --git a/src/main/mw.h b/src/main/fc/mw.h similarity index 100% rename from src/main/mw.h rename to src/main/fc/mw.h diff --git a/src/main/io/rc_controls.c b/src/main/fc/rc_controls.c similarity index 99% rename from src/main/io/rc_controls.c rename to src/main/fc/rc_controls.c index 697ccf235..4d133bb32 100644 --- a/src/main/io/rc_controls.c +++ b/src/main/fc/rc_controls.c @@ -23,13 +23,14 @@ #include "platform.h" -#include "build_config.h" +#include "build/build_config.h" #include "common/axis.h" #include "common/maths.h" #include "config/config.h" -#include "config/runtime_config.h" + +#include "fc/runtime_config.h" #include "drivers/system.h" #include "drivers/sensor.h" @@ -46,8 +47,8 @@ #include "io/gps.h" #include "io/beeper.h" #include "io/escservo.h" -#include "io/rc_controls.h" -#include "io/rc_curves.h" +#include "fc/rc_controls.h" +#include "fc/rc_curves.h" #include "io/vtx.h" #include "io/display.h" @@ -58,7 +59,7 @@ #include "blackbox/blackbox.h" -#include "mw.h" +#include "fc/mw.h" static escAndServoConfig_t *escAndServoConfig; static pidProfile_t *pidProfile; diff --git a/src/main/io/rc_controls.h b/src/main/fc/rc_controls.h similarity index 100% rename from src/main/io/rc_controls.h rename to src/main/fc/rc_controls.h diff --git a/src/main/io/rc_curves.c b/src/main/fc/rc_curves.c similarity index 96% rename from src/main/io/rc_curves.c rename to src/main/fc/rc_curves.c index f96426bfd..534676e6d 100644 --- a/src/main/io/rc_curves.c +++ b/src/main/fc/rc_curves.c @@ -18,11 +18,14 @@ #include #include +#include "platform.h" + #include "config/config.h" #include "io/escservo.h" -#include "io/rc_curves.h" -#include "io/rc_controls.h" + +#include "fc/rc_curves.h" +#include "fc/rc_controls.h" #include "rx/rx.h" diff --git a/src/main/io/rc_curves.h b/src/main/fc/rc_curves.h similarity index 100% rename from src/main/io/rc_curves.h rename to src/main/fc/rc_curves.h diff --git a/src/main/config/runtime_config.c b/src/main/fc/runtime_config.c similarity index 97% rename from src/main/config/runtime_config.c rename to src/main/fc/runtime_config.c index 90304c975..889f612e1 100644 --- a/src/main/config/runtime_config.c +++ b/src/main/fc/runtime_config.c @@ -18,7 +18,9 @@ #include #include -#include "config/runtime_config.h" +#include "platform.h" + +#include "fc/runtime_config.h" #include "io/beeper.h" uint8_t armingFlags = 0; diff --git a/src/main/config/runtime_config.h b/src/main/fc/runtime_config.h similarity index 100% rename from src/main/config/runtime_config.h rename to src/main/fc/runtime_config.h diff --git a/src/main/flight/altitudehold.c b/src/main/flight/altitudehold.c index 1d67ba3d9..ee2a2322a 100644 --- a/src/main/flight/altitudehold.c +++ b/src/main/flight/altitudehold.c @@ -23,7 +23,7 @@ #include "platform.h" -#include "debug.h" +#include "build/debug.h" #include "common/maths.h" #include "common/axis.h" @@ -39,14 +39,15 @@ #include "rx/rx.h" -#include "io/rc_controls.h" +#include "fc/rc_controls.h" #include "io/escservo.h" #include "flight/mixer.h" #include "flight/pid.h" #include "flight/imu.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + int32_t setVelocity = 0; uint8_t velocityControl = 0; diff --git a/src/main/flight/failsafe.c b/src/main/flight/failsafe.c index a553cb58f..86c8aef76 100644 --- a/src/main/flight/failsafe.c +++ b/src/main/flight/failsafe.c @@ -20,7 +20,7 @@ #include -#include "debug.h" +#include "build/debug.h" #include "common/axis.h" @@ -28,8 +28,9 @@ #include "drivers/system.h" #include "io/beeper.h" #include "io/escservo.h" -#include "io/rc_controls.h" -#include "config/runtime_config.h" +#include "fc/rc_controls.h" +#include "fc/runtime_config.h" + #include "config/config.h" #include "flight/failsafe.h" diff --git a/src/main/flight/gtune.c b/src/main/flight/gtune.c index afef499d5..17c502754 100644 --- a/src/main/flight/gtune.c +++ b/src/main/flight/gtune.c @@ -41,9 +41,10 @@ #include "config/config.h" #include "blackbox/blackbox.h" -#include "io/rc_controls.h" +#include "fc/rc_controls.h" + +#include "fc/runtime_config.h" -#include "config/runtime_config.h" extern uint16_t cycleTime; extern uint8_t motorCount; diff --git a/src/main/flight/imu.c b/src/main/flight/imu.c index 8945e765e..f07ec4782 100644 --- a/src/main/flight/imu.c +++ b/src/main/flight/imu.c @@ -23,9 +23,10 @@ #include "common/maths.h" -#include "build_config.h" #include "platform.h" -#include "debug.h" + +#include "build/build_config.h" +#include "build/debug.h" #include "common/axis.h" @@ -47,7 +48,8 @@ #include "io/gps.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + // the limit (in degrees/second) beyond which we stop integrating // omega_I. At larger spin rates the DCM PI controller can get 'dizzy' diff --git a/src/main/flight/mixer.c b/src/main/flight/mixer.c index 303f6960b..0ed25a2ea 100755 --- a/src/main/flight/mixer.c +++ b/src/main/flight/mixer.c @@ -22,9 +22,9 @@ #include #include "platform.h" -#include "debug.h" -#include "build_config.h" +#include "build/build_config.h" +#include "build/debug.h" #include "common/axis.h" #include "common/maths.h" @@ -41,7 +41,7 @@ #include "io/gimbal.h" #include "io/escservo.h" -#include "io/rc_controls.h" +#include "fc/rc_controls.h" #include "sensors/sensors.h" #include "sensors/acceleration.h" @@ -52,7 +52,8 @@ #include "flight/pid.h" #include "flight/imu.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + #include "config/config.h" uint8_t motorCount; diff --git a/src/main/flight/navigation.c b/src/main/flight/navigation.c index 057c867a6..6b77ca61f 100644 --- a/src/main/flight/navigation.c +++ b/src/main/flight/navigation.c @@ -23,7 +23,8 @@ #include #include "platform.h" -#include "debug.h" + +#include "build/debug.h" #include "common/maths.h" #include "common/axis.h" @@ -43,7 +44,7 @@ #include "io/beeper.h" #include "io/serial.h" #include "io/gps.h" -#include "io/rc_controls.h" +#include "fc/rc_controls.h" #include "flight/pid.h" #include "flight/navigation.h" @@ -54,7 +55,8 @@ #include "config/config.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + extern int16_t magHold; diff --git a/src/main/flight/pid.c b/src/main/flight/pid.c index be1bcf203..05969e4f1 100644 --- a/src/main/flight/pid.c +++ b/src/main/flight/pid.c @@ -21,8 +21,8 @@ #include -#include "build_config.h" -#include "debug.h" +#include "build/build_config.h" +#include "build/debug.h" #include "common/axis.h" #include "common/maths.h" @@ -37,7 +37,7 @@ #include "rx/rx.h" -#include "io/rc_controls.h" +#include "fc/rc_controls.h" #include "io/gps.h" #include "flight/pid.h" @@ -45,7 +45,8 @@ #include "flight/navigation.h" #include "flight/gtune.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + uint32_t targetPidLooptime; diff --git a/src/main/flight/pid_betaflight.c b/src/main/flight/pid_betaflight.c index 39616552e..3ddb38e87 100644 --- a/src/main/flight/pid_betaflight.c +++ b/src/main/flight/pid_betaflight.c @@ -23,8 +23,8 @@ #ifndef SKIP_PID_FLOAT -#include "build_config.h" -#include "debug.h" +#include "build/build_config.h" +#include "build/debug.h" #include "common/axis.h" #include "common/maths.h" @@ -39,16 +39,16 @@ #include "rx/rx.h" -#include "io/rc_controls.h" #include "io/gps.h" +#include "fc/rc_controls.h" +#include "fc/runtime_config.h" + #include "flight/pid.h" #include "flight/imu.h" #include "flight/navigation.h" #include "flight/gtune.h" -#include "config/runtime_config.h" - extern float rcInput[3]; extern float setpointRate[3]; diff --git a/src/main/flight/pid_legacy.c b/src/main/flight/pid_legacy.c index 0424f5461..24c3aac56 100644 --- a/src/main/flight/pid_legacy.c +++ b/src/main/flight/pid_legacy.c @@ -21,8 +21,8 @@ #include -#include "build_config.h" -#include "debug.h" +#include "build/build_config.h" +#include "build/debug.h" #include "common/axis.h" #include "common/maths.h" @@ -38,15 +38,16 @@ #include "rx/rx.h" -#include "io/rc_controls.h" #include "io/gps.h" +#include "fc/runtime_config.h" +#include "fc/rc_controls.h" + #include "flight/pid.h" #include "flight/imu.h" #include "flight/navigation.h" #include "flight/gtune.h" -#include "config/runtime_config.h" extern uint8_t motorCount; extern uint8_t PIDweight[3]; diff --git a/src/main/io/beeper.c b/src/main/io/beeper.c index cd616044d..e015172be 100644 --- a/src/main/io/beeper.c +++ b/src/main/io/beeper.c @@ -20,7 +20,8 @@ #include "stdlib.h" #include -#include "build_config.h" + +#include "build/build_config.h" #include "drivers/gpio.h" #include "drivers/sound_beeper.h" @@ -28,7 +29,7 @@ #include "sensors/battery.h" #include "sensors/sensors.h" -#include "io/rc_controls.h" +#include "fc/rc_controls.h" #include "io/statusindicator.h" #include "io/vtx.h" @@ -37,7 +38,8 @@ #include "io/gps.h" #endif -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + #include "config/config.h" #include "io/beeper.h" diff --git a/src/main/io/display.c b/src/main/io/display.c index a22ca8802..ce18ee370 100644 --- a/src/main/io/display.c +++ b/src/main/io/display.c @@ -23,10 +23,10 @@ #ifdef DISPLAY -#include "version.h" -#include "debug.h" +#include "build/version.h" +#include "build/debug.h" -#include "build_config.h" +#include "build/build_config.h" #include "drivers/serial.h" #include "drivers/system.h" @@ -46,7 +46,7 @@ #include "sensors/acceleration.h" #include "sensors/gyro.h" -#include "io/rc_controls.h" +#include "fc/rc_controls.h" #include "flight/pid.h" #include "flight/imu.h" @@ -58,7 +58,8 @@ #endif #include "config/config.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + #include "config/config_profile.h" #include "io/display.h" diff --git a/src/main/io/gps.c b/src/main/io/gps.c index af963adcd..11a9f0873 100755 --- a/src/main/io/gps.c +++ b/src/main/io/gps.c @@ -26,8 +26,8 @@ #ifdef GPS -#include "build_config.h" -#include "debug.h" +#include "build/build_config.h" +#include "build/debug.h" #include "common/maths.h" #include "common/axis.h" @@ -50,7 +50,7 @@ #include "flight/navigation.h" #include "config/config.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" #define LOG_ERROR '?' diff --git a/src/main/io/ledstrip.c b/src/main/io/ledstrip.c index 2458260b6..07c0e65bd 100644 --- a/src/main/io/ledstrip.c +++ b/src/main/io/ledstrip.c @@ -23,13 +23,13 @@ #include -#include - #ifdef LED_STRIP -#include -#include -#include +#include "build/build_config.h" + +#include "common/color.h" +#include "common/maths.h" +#include "common/typeconversion.h" #include "drivers/light_ws2811strip.h" #include "drivers/system.h" @@ -44,7 +44,7 @@ #include "common/axis.h" #include "common/utils.h" -#include "io/rc_controls.h" +#include "fc/rc_controls.h" #include "sensors/battery.h" #include "sensors/sensors.h" @@ -72,7 +72,8 @@ #include "telemetry/telemetry.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + #include "config/config.h" #include "config/config_profile.h" #include "config/config_master.h" diff --git a/src/main/io/osd.c b/src/main/io/osd.c index abd862dd1..d956df483 100644 --- a/src/main/io/osd.c +++ b/src/main/io/osd.c @@ -23,12 +23,18 @@ #include #include "platform.h" -#include "version.h" + +#ifdef OSD + +#include "build/atomic.h" +#include "build/build_config.h" +#include "build/debug.h" +#include "build/version.h" + #include "scheduler/scheduler.h" #include "common/axis.h" #include "common/color.h" -#include "common/atomic.h" #include "common/maths.h" #include "common/typeconversion.h" @@ -64,7 +70,7 @@ #include "io/flashfs.h" #include "io/gps.h" #include "io/escservo.h" -#include "io/rc_controls.h" +#include "fc/rc_controls.h" #include "io/gimbal.h" #include "io/ledstrip.h" #include "io/display.h" @@ -91,7 +97,8 @@ #include "flight/failsafe.h" #include "flight/navigation.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + #include "config/config.h" #include "config/config_profile.h" #include "config/config_master.h" @@ -100,11 +107,6 @@ #include "hardware_revision.h" #endif -#include "build_config.h" -#include "debug.h" - -#ifdef OSD - #include "drivers/max7456.h" #include "drivers/max7456_symbols.h" diff --git a/src/main/io/serial.c b/src/main/io/serial.c index 3cc38a5ae..83eb4260e 100644 --- a/src/main/io/serial.c +++ b/src/main/io/serial.c @@ -21,7 +21,7 @@ #include "platform.h" -#include "build_config.h" +#include "build/build_config.h" #include "common/utils.h" diff --git a/src/main/io/serial_cli.c b/src/main/io/serial_cli.c index 463ffb72d..958a602c3 100644 --- a/src/main/io/serial_cli.c +++ b/src/main/io/serial_cli.c @@ -24,10 +24,10 @@ #include #include "platform.h" -#include "version.h" -#include "debug.h" -#include "build_config.h" +#include "build/version.h" +#include "build/debug.h" +#include "build/build_config.h" #include "common/axis.h" #include "common/maths.h" @@ -54,7 +54,7 @@ #include "io/escservo.h" #include "io/gps.h" #include "io/gimbal.h" -#include "io/rc_controls.h" +#include "fc/rc_controls.h" #include "io/serial.h" #include "io/ledstrip.h" #include "io/flashfs.h" @@ -83,7 +83,8 @@ #include "telemetry/telemetry.h" #include "telemetry/frsky.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + #include "config/config.h" #include "config/config_profile.h" #include "config/config_master.h" diff --git a/src/main/io/serial_msp.c b/src/main/io/serial_msp.c index 031d0ddf6..c625ee847 100644 --- a/src/main/io/serial_msp.c +++ b/src/main/io/serial_msp.c @@ -21,10 +21,12 @@ #include #include -#include "build_config.h" -#include "debug.h" #include "platform.h" +#include "build/build_config.h" +#include "build/debug.h" +#include "build/version.h" + #include "common/axis.h" #include "common/color.h" #include "common/maths.h" @@ -50,7 +52,7 @@ #include "io/beeper.h" #include "io/escservo.h" -#include "io/rc_controls.h" +#include "fc/rc_controls.h" #include "io/gps.h" #include "io/gimbal.h" #include "io/serial.h" @@ -84,14 +86,14 @@ #include "blackbox/blackbox.h" -#include "mw.h" +#include "fc/mw.h" + +#include "fc/runtime_config.h" -#include "config/runtime_config.h" #include "config/config.h" #include "config/config_profile.h" #include "config/config_master.h" -#include "version.h" #ifdef USE_HARDWARE_REVISION_DETECTION #include "hardware_revision.h" #endif diff --git a/src/main/io/transponder_ir.c b/src/main/io/transponder_ir.c index fa4f66118..633e56e06 100644 --- a/src/main/io/transponder_ir.c +++ b/src/main/io/transponder_ir.c @@ -23,7 +23,7 @@ #include -#include +#include #include "drivers/transponder_ir.h" #include "drivers/system.h" diff --git a/src/main/io/vtx.c b/src/main/io/vtx.c index 15a3de334..6c6f6ab94 100644 --- a/src/main/io/vtx.c +++ b/src/main/io/vtx.c @@ -50,8 +50,8 @@ #include "io/serial.h" #include "io/gimbal.h" #include "io/escservo.h" -#include "io/rc_controls.h" -#include "io/rc_curves.h" +#include "fc/rc_controls.h" +#include "fc/rc_curves.h" #include "io/ledstrip.h" #include "io/gps.h" #include "io/vtx.h" @@ -70,7 +70,8 @@ #include "config/config.h" #include "config/config_profile.h" #include "config/config_master.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + static uint8_t locked = 0; diff --git a/src/main/main.c b/src/main/main.c index 436f5b579..c642eef76 100644 --- a/src/main/main.c +++ b/src/main/main.c @@ -70,7 +70,7 @@ #include "io/flashfs.h" #include "io/gps.h" #include "io/escservo.h" -#include "io/rc_controls.h" +#include "fc/rc_controls.h" #include "io/gimbal.h" #include "io/ledstrip.h" #include "io/display.h" @@ -102,7 +102,8 @@ #include "flight/failsafe.h" #include "flight/navigation.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + #include "config/config.h" #include "config/config_profile.h" #include "config/config_master.h" @@ -111,8 +112,8 @@ #include "hardware_revision.h" #endif -#include "build_config.h" -#include "debug.h" +#include "build/build_config.h" +#include "build/debug.h" extern uint8_t motorControlEnable; diff --git a/src/main/rx/ibus.c b/src/main/rx/ibus.c index 507df1eff..562999ccf 100755 --- a/src/main/rx/ibus.c +++ b/src/main/rx/ibus.c @@ -16,7 +16,7 @@ * * * Driver for IBUS (Flysky) receiver - * - initial implementation for MultiWii by Cesco/Plüschi + * - initial implementation for MultiWii by Cesco/Pl¸schi * - implementation for BaseFlight by Andreas (fiendie) Tacke * - ported to CleanFlight by Konstantin (digitalentity) Sharlaimov */ @@ -27,7 +27,7 @@ #include -#include "build_config.h" +#include "build/build_config.h" #include "drivers/system.h" diff --git a/src/main/rx/jetiexbus.c b/src/main/rx/jetiexbus.c index d4050b8c8..2c8d2a72a 100644 --- a/src/main/rx/jetiexbus.c +++ b/src/main/rx/jetiexbus.c @@ -39,8 +39,8 @@ #include "platform.h" -#include "build_config.h" -#include "debug.h" +#include "build/build_config.h" +#include "build/debug.h" #include "common/utils.h" diff --git a/src/main/rx/msp.c b/src/main/rx/msp.c index 141d37a77..b850b9cab 100644 --- a/src/main/rx/msp.c +++ b/src/main/rx/msp.c @@ -22,7 +22,7 @@ #ifndef SKIP_RX_MSP -#include "build_config.h" +#include "build/build_config.h" #include "drivers/system.h" diff --git a/src/main/rx/pwm.c b/src/main/rx/pwm.c index 517a361e6..a85fd9475 100644 --- a/src/main/rx/pwm.c +++ b/src/main/rx/pwm.c @@ -25,7 +25,7 @@ #ifndef SKIP_RX_PWM_PPM -#include "build_config.h" +#include "build/build_config.h" #include "drivers/gpio.h" #include "drivers/timer.h" diff --git a/src/main/rx/rx.c b/src/main/rx/rx.c index bcba5bb86..d5629bfae 100644 --- a/src/main/rx/rx.c +++ b/src/main/rx/rx.c @@ -22,9 +22,9 @@ #include #include "platform.h" -#include "build_config.h" -#include "debug.h" +#include "build/build_config.h" +#include "build/debug.h" #include "common/maths.h" @@ -32,14 +32,16 @@ #include "drivers/serial.h" #include "drivers/adc.h" +#include "drivers/gpio.h" #include "drivers/timer.h" #include "drivers/pwm_rx.h" #include "drivers/system.h" +#include "fc/rc_controls.h" + #include "flight/failsafe.h" #include "io/serial.h" -#include "io/rc_controls.h" #include "rx/rx.h" #include "rx/pwm.h" diff --git a/src/main/rx/sbus.c b/src/main/rx/sbus.c index 8613a28fd..742f78340 100644 --- a/src/main/rx/sbus.c +++ b/src/main/rx/sbus.c @@ -21,7 +21,7 @@ #include "platform.h" -#include "build_config.h" +#include "build/build_config.h" #include "drivers/system.h" diff --git a/src/main/rx/spektrum.c b/src/main/rx/spektrum.c index fb211bfcf..16fc166e7 100644 --- a/src/main/rx/spektrum.c +++ b/src/main/rx/spektrum.c @@ -20,7 +20,8 @@ #include #include "platform.h" -#include "debug.h" + +#include "build/debug.h" #include "drivers/io.h" #include "drivers/io_impl.h" diff --git a/src/main/rx/sumd.c b/src/main/rx/sumd.c index 8391b8fa0..70457d111 100644 --- a/src/main/rx/sumd.c +++ b/src/main/rx/sumd.c @@ -21,7 +21,7 @@ #include "platform.h" -#include "build_config.h" +#include "build/build_config.h" #include "drivers/system.h" diff --git a/src/main/rx/sumh.c b/src/main/rx/sumh.c index 87a49fbb7..3b608a5d3 100644 --- a/src/main/rx/sumh.c +++ b/src/main/rx/sumh.c @@ -27,7 +27,7 @@ #include "platform.h" -#include "build_config.h" +#include "build/build_config.h" #include "drivers/system.h" diff --git a/src/main/scheduler/scheduler.c b/src/main/scheduler/scheduler.c index cff97d77e..aa374072b 100755 --- a/src/main/scheduler/scheduler.c +++ b/src/main/scheduler/scheduler.c @@ -23,8 +23,8 @@ #include "platform.h" -#include "debug.h" -#include "build_config.h" +#include "build/build_config.h" +#include "build/debug.h" #include "scheduler/scheduler.h" #include "scheduler/scheduler_tasks.h" diff --git a/src/main/sensors/acceleration.c b/src/main/sensors/acceleration.c index d8cc423c1..c8600d430 100644 --- a/src/main/sensors/acceleration.c +++ b/src/main/sensors/acceleration.c @@ -20,7 +20,8 @@ #include #include "platform.h" -#include "debug.h" + +#include "build/debug.h" #include "common/axis.h" #include "common/filter.h" diff --git a/src/main/sensors/battery.c b/src/main/sensors/battery.c index 6d165cbc5..532f74ce7 100644 --- a/src/main/sensors/battery.c +++ b/src/main/sensors/battery.c @@ -19,7 +19,8 @@ #include "stdint.h" #include "platform.h" -#include "debug.h" + +#include "build/debug.h" #include "common/maths.h" #include "common/filter.h" @@ -27,12 +28,13 @@ #include "drivers/adc.h" #include "drivers/system.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + #include "config/config.h" #include "sensors/battery.h" -#include "io/rc_controls.h" +#include "fc/rc_controls.h" #include "io/beeper.h" #include "rx/rx.h" diff --git a/src/main/sensors/compass.c b/src/main/sensors/compass.c index 6f6735d0f..355508e95 100644 --- a/src/main/sensors/compass.c +++ b/src/main/sensors/compass.c @@ -28,7 +28,8 @@ #include "drivers/light_led.h" #include "sensors/boardalignment.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + #include "config/config.h" #include "sensors/sensors.h" diff --git a/src/main/sensors/gyro.c b/src/main/sensors/gyro.c index a17b61df2..c6d4c121a 100644 --- a/src/main/sensors/gyro.c +++ b/src/main/sensors/gyro.c @@ -20,7 +20,8 @@ #include #include "platform.h" -#include "debug.h" + +#include "build/debug.h" #include "common/axis.h" #include "common/maths.h" diff --git a/src/main/sensors/initialisation.c b/src/main/sensors/initialisation.c index c3465b393..3b25e0b56 100755 --- a/src/main/sensors/initialisation.c +++ b/src/main/sensors/initialisation.c @@ -20,7 +20,7 @@ #include "platform.h" -#include "build_config.h" +#include "build/build_config.h" #include "common/axis.h" @@ -60,7 +60,7 @@ #include "drivers/sonar_hcsr04.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" #include "sensors/sensors.h" #include "sensors/acceleration.h" diff --git a/src/main/sensors/sonar.c b/src/main/sensors/sonar.c index 89be0464e..88e2f2c47 100644 --- a/src/main/sensors/sonar.c +++ b/src/main/sensors/sonar.c @@ -20,16 +20,18 @@ #include #include "platform.h" -#include "build_config.h" #ifdef SONAR +#include "build/build_config.h" + #include "common/maths.h" #include "common/axis.h" #include "drivers/sonar_hcsr04.h" #include "drivers/io.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + #include "config/config.h" #include "sensors/sensors.h" diff --git a/src/main/target/ALIENFLIGHTF1/config.c b/src/main/target/ALIENFLIGHTF1/config.c index b16a16444..59dcf40e7 100644 --- a/src/main/target/ALIENFLIGHTF1/config.c +++ b/src/main/target/ALIENFLIGHTF1/config.c @@ -19,7 +19,7 @@ #include -#include "build_config.h" +#include "build/build_config.h" #include "blackbox/blackbox_io.h" @@ -48,8 +48,8 @@ #include "io/serial.h" #include "io/gimbal.h" #include "io/escservo.h" -#include "io/rc_controls.h" -#include "io/rc_curves.h" +#include "fc/rc_controls.h" +#include "fc/rc_curves.h" #include "io/ledstrip.h" #include "rx/rx.h" @@ -63,7 +63,8 @@ #include "flight/altitudehold.h" #include "flight/navigation.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + #include "config/config.h" #include "config/config_profile.h" diff --git a/src/main/target/ALIENFLIGHTF3/config.c b/src/main/target/ALIENFLIGHTF3/config.c index 3aed5a3ce..8fdd4b7e5 100644 --- a/src/main/target/ALIENFLIGHTF3/config.c +++ b/src/main/target/ALIENFLIGHTF3/config.c @@ -19,7 +19,7 @@ #include -#include "build_config.h" +#include "build/build_config.h" #include "blackbox/blackbox_io.h" @@ -51,8 +51,8 @@ #include "io/serial.h" #include "io/gimbal.h" #include "io/escservo.h" -#include "io/rc_controls.h" -#include "io/rc_curves.h" +#include "fc/rc_controls.h" +#include "fc/rc_curves.h" #include "io/ledstrip.h" #include "io/gps.h" #include "io/osd.h" @@ -69,7 +69,8 @@ #include "flight/altitudehold.h" #include "flight/navigation.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + #include "config/config.h" #include "config/config_profile.h" diff --git a/src/main/target/ALIENFLIGHTF3/hardware_revision.c b/src/main/target/ALIENFLIGHTF3/hardware_revision.c index a8f1ebdb7..c535c7d9a 100644 --- a/src/main/target/ALIENFLIGHTF3/hardware_revision.c +++ b/src/main/target/ALIENFLIGHTF3/hardware_revision.c @@ -20,7 +20,8 @@ #include #include "platform.h" -#include "build_config.h" + +#include "build/build_config.h" #include "drivers/system.h" #include "drivers/io.h" diff --git a/src/main/target/ALIENFLIGHTF4/config.c b/src/main/target/ALIENFLIGHTF4/config.c index 5264a1673..3b23a96c6 100644 --- a/src/main/target/ALIENFLIGHTF4/config.c +++ b/src/main/target/ALIENFLIGHTF4/config.c @@ -19,7 +19,7 @@ #include -#include "build_config.h" +#include "build/build_config.h" #include "blackbox/blackbox_io.h" @@ -51,8 +51,8 @@ #include "io/serial.h" #include "io/gimbal.h" #include "io/escservo.h" -#include "io/rc_controls.h" -#include "io/rc_curves.h" +#include "fc/rc_controls.h" +#include "fc/rc_curves.h" #include "io/ledstrip.h" #include "io/gps.h" #include "io/osd.h" @@ -69,7 +69,8 @@ #include "flight/altitudehold.h" #include "flight/navigation.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + #include "config/config.h" #include "config/config_profile.h" diff --git a/src/main/target/BLUEJAYF4/config.c b/src/main/target/BLUEJAYF4/config.c index 71007bb80..cd5d62e9a 100644 --- a/src/main/target/BLUEJAYF4/config.c +++ b/src/main/target/BLUEJAYF4/config.c @@ -19,7 +19,7 @@ #include -#include "build_config.h" +#include "build/build_config.h" #include "blackbox/blackbox_io.h" @@ -51,8 +51,8 @@ #include "io/serial.h" #include "io/gimbal.h" #include "io/escservo.h" -#include "io/rc_controls.h" -#include "io/rc_curves.h" +#include "fc/rc_controls.h" +#include "fc/rc_curves.h" #include "io/ledstrip.h" #include "io/gps.h" #include "io/osd.h" @@ -69,7 +69,8 @@ #include "flight/altitudehold.h" #include "flight/navigation.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + #include "config/config.h" #include "config/config_profile.h" diff --git a/src/main/target/BLUEJAYF4/hardware_revision.c b/src/main/target/BLUEJAYF4/hardware_revision.c index 3162e9f48..aa5f31132 100644 --- a/src/main/target/BLUEJAYF4/hardware_revision.c +++ b/src/main/target/BLUEJAYF4/hardware_revision.c @@ -20,7 +20,8 @@ #include #include "platform.h" -#include "build_config.h" + +#include "build/build_config.h" #include "drivers/system.h" #include "drivers/bus_spi.h" diff --git a/src/main/target/CJMCU/hardware_revision.c b/src/main/target/CJMCU/hardware_revision.c index 558e19a76..eacb851ec 100755 --- a/src/main/target/CJMCU/hardware_revision.c +++ b/src/main/target/CJMCU/hardware_revision.c @@ -21,7 +21,7 @@ #include "platform.h" -#include "build_config.h" +#include "build/build_config.h" #include "drivers/system.h" #include "drivers/bus_spi.h" diff --git a/src/main/target/COLIBRI/config.c b/src/main/target/COLIBRI/config.c index 7d20ab1d9..04bc7ffe8 100644 --- a/src/main/target/COLIBRI/config.c +++ b/src/main/target/COLIBRI/config.c @@ -20,9 +20,9 @@ #include #include "platform.h" -#include "debug.h" -#include "build_config.h" +#include "build/build_config.h" +#include "build/debug.h" #include "blackbox/blackbox_io.h" @@ -54,8 +54,8 @@ #include "io/serial.h" #include "io/gimbal.h" #include "io/escservo.h" -#include "io/rc_controls.h" -#include "io/rc_curves.h" +#include "fc/rc_controls.h" +#include "fc/rc_curves.h" #include "io/ledstrip.h" #include "io/gps.h" #include "io/osd.h" @@ -72,7 +72,7 @@ #include "flight/altitudehold.h" #include "flight/navigation.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" #include "config/config.h" #include "config/config_profile.h" diff --git a/src/main/target/COLIBRI_RACE/bus_bst_stm32f30x.c b/src/main/target/COLIBRI_RACE/bus_bst_stm32f30x.c index 655f19cfe..725e9076d 100644 --- a/src/main/target/COLIBRI_RACE/bus_bst_stm32f30x.c +++ b/src/main/target/COLIBRI_RACE/bus_bst_stm32f30x.c @@ -10,7 +10,7 @@ #include -#include +#include "build/build_config.h" #include "drivers/nvic.h" #include "bus_bst.h" diff --git a/src/main/target/COLIBRI_RACE/config.c b/src/main/target/COLIBRI_RACE/config.c index bbd5a49c9..544d08b2a 100644 --- a/src/main/target/COLIBRI_RACE/config.c +++ b/src/main/target/COLIBRI_RACE/config.c @@ -19,7 +19,7 @@ #include -#include "build_config.h" +#include "build/build_config.h" #include "blackbox/blackbox_io.h" @@ -51,8 +51,8 @@ #include "io/serial.h" #include "io/gimbal.h" #include "io/escservo.h" -#include "io/rc_controls.h" -#include "io/rc_curves.h" +#include "fc/rc_controls.h" +#include "fc/rc_curves.h" #include "io/ledstrip.h" #include "io/gps.h" #include "io/osd.h" @@ -69,7 +69,8 @@ #include "flight/altitudehold.h" #include "flight/navigation.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + #include "config/config.h" #include "config/config_profile.h" diff --git a/src/main/target/COLIBRI_RACE/i2c_bst.c b/src/main/target/COLIBRI_RACE/i2c_bst.c index c2cf9377d..7c706f7ff 100644 --- a/src/main/target/COLIBRI_RACE/i2c_bst.c +++ b/src/main/target/COLIBRI_RACE/i2c_bst.c @@ -6,8 +6,9 @@ #include #include -#include "build_config.h" -#include "debug.h" +#include "build/build_config.h" +#include "build/debug.h" +#include "build/version.h" #include "platform.h" @@ -31,7 +32,7 @@ #include "rx/msp.h" #include "io/escservo.h" -#include "io/rc_controls.h" +#include "fc/rc_controls.h" #include "io/gps.h" #include "io/gimbal.h" #include "io/serial.h" @@ -57,14 +58,13 @@ #include "flight/navigation.h" #include "flight/altitudehold.h" -#include "mw.h" +#include "fc/mw.h" +#include "fc/runtime_config.h" -#include "config/runtime_config.h" #include "config/config.h" #include "config/config_profile.h" #include "config/config_master.h" -#include "version.h" #ifdef NAZE #include "hardware_revision.h" #endif diff --git a/src/main/target/MOTOLAB/config.c b/src/main/target/MOTOLAB/config.c index 490236ce0..8afb1e3cf 100755 --- a/src/main/target/MOTOLAB/config.c +++ b/src/main/target/MOTOLAB/config.c @@ -19,7 +19,7 @@ #include -#include "build_config.h" +#include "build/build_config.h" #include "blackbox/blackbox_io.h" @@ -51,8 +51,8 @@ #include "io/serial.h" #include "io/gimbal.h" #include "io/escservo.h" -#include "io/rc_controls.h" -#include "io/rc_curves.h" +#include "fc/rc_controls.h" +#include "fc/rc_curves.h" #include "io/ledstrip.h" #include "io/gps.h" #include "io/osd.h" @@ -69,7 +69,8 @@ #include "flight/altitudehold.h" #include "flight/navigation.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + #include "config/config.h" #include "config/config_profile.h" diff --git a/src/main/target/NAZE/hardware_revision.c b/src/main/target/NAZE/hardware_revision.c index 3f87237db..1c55298f3 100755 --- a/src/main/target/NAZE/hardware_revision.c +++ b/src/main/target/NAZE/hardware_revision.c @@ -21,7 +21,7 @@ #include "platform.h" -#include "build_config.h" +#include "build/build_config.h" #include "drivers/system.h" #include "drivers/bus_spi.h" diff --git a/src/main/telemetry/frsky.c b/src/main/telemetry/frsky.c index d698b958a..20552b01a 100644 --- a/src/main/telemetry/frsky.c +++ b/src/main/telemetry/frsky.c @@ -46,7 +46,7 @@ #include "sensors/battery.h" #include "io/serial.h" -#include "io/rc_controls.h" +#include "fc/rc_controls.h" #include "io/gps.h" #include "rx/rx.h" @@ -56,7 +56,8 @@ #include "flight/imu.h" #include "flight/altitudehold.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + #include "config/config.h" #include "telemetry/telemetry.h" diff --git a/src/main/telemetry/hott.c b/src/main/telemetry/hott.c index dcab855ae..bee5162b1 100644 --- a/src/main/telemetry/hott.c +++ b/src/main/telemetry/hott.c @@ -60,8 +60,8 @@ #ifdef TELEMETRY -#include "build_config.h" -#include "debug.h" +#include "build/build_config.h" +#include "build/debug.h" #include "common/axis.h" @@ -70,7 +70,7 @@ #include "drivers/serial.h" #include "io/serial.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" #include "sensors/sensors.h" #include "sensors/battery.h" diff --git a/src/main/telemetry/ltm.c b/src/main/telemetry/ltm.c index a7b7556e1..99cb4b250 100644 --- a/src/main/telemetry/ltm.c +++ b/src/main/telemetry/ltm.c @@ -35,7 +35,7 @@ #ifdef TELEMETRY -#include "build_config.h" +#include "build/build_config.h" #include "common/maths.h" #include "common/axis.h" @@ -57,7 +57,7 @@ #include "sensors/battery.h" #include "io/serial.h" -#include "io/rc_controls.h" +#include "fc/rc_controls.h" #include "io/gimbal.h" #include "io/gps.h" #include "io/ledstrip.h" @@ -78,7 +78,8 @@ #include "telemetry/ltm.h" #include "config/config.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + #define TELEMETRY_LTM_INITIAL_PORT_MODE MODE_TX #define LTM_CYCLETIME 100 diff --git a/src/main/telemetry/smartport.c b/src/main/telemetry/smartport.c index 8d167dd2c..4396b0c0a 100644 --- a/src/main/telemetry/smartport.c +++ b/src/main/telemetry/smartport.c @@ -32,7 +32,7 @@ #include "io/beeper.h" #include "io/escservo.h" -#include "io/rc_controls.h" +#include "fc/rc_controls.h" #include "io/gps.h" #include "io/gimbal.h" #include "io/serial.h" @@ -58,7 +58,8 @@ #include "telemetry/telemetry.h" #include "telemetry/smartport.h" -#include "config/runtime_config.h" +#include "fc/runtime_config.h" + #include "config/config.h" enum diff --git a/src/main/telemetry/telemetry.c b/src/main/telemetry/telemetry.c index 6373d166e..c0058839d 100644 --- a/src/main/telemetry/telemetry.c +++ b/src/main/telemetry/telemetry.c @@ -29,9 +29,10 @@ #include "io/serial.h" #include "rx/rx.h" -#include "io/rc_controls.h" +#include "fc/rc_controls.h" + +#include "fc/runtime_config.h" -#include "config/runtime_config.h" #include "config/config.h" #include "telemetry/telemetry.h" diff --git a/src/main/vcp/hw_config.c b/src/main/vcp/hw_config.c index d7552ea0f..1f7f471ee 100644 --- a/src/main/vcp/hw_config.c +++ b/src/main/vcp/hw_config.c @@ -39,7 +39,7 @@ #include "drivers/system.h" #include "drivers/nvic.h" -#include "build_config.h" +#include "build/build_config.h" /* Private typedef -----------------------------------------------------------*/