mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 12:25:20 +03:00
Merge remote-tracking branch 'multiwii/master'
Conflicts: obj/baseflight.hex src/config.c src/main.c src/mw.c src/mw.h src/serial_cli.c
This commit is contained in:
commit
e4c9fb585c
6 changed files with 13 additions and 12 deletions
|
@ -313,7 +313,7 @@ static void resetConf(void)
|
|||
masterConfig.serialConfig.reboot_character = 'R';
|
||||
|
||||
masterConfig.looptime = 3500;
|
||||
masterConfig.emfAvoidance = 0;
|
||||
masterConfig.emf_avoidance = 0;
|
||||
masterConfig.rssi_aux_channel = 0;
|
||||
|
||||
currentProfile.pidController = 0;
|
||||
|
@ -324,9 +324,10 @@ static void resetConf(void)
|
|||
currentProfile.controlRateConfig.rollPitchRate = 0;
|
||||
currentProfile.controlRateConfig.yawRate = 0;
|
||||
currentProfile.dynThrPID = 0;
|
||||
currentProfile.tpaBreakPoint = 1500;
|
||||
currentProfile.tpa_breakpoint = 1500;
|
||||
currentProfile.controlRateConfig.thrMid8 = 50;
|
||||
currentProfile.controlRateConfig.thrExpo8 = 0;
|
||||
|
||||
// for (i = 0; i < CHECKBOXITEMS; i++)
|
||||
// cfg.activate[i] = 0;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ typedef struct master_t {
|
|||
uint8_t mixerConfiguration;
|
||||
uint32_t enabledFeatures;
|
||||
uint16_t looptime; // imu loop time in us
|
||||
uint8_t emfAvoidance; // change pll settings to avoid noise in the uhf band
|
||||
uint8_t emf_avoidance; // change pll settings to avoid noise in the uhf band
|
||||
motorMixer_t customMixer[MAX_SUPPORTED_MOTORS]; // custom mixtable
|
||||
|
||||
// motor/esc/servo related stuff
|
||||
|
|
|
@ -8,7 +8,7 @@ typedef struct profile_s {
|
|||
controlRateConfig_t controlRateConfig;
|
||||
|
||||
uint8_t dynThrPID;
|
||||
uint16_t tpaBreakPoint; // Breakpoint where TPA is activated
|
||||
uint16_t tpa_breakpoint; // Breakpoint where TPA is activated
|
||||
int16_t mag_declination; // Get your magnetic decliniation from here : http://magnetic-declination.com/
|
||||
rollAndPitchTrims_t accelerometerTrims; // accelerometer trim
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ int main(void)
|
|||
serialPort_t* loopbackPort1 = NULL;
|
||||
serialPort_t* loopbackPort2 = NULL;
|
||||
#endif
|
||||
systemInit(masterConfig.emfAvoidance);
|
||||
systemInit(masterConfig.emf_avoidance);
|
||||
initPrintfSupport();
|
||||
|
||||
ensureEEPROMContainsValidData();
|
||||
|
|
4
src/mw.c
4
src/mw.c
|
@ -58,11 +58,11 @@ void annexCode(void)
|
|||
static uint8_t vbatTimer = 0;
|
||||
|
||||
// PITCH & ROLL only dynamic PID adjustemnt, depending on throttle value
|
||||
if (rcData[THROTTLE] < currentProfile.tpaBreakPoint) {
|
||||
if (rcData[THROTTLE] < currentProfile.tpa_breakpoint) {
|
||||
prop2 = 100;
|
||||
} else {
|
||||
if (rcData[THROTTLE] < 2000) {
|
||||
prop2 = 100 - (uint16_t)currentProfile.dynThrPID * (rcData[THROTTLE] - currentProfile.tpaBreakPoint) / (2000 - currentProfile.tpaBreakPoint);
|
||||
prop2 = 100 - (uint16_t)currentProfile.dynThrPID * (rcData[THROTTLE] - currentProfile.tpa_breakpoint) / (2000 - currentProfile.tpa_breakpoint);
|
||||
} else {
|
||||
prop2 = 100 - currentProfile.dynThrPID;
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ typedef struct {
|
|||
|
||||
const clivalue_t valueTable[] = {
|
||||
{ "looptime", VAR_UINT16, &masterConfig.looptime, 0, 9000 },
|
||||
{ "emf_avoidance", VAR_UINT8, &masterConfig.emfAvoidance, 0, 1 },
|
||||
{ "emf_avoidance", VAR_UINT8, &masterConfig.emf_avoidance, 0, 1 },
|
||||
{ "midrc", VAR_UINT16, &masterConfig.rxConfig.midrc, 1200, 1700 },
|
||||
{ "minthrottle", VAR_UINT16, &masterConfig.minthrottle, PWM_RANGE_ZERO, PWM_RANGE_MAX },
|
||||
{ "maxthrottle", VAR_UINT16, &masterConfig.maxthrottle, PWM_RANGE_ZERO, PWM_RANGE_MAX },
|
||||
|
@ -179,9 +179,9 @@ const clivalue_t valueTable[] = {
|
|||
{ "thr_mid", VAR_UINT8, ¤tProfile.controlRateConfig.thrMid8, 0, 100 },
|
||||
{ "thr_expo", VAR_UINT8, ¤tProfile.controlRateConfig.thrExpo8, 0, 100 },
|
||||
{ "roll_pitch_rate", VAR_UINT8, ¤tProfile.controlRateConfig.rollPitchRate, 0, 100 },
|
||||
{ "yawrate", VAR_UINT8, ¤tProfile.controlRateConfig.yawRate, 0, 100 },
|
||||
{ "tparate", VAR_UINT8, ¤tProfile.dynThrPID, 0, 100},
|
||||
{ "tpa_breakpoint", VAR_UINT16, ¤tProfile.tpaBreakPoint, PWM_RANGE_MIN, PWM_RANGE_MAX},
|
||||
{ "yaw_rate", VAR_UINT8, ¤tProfile.controlRateConfig.yawRate, 0, 100 },
|
||||
{ "tpa_rate", VAR_UINT8, ¤tProfile.dynThrPID, 0, 100},
|
||||
{ "tpa_breakpoint", VAR_UINT16, ¤tProfile.tpa_breakpoint, PWM_RANGE_MIN, PWM_RANGE_MAX},
|
||||
{ "failsafe_delay", VAR_UINT8, ¤tProfile.failsafeConfig.failsafe_delay, 0, 200 },
|
||||
{ "failsafe_off_delay", VAR_UINT8, ¤tProfile.failsafeConfig.failsafe_off_delay, 0, 200 },
|
||||
{ "failsafe_throttle", VAR_UINT16, ¤tProfile.failsafeConfig.failsafe_throttle, PWM_RANGE_MIN, PWM_RANGE_MAX },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue