1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00
Commit graph

423 commits

Author SHA1 Message Date
mikeller
f32731638d Removed default changes from this pull request. 2018-06-03 22:44:42 +12:00
mikeller
75693fbd5b Added defaults and MSP support to filter settings. 2018-06-03 22:44:42 +12:00
mikeller
a9b3911e03 Made new PID loop improvements conditional, disabled some for F3 to save flash space. 2018-06-03 17:07:10 +12:00
mikeller
c666fcfa17 Reordered and optimised pidProfile parameter group. 2018-05-31 23:51:31 +12:00
Thorsten Laux
bb71b6ec64 correct drift 2018-05-30 23:06:27 +02:00
Thorsten Laux
8fe07af613 correct stickInput 2018-05-30 23:06:27 +02:00
Thorsten Laux
0138200c1c initialize acErrorRate if iterm_relax is off 2018-05-30 23:05:16 +02:00
Thorsten Laux
b40db51448 address style issues and set off by default 2018-05-30 23:05:15 +02:00
Thorsten Laux
bd289121fc absolute control feature 2018-05-30 23:04:26 +02:00
Thorsten Laux
df71817fba incorporate style feedback 2018-05-30 23:01:54 +02:00
Thorsten Laux
7c8c3b6784 address style requests 2018-05-30 23:01:54 +02:00
Thorsten Laux
85b0f6f9c2 ITerm relax feature 2018-05-30 23:01:54 +02:00
Bruce Luckcuck
ad067ee09a Overshoot logic updates, disable for GPS Rescue, constrain max setpoint
Updates for finalize the flight performance.

Disable if GPS Rescue is active

Constrain the max setpoint calculated by the angle correction logic. To catch border cases where the user activates the feature while inverted and has a high gain which could result in excessively high setpoint rates.

Make sure internal states are reset when feature is activated via mode switch.
2018-05-29 21:08:19 -04:00
Bruce Luckcuck
2384088855 Requested changes, cleanup and control logic updates
Also added a new parameter acro_trainer_gain to allow adjustments to the limiting strength.
2018-05-29 21:08:19 -04:00
Bruce Luckcuck
9b43839052 Acro trainer
Adds a new angle limiting mode for pilots who are learning to fly in acro mode. Primarily targeted at new LOS acro pilots, but can be used with FPV as well.

The feature is activated with a new mode named "ACRO TRAINER". When the feature is active, the craft will fly in normal acro mode but will limit roll/pitch axes so that they don't exceed the configured angle limit. New pilots can start with a small angle limit and progressively increase as their skills improve.

The accelerometer must be enabled for the feature to be configured and function.

Also the feature will only be active while in acro flight and will disable if ANGLE or HORIZON modes are selected.

For most users all they need to do is simply configure the new mode to be active as desired on the "Modes" tab in the configurator and configure the desired angle limit in the cli.

Configuration parameters:

acro_trainer_angle_limit: (range 10-80) Angle limit in degrees.

acro_trainer_lookahead_ms: (range 10-200) Time in milliseconds that the logic will "look ahead" to help minimize overshoot and bounce-back if the limit is approached at high gyro rates. The default value of 50 should be good for most users. For low powered or unresponsive craft (micros or brushed) it may be helpful to increase this setting if you're seeing substantial overshoot.

acro_trainer_debug_axis: (ROLL, PITCH) The axis that will log information if debugging is active.

To enable debugging:
set debug_mode = ACRO_TRAINER

debug(0) - Current angle
debug(1) - The internal logic state
debug(2) - Modified setpoint
debug(3) - Projected angle based gyro rate and lookahead period
2018-05-29 21:08:16 -04:00
Michael Keller
eecb59db45
Merge pull request #5963 from joelucid/iterm_relax
ITerm relax feature
2018-05-30 09:32:21 +12:00
Thorsten Laux
dc929baf75 make itermRelax into enum 2018-05-29 16:40:23 +02:00
AJ Christensen
a63c8b0079 gyro & d-term filters: remove filtering options except biquad/pt1
* through extensive testing prior to the beginning of the RC cycle, we have
  discovered that the simplest combination of filters appears to be up to four
  PT1 filters: two for gyro, and two for d-term.
* non-cascaded biquad filter plumbing is retained for noisy setups and the
  dynamic notch bandpass, although gyro and d-term variants of the filtering may
  eventually be removed in favor of pt1
* update all related unit tests
2018-05-29 10:54:46 +12:00
Thorsten Laux
5bdc2ead61 make itermRelax an uint8_t 2018-05-28 16:44:13 +02:00
Thorsten Laux
6239b8258a make itermrelax on yaw optional 2018-05-28 16:41:05 +02:00
Thorsten Laux
2c02c14a1d debug log only roll and pitch, but separately 2018-05-28 16:40:09 +02:00
Thorsten Laux
5a1d84cdae incorporate style feedback 2018-05-28 16:40:08 +02:00
Thorsten Laux
0086932946 address style requests 2018-05-28 16:39:43 +02:00
Thorsten Laux
791c584d81 add debug option DEBUG_ITERM_RELAX 2018-05-28 16:37:41 +02:00
Thorsten Laux
32748a328a ITerm relax feature 2018-05-28 16:37:41 +02:00
Michael Keller
5c3599a028
Merge pull request #5962 from joelucid/pid_ff
If P and FF have same sign take larger one
2018-05-27 21:36:23 +12:00
Thorsten Laux
62dcd1b2fa Also move previousPidSetpoint 2018-05-27 07:47:51 +02:00
Thorsten Laux
d337023e87 assign previousGyroRateDterm after calculating ff 2018-05-27 07:44:11 +02:00
Andrey Mironov
375bfe3929 Marked crucial functions inlined into ITCM-RAM explicitly 2018-05-26 11:04:02 +03:00
Thorsten Laux
af5fde98c1 address style requests 2018-05-25 07:12:12 +02:00
Thorsten Laux
5aad57c3a7 add smart_feedforward config setting 2018-05-24 21:55:49 +02:00
Thorsten Laux
82edaaaf8a remove newline 2018-05-24 15:31:45 +02:00
Thorsten Laux
25cc445d7e switch micro-optimizations 2018-05-24 15:30:55 +02:00
Thorsten Laux
dc452ced00 rename pid_ff 2018-05-24 15:26:08 +02:00
Thorsten Laux
fde2aae4f5 If P and FF have same sign take larger one 2018-05-24 14:08:52 +02:00
mikeller
2feae20c32 Replaced instances of '#include <platform.h>' with '#include "platform.h"'. 2018-05-24 23:46:19 +12:00
Michael Keller
71a1a9789a
Merge pull request #5945 from supiiik/master
New calculation method for Dterm setpoint weight
2018-05-24 21:16:55 +12:00
Andrey Mironov
d8dd6f29f8 Set FAST_RAM to go into .fastram_data by default. Added FAST_RAM_NOINIT 2018-05-23 14:40:33 +03:00
supiiik
4312513a77 MSP changed
Changed MSP, all new data are at the end
2018-05-23 13:33:43 +02:00
supiiik
76e3e7aded dterm_setpoint_weight to uint16_t
dterm_setpoint_weight changet to uint16 with limit 0-2000
2018-05-23 08:39:45 +02:00
supiiik
6c15904a77
Update pid.c 2018-05-22 20:01:25 +02:00
supiiik
e4846f2ecc
New calculation for DTERM setpoint weight
I'm flying race with betaflight and on all my race quads I have setpoint on maximum value 2.54. But I feel, that it's not enough. This calculation of setpoint is almost same as old method up to number 2.0 (previously 2.54) but numbers above 2.0 have more aggresive impact on Dterm RC stick commands. With this calculation i found, that value 2.3 is fine for me. 2.3 is equivalent to 6,35 with old calculation method (which was not possible of course, because there is 8bit limit). With higher values have quad much sharper responses and feel more "locked in". 
I think, that most freestyle pilots have setpoint at values around 1, so there is almost no change and race pilots using higher values and for those, who are limited by the value 2.54 (like me and my friends) should be solution new setpoint calculation method.
This is my first pull request to betaflight, so I hope, that I did everything well according your rules
2018-05-22 19:59:47 +02:00
s0up
ac6b8088c9 add gps rescue mode 2018-05-20 16:28:17 -07:00
s0up
de5fa47c4c navigation feature / reference removal 2018-05-09 10:28:36 -07:00
Mark Hale
b2e43abf2d Display anti-gravity activity in OSD.
Signed-off-by: Mark Hale <mark.hale@physics.org>
2018-05-05 19:56:56 +01:00
blckmn
a9f74cd6df Removed excess trailing spaces before new lines on licenses. 2018-04-25 20:58:00 +10:00
Bruce Luckcuck
0a0add8c56 Yaw spin recovery optimize (#3)
* PID controller unittest

* Clean code for yaw spin recovery

* Yaw spin recovery optimizations

* Flash size optimizations, use 50% throttle when airmode is off, and override pidsum_limit_yaw

Also rebasing from betaflight/master
2018-04-24 14:02:36 +12:00
ctzsnooze
41fb37a264 Clean code for yaw spin recovery 2018-04-24 13:51:06 +12:00
borisbstyle
8fab0fee11 PID controller unittest 2018-04-22 16:10:17 +02:00
blckmn
46fe22b4bd Direct license replacement 2018-04-22 09:22:46 +10:00