1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00
Commit graph

144 commits

Author SHA1 Message Date
ctzsnooze
34057bfbc2
Refactor Feedforward Angle and RC Smoothing - mashup of 12578 and 12594 (#12605)
* Refactor Feedforward Angle and RC Smoothing

* update rc_smoothing at regular intervals

* add Earth Ref to OSD, update pid and rate PG

* Initialise filters correctly

* refactoring to improve performance

* Save 24 cycles in Horizon calculations, other optimisations

At a cost of 40 bytes

* save 25 cycles and 330 bytes in rc_smoothing

* feedforward max rate improvements

* typo fix

* Karatebrot's review suggestions  part one

* Karatebrot's excellent suggestions part 2

* more efficient if we calculate inverse at init time

Co-Authored-By: Jan Post <post@stud.tu-darmstadt.de>

* Horizon delay, to ease it in when returning sticks to centre

* fix unit tests after horizon changes

Co-Authored-By: 4712 <4712@users.noreply.github.com>

* horizon_delay_ms, default 500

* fix unit test for feedforward from setpointDelta

* Final optimisations - thanks @Karatebrot for your advice

* increase horizon level strength default to 75 now we have the delay

* restore Makefile value which allowed local make test on mac

---------

Co-authored-by: Jan Post <post@stud.tu-darmstadt.de>
Co-authored-by: 4712 <4712@users.noreply.github.com>
2023-04-23 22:03:18 +02:00
ctzsnooze
241e9a9b94
Angle and Horizon Mode improvements (#12231)
* Angle and Horizon Update for 4.5

* BugFix FF noise Angle Mode on yaw and in level _race mode

* use time constant in ms for angle feedforward smoothing

* refactor to remove unnecessary definition

---------

Co-authored-by: ChrisRosser <chrisrosser91@gmail.com>
2023-03-15 09:46:24 +11:00
SugarK
2e04129b90
increase FF smoothing max to suit elrs 1000hz link rate (#12426)
* increase FF smoothing max to suit elrs 1000hz link rate

first step to making an ERLS 1000hz preset

* changed CMS ff smoothing limit to 95 max

---------

Co-authored-by: Ivan Efimov <gendalf44@yandex.ru>
2023-02-28 12:22:51 +11:00
Vasyl Demianov
8e33385eb5
Show PID and rate profile names in OSD menu. (#11962)
* Show PID and rate profile names in OSD menu.

* Minor formatting fixed.

* Minor formatting fixed.
2022-12-02 19:00:30 +01:00
haslinghuis
139210e403
Fix TPA (#11969) 2022-11-09 21:18:14 +11:00
haslinghuis
cbbc80ee90
Merge pull request #11779 from haslinghuis/update-pidprofile
Move TPA to PID profile
2022-10-13 21:09:49 +02:00
Hans Christian Olaussen
e90e850378 Fix CMS anti gravity gain 2022-10-07 14:26:34 +02:00
haslinghuis
492f933589
Merge pull request #11795 from bw1129/dyn_notch_minHz_mod
Allow dyn_notch_min_hz as low as 20Hz
2022-08-17 16:44:08 +02:00
Brian White
cf045be4a7 allow dyn_notch_min_Hz as low as 20Hz 2022-08-14 07:31:06 -04:00
Mark Haslinghuis
f7547192b1 Move TPA to PID profile 2022-08-08 00:07:21 +02:00
ctzsnooze
6aaaf727ff update antigravity for 4.4, no boost on yaw
Update to anti-gravity, including removal of the old Step mode, ability to adjust the P contribution (thanks @Limon), PT2 smoothed derivative model, inherent limiting of P boost during extremely fast stick travels to minimise P oscillations, less I during the middle of a throttle up, no I boost on yaw, add hz to cutoff labels

No antigravity on yaw, fix longstanding typo

h
2022-07-25 11:37:07 +10:00
haslinghuis
ea5b108193
Merge pull request #11257 from SpencerGraffunder/angle-limit-osd
Add angle limit to OSD settings menu
2022-06-16 22:47:31 +02:00
Ivan Efimov
ac2b8fe9c2 changed the min value for simplified filtes to 10 2022-01-30 23:02:18 -06:00
ctzsnooze
2262dfc60e use Throttle Setpoint, not rcDATA(throttle), for TPA 2022-01-25 18:37:01 +11:00
Spencer Graffunder
412adf8b62 add angle limit to 'pid profile other' cms menu 2022-01-08 22:07:25 -06:00
haslinghuis
b745eaf284
Merge pull request #11111 from SteveCEvans/cms_slider_ro
Make CMS fields readonly when overridden by a slider and mark with an S
2021-12-21 00:33:59 +01:00
Ivan Efimov
d5c31accdf FW sliders: separate MSP commands for requesting calculations but not applying them into the FW 2021-12-19 04:00:50 -06:00
Steve Evans
3de0d384ed Make CMS fields readonly when overridden by a slider and mark with an S 2021-12-12 16:34:02 +00:00
haslinghuis
2a954c6203
Merge pull request #10673 from KarateBrot/sdft
Remove Dynamic Notch from "Features"
2021-12-01 23:21:05 +01:00
Hans Christian Olaussen
834925260d Rename and reorder simplified PID parameters 2021-11-29 17:18:26 +01:00
KarateBrot
450cee3e08 Removed dynamic notch from features 2021-11-10 23:03:43 +01:00
Hans Christian Olaussen
fcabdf231f Rename cms PITCH PI GAIN
to "PITCH PIFF GAIN".
It adjusts feedforward too.
2021-10-25 13:33:12 +02:00
Joeri Capens
e42c3f2b7f Apply CMS simplified tuning settings on exit if there are changes. 2021-10-02 14:37:21 +02:00
ctzsnooze
99a7479b8c consistent gyro and dterm filter names 2021-09-27 09:12:00 +10:00
ctzsnooze
90a2057179 pid slider support with changed defaults 2021-09-26 15:05:05 +10:00
J Blackman
afe49c480f
Merge pull request #10585 from knoopx/stuning-dmin-def
hide DMIN RATIO unless USE_D_MIN
2021-09-06 14:20:47 +10:00
Michael Keller
7a8b40a670
Merge pull request #10777 from ctzsnooze/move-feedforward-transtion-calculation 2021-09-04 16:56:37 +12:00
KarateBrot
8649f1003f Dynamic notch refactoring
+ added new parameter group for Dyn Notch
2021-09-01 12:39:21 +12:00
ctzsnooze
5863015354 ifdef condition consistently applied, field names consistent, pg ID updated 2021-08-30 09:33:12 +10:00
Victor Martinez
059e5a12fe disable s.tuning DMIN RATIO when USE_D_MIN is undefined 2021-07-21 13:11:51 +02:00
KarateBrot
1ae31fd3d5 Dynamic notch bandwidth back to Q
+ simplified frequency estimation
2021-06-11 00:16:21 +02:00
ctzsnooze
636d563abe major rc changes ctzsnooze 2021 2021-05-07 14:40:43 +10:00
ctzsnooze
d4f0ec2d0a feed forward jitter improvements 2021-04-27 12:47:06 +10:00
Michael Keller
a5d0f7e457
Merge pull request #10589 from IllusionFpv/fix/cms-simplified-tuning-5pt-steps
move simplified tuning parameters by 5pt
2021-03-28 18:34:35 +13:00
KarateBrot
d02af7334c Added tracking of multiple dynamic notches per axis and replaced FFT with SDFT 2021-03-24 17:09:28 +01:00
Nicola De Pasquale
d1ab041103 move simplified tuning parameters by 5pt 2021-02-25 21:54:59 +01:00
Nicola De Pasquale
3f3c143199 refactor calculateNewPidValues function
roll pitch ratio now increase pitch

constrain dmin ratio, disable dmin if multiplier is 200

fix apply simplified tuning
2021-02-19 22:55:44 +01:00
Bruce Luckcuck
87f322927a Self-level modes expo
Adds angle setpoint roll/pitch expo for self-level modes.

Previously the angle setpoint was a simple linear calculation based on the stick deflection percentage and the angle limit. This makes control very jumpy around center stick and people would often resort to adding expo in their radios to compensate. This then adds the complication of wanting expo in the radio when in self-level but not when in acro - leading to complicated mixes, virtual switches, etc.

This PR adds separate self-level expo settings for roll/pitch so the user can customize the axis behavior. Yaw is excluded because this axis uses normal rates and expo controlling the rotational rate around the yaw axis and not an angle setpoint. The roll/pitch expo can range from 0 (off) to 100 (max) like other RC expo settings. For example:
```
set roll_level_expo = 30
set pitch_level_expo = 40
```
The default values are 0 which disables any expo and behaves as before.

The settings are available in the CMS rate profile menu.
2021-01-25 19:08:43 -05:00
Michael Keller
7fc3c7cea6 Renamed 'tuning sliders' to 'simplified tuning'. 2020-12-26 14:26:56 +01:00
IvoFPV
cff19dc113 Implement tuning sliders, add to CMS, MSP 2020-12-26 14:26:50 +01:00
Michael Keller
0f5d28a63c
Merge pull request #10238 from IllusionFpv/add-dlpf-gyro-expo-in-osd
Added dlpf gyro expo curve in CMS
2020-10-07 00:57:09 +13:00
Nicola De Pasquale
ff79f2927d added vbat sag compensation in CMS 2020-10-04 16:30:08 +02:00
Nicola De Pasquale
dab365aa62 added dlpf gyro expo curve in osd 2020-10-03 22:03:29 +02:00
Victor Martinez
e375ac1c21 add thrust linearization to CSM 2020-08-19 01:58:48 +02:00
Michael Keller
a8085bef8b
Merge pull request #9759 from etracer65/pid_init_separate
Split initialization from pid.c for flash savings
2020-06-22 00:35:42 +12:00
mikeller
9bace5b9d1 Fixed condition for the 'ANTI GRAVITY' mode switch to hide it wen anti-gravity is disabled. 2020-05-08 01:14:45 +12:00
Bruce Luckcuck
c06106e2d1 Split initialization from pid.c for flash savings
Move low performance requirements initialization code into pid_init.c and optimize that for size.

Saves 2688 bytes for target STM32F7X2.
2020-05-03 13:58:55 -04:00
Bruce Luckcuck
265d6dde2b CMS dynamic setup popup menu
Adds a dynamically constructed menu that will appear before the main menu when the user enters CMS if there are any outstanding setup items to complete. Currently only includes entry to calibrate the ACC if required, but provides a framework for other setup reminders as needed. The user can choose to exit this menu without remedying the problems, but the menu will reappear when they next enter CMS. If there are no required setup items then the menu will be skipped and the user will go straight to the main menu.
2020-03-12 11:45:44 -04:00
Nicola De Pasquale
4519935c92 increase srate max setting for using new rate systems 2020-03-09 21:33:10 +01:00
Michael Keller
6876b89c8e
Merge pull request #9487 from Asizon/ffInterpolateToCms
Added FF Interpolate options to CMS
2020-02-19 00:01:31 +13:00