Merge pull request #2090 from mikeller/rename_serial_cli_fc_main
Renamed 'serial_cli' and 'fc_main'.
This commit is contained in:
commit
c6bbde7945
6
Makefile
6
Makefile
|
@ -525,13 +525,13 @@ COMMON_SRC = \
|
||||||
fc/fc_init.c \
|
fc/fc_init.c \
|
||||||
fc/fc_dispatch.c \
|
fc/fc_dispatch.c \
|
||||||
fc/fc_hardfaults.c \
|
fc/fc_hardfaults.c \
|
||||||
fc/fc_main.c \
|
fc/fc_core.c \
|
||||||
fc/fc_msp.c \
|
fc/fc_msp.c \
|
||||||
fc/fc_tasks.c \
|
fc/fc_tasks.c \
|
||||||
fc/rc_controls.c \
|
fc/rc_controls.c \
|
||||||
fc/rc_curves.c \
|
fc/rc_curves.c \
|
||||||
fc/runtime_config.c \
|
fc/runtime_config.c \
|
||||||
fc/serial_cli.c \
|
fc/cli.c \
|
||||||
flight/altitudehold.c \
|
flight/altitudehold.c \
|
||||||
flight/failsafe.c \
|
flight/failsafe.c \
|
||||||
flight/imu.c \
|
flight/imu.c \
|
||||||
|
@ -702,7 +702,7 @@ SPEED_OPTIMISED_SRC := $(SPEED_OPTIMISED_SRC) \
|
||||||
|
|
||||||
SIZE_OPTIMISED_SRC := $(SIZE_OPTIMISED_SRC) \
|
SIZE_OPTIMISED_SRC := $(SIZE_OPTIMISED_SRC) \
|
||||||
drivers/serial_escserial.c \
|
drivers/serial_escserial.c \
|
||||||
io/serial_cli.c \
|
io/cli.c \
|
||||||
io/serial_4way.c \
|
io/serial_4way.c \
|
||||||
io/serial_4way_avrootloader.c \
|
io/serial_4way_avrootloader.c \
|
||||||
io/serial_4way_stk500v2.c \
|
io/serial_4way_stk500v2.c \
|
||||||
|
|
|
@ -69,7 +69,7 @@ uint8_t cliMode = 0;
|
||||||
#include "fc/config.h"
|
#include "fc/config.h"
|
||||||
#include "fc/rc_controls.h"
|
#include "fc/rc_controls.h"
|
||||||
#include "fc/runtime_config.h"
|
#include "fc/runtime_config.h"
|
||||||
#include "fc/serial_cli.h"
|
#include "fc/cli.h"
|
||||||
|
|
||||||
#include "flight/failsafe.h"
|
#include "flight/failsafe.h"
|
||||||
#include "flight/imu.h"
|
#include "flight/imu.h"
|
|
@ -43,7 +43,7 @@
|
||||||
#include "fc/rc_controls.h"
|
#include "fc/rc_controls.h"
|
||||||
#include "fc/rc_curves.h"
|
#include "fc/rc_curves.h"
|
||||||
#include "fc/runtime_config.h"
|
#include "fc/runtime_config.h"
|
||||||
#include "fc/serial_cli.h"
|
#include "fc/cli.h"
|
||||||
|
|
||||||
#include "msp/msp_serial.h"
|
#include "msp/msp_serial.h"
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
#include "fc/fc_tasks.h"
|
#include "fc/fc_tasks.h"
|
||||||
#include "fc/rc_controls.h"
|
#include "fc/rc_controls.h"
|
||||||
#include "fc/runtime_config.h"
|
#include "fc/runtime_config.h"
|
||||||
#include "fc/serial_cli.h"
|
#include "fc/cli.h"
|
||||||
|
|
||||||
#include "msp/msp_serial.h"
|
#include "msp/msp_serial.h"
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
#include "drivers/serial_escserial.h"
|
#include "drivers/serial_escserial.h"
|
||||||
|
|
||||||
#include "fc/config.h"
|
#include "fc/config.h"
|
||||||
#include "fc/fc_main.h"
|
#include "fc/fc_core.h"
|
||||||
#include "fc/fc_msp.h"
|
#include "fc/fc_msp.h"
|
||||||
#include "fc/rc_controls.h"
|
#include "fc/rc_controls.h"
|
||||||
#include "fc/runtime_config.h"
|
#include "fc/runtime_config.h"
|
||||||
|
|
|
@ -36,10 +36,10 @@
|
||||||
#include "fc/config.h"
|
#include "fc/config.h"
|
||||||
#include "fc/fc_msp.h"
|
#include "fc/fc_msp.h"
|
||||||
#include "fc/fc_tasks.h"
|
#include "fc/fc_tasks.h"
|
||||||
#include "fc/fc_main.h"
|
#include "fc/fc_core.h"
|
||||||
#include "fc/rc_controls.h"
|
#include "fc/rc_controls.h"
|
||||||
#include "fc/runtime_config.h"
|
#include "fc/runtime_config.h"
|
||||||
#include "fc/serial_cli.h"
|
#include "fc/cli.h"
|
||||||
#include "fc/fc_dispatch.h"
|
#include "fc/fc_dispatch.h"
|
||||||
|
|
||||||
#include "flight/pid.h"
|
#include "flight/pid.h"
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#include "drivers/system.h"
|
#include "drivers/system.h"
|
||||||
|
|
||||||
#include "fc/config.h"
|
#include "fc/config.h"
|
||||||
#include "fc/fc_main.h"
|
#include "fc/fc_core.h"
|
||||||
#include "fc/rc_controls.h"
|
#include "fc/rc_controls.h"
|
||||||
#include "fc/rc_curves.h"
|
#include "fc/rc_curves.h"
|
||||||
#include "fc/runtime_config.h"
|
#include "fc/runtime_config.h"
|
||||||
|
@ -512,17 +512,17 @@ static void applyStepAdjustment(controlRateConfig_t *controlRateConfig, uint8_t
|
||||||
}
|
}
|
||||||
switch(adjustmentFunction) {
|
switch(adjustmentFunction) {
|
||||||
case ADJUSTMENT_RC_RATE:
|
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;
|
controlRateConfig->rcRate8 = newValue;
|
||||||
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_RC_RATE, newValue);
|
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_RC_RATE, newValue);
|
||||||
break;
|
break;
|
||||||
case ADJUSTMENT_RC_EXPO:
|
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;
|
controlRateConfig->rcExpo8 = newValue;
|
||||||
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_RC_EXPO, newValue);
|
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_RC_EXPO, newValue);
|
||||||
break;
|
break;
|
||||||
case ADJUSTMENT_THROTTLE_EXPO:
|
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;
|
controlRateConfig->thrExpo8 = newValue;
|
||||||
generateThrottleCurve(controlRateConfig, motorConfig);
|
generateThrottleCurve(controlRateConfig, motorConfig);
|
||||||
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_THROTTLE_EXPO, newValue);
|
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_THROTTLE_EXPO, newValue);
|
||||||
|
@ -548,7 +548,7 @@ static void applyStepAdjustment(controlRateConfig_t *controlRateConfig, uint8_t
|
||||||
break;
|
break;
|
||||||
case ADJUSTMENT_PITCH_ROLL_P:
|
case ADJUSTMENT_PITCH_ROLL_P:
|
||||||
case ADJUSTMENT_PITCH_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;
|
pidProfile->P8[PIDPITCH] = newValue;
|
||||||
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_PITCH_P, 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
|
// follow though for combined ADJUSTMENT_PITCH_ROLL_P
|
||||||
case ADJUSTMENT_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;
|
pidProfile->P8[PIDROLL] = newValue;
|
||||||
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_ROLL_P, newValue);
|
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_ROLL_P, newValue);
|
||||||
break;
|
break;
|
||||||
case ADJUSTMENT_PITCH_ROLL_I:
|
case ADJUSTMENT_PITCH_ROLL_I:
|
||||||
case ADJUSTMENT_PITCH_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;
|
pidProfile->I8[PIDPITCH] = newValue;
|
||||||
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_PITCH_I, 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
|
// follow though for combined ADJUSTMENT_PITCH_ROLL_I
|
||||||
case ADJUSTMENT_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;
|
pidProfile->I8[PIDROLL] = newValue;
|
||||||
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_ROLL_I, newValue);
|
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_ROLL_I, newValue);
|
||||||
break;
|
break;
|
||||||
case ADJUSTMENT_PITCH_ROLL_D:
|
case ADJUSTMENT_PITCH_ROLL_D:
|
||||||
case ADJUSTMENT_PITCH_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;
|
pidProfile->D8[PIDPITCH] = newValue;
|
||||||
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_PITCH_D, 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
|
// follow though for combined ADJUSTMENT_PITCH_ROLL_D
|
||||||
case ADJUSTMENT_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;
|
pidProfile->D8[PIDROLL] = newValue;
|
||||||
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_ROLL_D, newValue);
|
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_ROLL_D, newValue);
|
||||||
break;
|
break;
|
||||||
case ADJUSTMENT_YAW_P:
|
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;
|
pidProfile->P8[PIDYAW] = newValue;
|
||||||
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_YAW_P, newValue);
|
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_YAW_P, newValue);
|
||||||
break;
|
break;
|
||||||
case ADJUSTMENT_YAW_I:
|
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;
|
pidProfile->I8[PIDYAW] = newValue;
|
||||||
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_YAW_I, newValue);
|
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_YAW_I, newValue);
|
||||||
break;
|
break;
|
||||||
case ADJUSTMENT_YAW_D:
|
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;
|
pidProfile->D8[PIDYAW] = newValue;
|
||||||
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_YAW_D, newValue);
|
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_YAW_D, newValue);
|
||||||
break;
|
break;
|
||||||
case ADJUSTMENT_RC_RATE_YAW:
|
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;
|
controlRateConfig->rcYawRate8 = newValue;
|
||||||
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_RC_RATE_YAW, newValue);
|
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_RC_RATE_YAW, newValue);
|
||||||
break;
|
break;
|
||||||
case ADJUSTMENT_D_SETPOINT:
|
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;
|
pidProfile->dtermSetpointWeight = newValue;
|
||||||
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_D_SETPOINT, newValue);
|
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_D_SETPOINT, newValue);
|
||||||
break;
|
break;
|
||||||
case ADJUSTMENT_D_SETPOINT_TRANSITION:
|
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;
|
pidProfile->setpointRelaxRatio = newValue;
|
||||||
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_D_SETPOINT_TRANSITION, newValue);
|
blackboxLogInflightAdjustmentEvent(ADJUSTMENT_D_SETPOINT_TRANSITION, newValue);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include "common/maths.h"
|
#include "common/maths.h"
|
||||||
#include "common/filter.h"
|
#include "common/filter.h"
|
||||||
|
|
||||||
#include "fc/fc_main.h"
|
#include "fc/fc_core.h"
|
||||||
#include "fc/rc_controls.h"
|
#include "fc/rc_controls.h"
|
||||||
#include "fc/runtime_config.h"
|
#include "fc/runtime_config.h"
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "io/serial.h"
|
#include "io/serial.h"
|
||||||
#include "fc/serial_cli.h" // for cliEnter()
|
#include "fc/cli.h" // for cliEnter()
|
||||||
|
|
||||||
#include "msp/msp_serial.h"
|
#include "msp/msp_serial.h"
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include "drivers/rx_pwm.h"
|
#include "drivers/rx_pwm.h"
|
||||||
|
|
||||||
#include "fc/config.h"
|
#include "fc/config.h"
|
||||||
#include "fc/fc_main.h"
|
#include "fc/fc_core.h"
|
||||||
#include "fc/rc_controls.h"
|
#include "fc/rc_controls.h"
|
||||||
#include "fc/runtime_config.h"
|
#include "fc/runtime_config.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue