From 5e45ec32935c179943502ebbe29bddd03a8ede39 Mon Sep 17 00:00:00 2001 From: mikeller Date: Wed, 11 Jan 2017 23:22:03 +1300 Subject: [PATCH] Renamed 'serial_cli' and 'fc_main'. --- Makefile | 6 ++--- src/main/fc/{serial_cli.c => cli.c} | 2 +- src/main/fc/{serial_cli.h => cli.h} | 0 src/main/fc/{fc_main.c => fc_core.c} | 2 +- src/main/fc/{fc_main.h => fc_core.h} | 0 src/main/fc/fc_init.c | 2 +- src/main/fc/fc_msp.c | 2 +- src/main/fc/fc_tasks.c | 4 ++-- src/main/fc/rc_controls.c | 32 +++++++++++++------------- src/main/flight/pid.c | 2 +- src/main/io/serial.c | 2 +- src/main/target/COLIBRI_RACE/i2c_bst.c | 2 +- 12 files changed, 28 insertions(+), 28 deletions(-) rename src/main/fc/{serial_cli.c => cli.c} (99%) rename src/main/fc/{serial_cli.h => cli.h} (100%) rename src/main/fc/{fc_main.c => fc_core.c} (99%) rename src/main/fc/{fc_main.h => fc_core.h} (100%) diff --git a/Makefile b/Makefile index e3f7de391..dcd122ec8 100644 --- a/Makefile +++ b/Makefile @@ -525,13 +525,13 @@ COMMON_SRC = \ fc/fc_init.c \ fc/fc_dispatch.c \ fc/fc_hardfaults.c \ - fc/fc_main.c \ + fc/fc_core.c \ fc/fc_msp.c \ fc/fc_tasks.c \ fc/rc_controls.c \ fc/rc_curves.c \ fc/runtime_config.c \ - fc/serial_cli.c \ + fc/cli.c \ flight/altitudehold.c \ flight/failsafe.c \ flight/imu.c \ @@ -702,7 +702,7 @@ SPEED_OPTIMISED_SRC := $(SPEED_OPTIMISED_SRC) \ SIZE_OPTIMISED_SRC := $(SIZE_OPTIMISED_SRC) \ drivers/serial_escserial.c \ - io/serial_cli.c \ + io/cli.c \ io/serial_4way.c \ io/serial_4way_avrootloader.c \ io/serial_4way_stk500v2.c \ diff --git a/src/main/fc/serial_cli.c b/src/main/fc/cli.c similarity index 99% rename from src/main/fc/serial_cli.c rename to src/main/fc/cli.c index 63a786f9a..83cb6719e 100755 --- a/src/main/fc/serial_cli.c +++ b/src/main/fc/cli.c @@ -69,7 +69,7 @@ uint8_t cliMode = 0; #include "fc/config.h" #include "fc/rc_controls.h" #include "fc/runtime_config.h" -#include "fc/serial_cli.h" +#include "fc/cli.h" #include "flight/failsafe.h" #include "flight/imu.h" diff --git a/src/main/fc/serial_cli.h b/src/main/fc/cli.h similarity index 100% rename from src/main/fc/serial_cli.h rename to src/main/fc/cli.h diff --git a/src/main/fc/fc_main.c b/src/main/fc/fc_core.c similarity index 99% rename from src/main/fc/fc_main.c rename to src/main/fc/fc_core.c index eb4de28d3..0abd62285 100644 --- a/src/main/fc/fc_main.c +++ b/src/main/fc/fc_core.c @@ -43,7 +43,7 @@ #include "fc/rc_controls.h" #include "fc/rc_curves.h" #include "fc/runtime_config.h" -#include "fc/serial_cli.h" +#include "fc/cli.h" #include "msp/msp_serial.h" diff --git a/src/main/fc/fc_main.h b/src/main/fc/fc_core.h similarity index 100% rename from src/main/fc/fc_main.h rename to src/main/fc/fc_core.h diff --git a/src/main/fc/fc_init.c b/src/main/fc/fc_init.c index 9e8e49df5..2cf275de3 100644 --- a/src/main/fc/fc_init.c +++ b/src/main/fc/fc_init.c @@ -69,7 +69,7 @@ #include "fc/fc_tasks.h" #include "fc/rc_controls.h" #include "fc/runtime_config.h" -#include "fc/serial_cli.h" +#include "fc/cli.h" #include "msp/msp_serial.h" diff --git a/src/main/fc/fc_msp.c b/src/main/fc/fc_msp.c index cfb868532..a3069cabb 100755 --- a/src/main/fc/fc_msp.c +++ b/src/main/fc/fc_msp.c @@ -49,7 +49,7 @@ #include "drivers/serial_escserial.h" #include "fc/config.h" -#include "fc/fc_main.h" +#include "fc/fc_core.h" #include "fc/fc_msp.h" #include "fc/rc_controls.h" #include "fc/runtime_config.h" diff --git a/src/main/fc/fc_tasks.c b/src/main/fc/fc_tasks.c index b45ae4477..644287026 100644 --- a/src/main/fc/fc_tasks.c +++ b/src/main/fc/fc_tasks.c @@ -36,10 +36,10 @@ #include "fc/config.h" #include "fc/fc_msp.h" #include "fc/fc_tasks.h" -#include "fc/fc_main.h" +#include "fc/fc_core.h" #include "fc/rc_controls.h" #include "fc/runtime_config.h" -#include "fc/serial_cli.h" +#include "fc/cli.h" #include "fc/fc_dispatch.h" #include "flight/pid.h" diff --git a/src/main/fc/rc_controls.c b/src/main/fc/rc_controls.c index d878f8ac7..fea3bdf4b 100644 --- a/src/main/fc/rc_controls.c +++ b/src/main/fc/rc_controls.c @@ -35,7 +35,7 @@ #include "drivers/system.h" #include "fc/config.h" -#include "fc/fc_main.h" +#include "fc/fc_core.h" #include "fc/rc_controls.h" #include "fc/rc_curves.h" #include "fc/runtime_config.h" @@ -512,17 +512,17 @@ static void applyStepAdjustment(controlRateConfig_t *controlRateConfig, uint8_t } switch(adjustmentFunction) { case ADJUSTMENT_RC_RATE: - newValue = constrain((int)controlRateConfig->rcRate8 + delta, 0, 250); // FIXME magic numbers repeated in serial_cli.c + newValue = constrain((int)controlRateConfig->rcRate8 + delta, 0, 250); // FIXME magic numbers repeated in cli.c controlRateConfig->rcRate8 = newValue; blackboxLogInflightAdjustmentEvent(ADJUSTMENT_RC_RATE, newValue); break; case ADJUSTMENT_RC_EXPO: - newValue = constrain((int)controlRateConfig->rcExpo8 + delta, 0, 100); // FIXME magic numbers repeated in serial_cli.c + newValue = constrain((int)controlRateConfig->rcExpo8 + delta, 0, 100); // FIXME magic numbers repeated in cli.c controlRateConfig->rcExpo8 = newValue; blackboxLogInflightAdjustmentEvent(ADJUSTMENT_RC_EXPO, newValue); break; case ADJUSTMENT_THROTTLE_EXPO: - newValue = constrain((int)controlRateConfig->thrExpo8 + delta, 0, 100); // FIXME magic numbers repeated in serial_cli.c + newValue = constrain((int)controlRateConfig->thrExpo8 + delta, 0, 100); // FIXME magic numbers repeated in cli.c controlRateConfig->thrExpo8 = newValue; generateThrottleCurve(controlRateConfig, motorConfig); blackboxLogInflightAdjustmentEvent(ADJUSTMENT_THROTTLE_EXPO, newValue); @@ -548,7 +548,7 @@ static void applyStepAdjustment(controlRateConfig_t *controlRateConfig, uint8_t break; case ADJUSTMENT_PITCH_ROLL_P: case ADJUSTMENT_PITCH_P: - newValue = constrain((int)pidProfile->P8[PIDPITCH] + delta, 0, 200); // FIXME magic numbers repeated in serial_cli.c + newValue = constrain((int)pidProfile->P8[PIDPITCH] + delta, 0, 200); // FIXME magic numbers repeated in cli.c pidProfile->P8[PIDPITCH] = newValue; blackboxLogInflightAdjustmentEvent(ADJUSTMENT_PITCH_P, newValue); @@ -557,13 +557,13 @@ static void applyStepAdjustment(controlRateConfig_t *controlRateConfig, uint8_t } // follow though for combined ADJUSTMENT_PITCH_ROLL_P case ADJUSTMENT_ROLL_P: - newValue = constrain((int)pidProfile->P8[PIDROLL] + delta, 0, 200); // FIXME magic numbers repeated in serial_cli.c + newValue = constrain((int)pidProfile->P8[PIDROLL] + delta, 0, 200); // FIXME magic numbers repeated in cli.c pidProfile->P8[PIDROLL] = newValue; blackboxLogInflightAdjustmentEvent(ADJUSTMENT_ROLL_P, newValue); break; case ADJUSTMENT_PITCH_ROLL_I: case ADJUSTMENT_PITCH_I: - newValue = constrain((int)pidProfile->I8[PIDPITCH] + delta, 0, 200); // FIXME magic numbers repeated in serial_cli.c + newValue = constrain((int)pidProfile->I8[PIDPITCH] + delta, 0, 200); // FIXME magic numbers repeated in cli.c pidProfile->I8[PIDPITCH] = newValue; blackboxLogInflightAdjustmentEvent(ADJUSTMENT_PITCH_I, newValue); @@ -572,13 +572,13 @@ static void applyStepAdjustment(controlRateConfig_t *controlRateConfig, uint8_t } // follow though for combined ADJUSTMENT_PITCH_ROLL_I case ADJUSTMENT_ROLL_I: - newValue = constrain((int)pidProfile->I8[PIDROLL] + delta, 0, 200); // FIXME magic numbers repeated in serial_cli.c + newValue = constrain((int)pidProfile->I8[PIDROLL] + delta, 0, 200); // FIXME magic numbers repeated in cli.c pidProfile->I8[PIDROLL] = newValue; blackboxLogInflightAdjustmentEvent(ADJUSTMENT_ROLL_I, newValue); break; case ADJUSTMENT_PITCH_ROLL_D: case ADJUSTMENT_PITCH_D: - newValue = constrain((int)pidProfile->D8[PIDPITCH] + delta, 0, 200); // FIXME magic numbers repeated in serial_cli.c + newValue = constrain((int)pidProfile->D8[PIDPITCH] + delta, 0, 200); // FIXME magic numbers repeated in cli.c pidProfile->D8[PIDPITCH] = newValue; blackboxLogInflightAdjustmentEvent(ADJUSTMENT_PITCH_D, newValue); @@ -587,37 +587,37 @@ static void applyStepAdjustment(controlRateConfig_t *controlRateConfig, uint8_t } // follow though for combined ADJUSTMENT_PITCH_ROLL_D case ADJUSTMENT_ROLL_D: - newValue = constrain((int)pidProfile->D8[PIDROLL] + delta, 0, 200); // FIXME magic numbers repeated in serial_cli.c + newValue = constrain((int)pidProfile->D8[PIDROLL] + delta, 0, 200); // FIXME magic numbers repeated in cli.c pidProfile->D8[PIDROLL] = newValue; blackboxLogInflightAdjustmentEvent(ADJUSTMENT_ROLL_D, newValue); break; case ADJUSTMENT_YAW_P: - newValue = constrain((int)pidProfile->P8[PIDYAW] + delta, 0, 200); // FIXME magic numbers repeated in serial_cli.c + newValue = constrain((int)pidProfile->P8[PIDYAW] + delta, 0, 200); // FIXME magic numbers repeated in cli.c pidProfile->P8[PIDYAW] = newValue; blackboxLogInflightAdjustmentEvent(ADJUSTMENT_YAW_P, newValue); break; case ADJUSTMENT_YAW_I: - newValue = constrain((int)pidProfile->I8[PIDYAW] + delta, 0, 200); // FIXME magic numbers repeated in serial_cli.c + newValue = constrain((int)pidProfile->I8[PIDYAW] + delta, 0, 200); // FIXME magic numbers repeated in cli.c pidProfile->I8[PIDYAW] = newValue; blackboxLogInflightAdjustmentEvent(ADJUSTMENT_YAW_I, newValue); break; case ADJUSTMENT_YAW_D: - newValue = constrain((int)pidProfile->D8[PIDYAW] + delta, 0, 200); // FIXME magic numbers repeated in serial_cli.c + newValue = constrain((int)pidProfile->D8[PIDYAW] + delta, 0, 200); // FIXME magic numbers repeated in cli.c pidProfile->D8[PIDYAW] = newValue; blackboxLogInflightAdjustmentEvent(ADJUSTMENT_YAW_D, newValue); break; case ADJUSTMENT_RC_RATE_YAW: - newValue = constrain((int)controlRateConfig->rcYawRate8 + delta, 0, 300); // FIXME magic numbers repeated in serial_cli.c + newValue = constrain((int)controlRateConfig->rcYawRate8 + delta, 0, 300); // FIXME magic numbers repeated in cli.c controlRateConfig->rcYawRate8 = newValue; blackboxLogInflightAdjustmentEvent(ADJUSTMENT_RC_RATE_YAW, newValue); break; case ADJUSTMENT_D_SETPOINT: - newValue = constrain((int)pidProfile->dtermSetpointWeight + delta, 0, 254); // FIXME magic numbers repeated in serial_cli.c + newValue = constrain((int)pidProfile->dtermSetpointWeight + delta, 0, 254); // FIXME magic numbers repeated in cli.c pidProfile->dtermSetpointWeight = newValue; blackboxLogInflightAdjustmentEvent(ADJUSTMENT_D_SETPOINT, newValue); break; case ADJUSTMENT_D_SETPOINT_TRANSITION: - newValue = constrain((int)pidProfile->setpointRelaxRatio + delta, 0, 100); // FIXME magic numbers repeated in serial_cli.c + newValue = constrain((int)pidProfile->setpointRelaxRatio + delta, 0, 100); // FIXME magic numbers repeated in cli.c pidProfile->setpointRelaxRatio = newValue; blackboxLogInflightAdjustmentEvent(ADJUSTMENT_D_SETPOINT_TRANSITION, newValue); break; diff --git a/src/main/flight/pid.c b/src/main/flight/pid.c index 7071610d9..3fc7165dd 100644 --- a/src/main/flight/pid.c +++ b/src/main/flight/pid.c @@ -28,7 +28,7 @@ #include "common/maths.h" #include "common/filter.h" -#include "fc/fc_main.h" +#include "fc/fc_core.h" #include "fc/rc_controls.h" #include "fc/runtime_config.h" diff --git a/src/main/io/serial.c b/src/main/io/serial.c index 11ba52c55..97af9db0b 100644 --- a/src/main/io/serial.c +++ b/src/main/io/serial.c @@ -42,7 +42,7 @@ #endif #include "io/serial.h" -#include "fc/serial_cli.h" // for cliEnter() +#include "fc/cli.h" // for cliEnter() #include "msp/msp_serial.h" diff --git a/src/main/target/COLIBRI_RACE/i2c_bst.c b/src/main/target/COLIBRI_RACE/i2c_bst.c index 7cc6297ca..a1f8ec5eb 100644 --- a/src/main/target/COLIBRI_RACE/i2c_bst.c +++ b/src/main/target/COLIBRI_RACE/i2c_bst.c @@ -29,7 +29,7 @@ #include "drivers/rx_pwm.h" #include "fc/config.h" -#include "fc/fc_main.h" +#include "fc/fc_core.h" #include "fc/rc_controls.h" #include "fc/runtime_config.h"