1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00
Commit graph

563 commits

Author SHA1 Message Date
borisbstyle
aa44fd6bbd Change default iterm_windup 2018-09-10 23:38:40 +02:00
borisbstyle
00dbaf9fa7 Cleanup code // add unittestst for iterm windup 2018-09-10 23:38:39 +02:00
borisbstyle
864a2d6a2b Fix bug with antiwindup inversion 2018-09-10 09:08:36 +02:00
Michael Keller
39ced6bbfe
Merge pull request #6668 from mikeller/add_fno_common
Added '-fno-common' build option, fixed resulting problems.
2018-09-08 16:51:22 +12:00
jflyper
9caeceb2dd Resolve upward inclusion 2018-09-06 18:43:58 +09:00
mikeller
4ec481a843 Added '-fno-common' build option, fixed resulting problems. 2018-08-30 18:58:34 +12:00
borisbstyle
9d01a5681e
Merge pull request #6659 from betaflight/pid_unittest_fix
Feedforward unittest
2018-08-29 09:10:45 +02:00
Michael Keller
b14d532dc5
Merge pull request #6624 from thomasbridi/CRSF_avg_cell_telemetry
feat:add average cell voltage in CRSF telemetry
2018-08-28 21:21:36 +12:00
borisbstyle
a85eecf42d Add feedforward tests 2018-08-28 10:06:48 +02:00
borisbstyle
5b7209329b Add tolerance for feedforward 2018-08-28 08:44:06 +02:00
thomas.bridi
a567bb71d3 merge 2018-08-27 18:31:09 +02:00
thomas.bridi
1a67f5da17 fix: missing test 2018-08-27 18:28:06 +02:00
mikeller
0bce8549ee Renamed 'fc/fc_' files to remove the double 'fc'. 2018-08-26 14:07:06 +12:00
thomasbridi
8eccc325ae
Fix:remove unused variable 2018-08-23 15:27:47 +02:00
thomas.bridi
50d287a9d4 feat:add average cell voltage in CRSF telemetry 2018-08-23 13:09:51 +02:00
Michael Keller
a02e1dd384
Merge pull request #6610 from jflyper/bfdev-osd-warn-fail-safe
Add osd warning for fail safe state.
2018-08-23 22:36:48 +12:00
jflyper
82268b7a4e Add osd warning for fail safe state. 2018-08-22 20:22:40 +09:00
mikeller
40f1fe0737 Fixed tests. 2018-08-22 19:51:32 +12:00
mikeller
00a7d20227 Fixed tests. 2018-08-21 00:37:20 +12:00
mikeller
8a72362a67 Fixed tests. 2018-08-21 00:36:47 +12:00
mikeller
6de1c32d9d Added shadow copies for CLI and MSP. 2018-08-21 00:36:47 +12:00
mikeller
8abf138e2a Fixed tests, SPRACINGF3OSD. 2018-08-21 00:36:31 +12:00
Kiripolszky Károly
c4a32160a7 fix OSD unittest for log status element 2018-08-19 10:22:07 +02:00
Michael Keller
a1b84b58d3
Merge pull request #6182 from Ziege-One/Hott-telemetry-alarm-voltage-and-mAh
Hott telemetry alarm voltage and mAh
2018-08-19 01:45:39 +12:00
AirBreak69
0e52e21524 GPS altitude: cleanup all occurancies to assume source is in cm per lsb resolution
Harmonized (and partly corrected) all occurancies of gpsSol.llh.alt and getEstimatedAltitude() to handle altiude sourced in cm resolution.
This was introduced by GSP_RESCUE/RTH.
Introduced a naming convention that include the unit into the variable/function names:
gpsSol.llh.alt -> gpsSol.llh.alt_cm
getEstimatedAltitude() -> getEstimatedAltitude_cm()
2018-08-19 00:11:30 +12:00
Michael Keller
41ce2c6327
Merge pull request #6391 from leocb/osd-max-g-force-stat
Added Max G-force OSD stat
2018-08-17 00:22:11 +12:00
Michael Keller
6e718b504a Fixed tests. 2018-08-06 08:37:26 +12:00
Bruce Luckcuck
17e76e48f6 PID controller feedforward
Restructures the PID controller to decouple feedforward from D.

Cleaned up the structure of the PID controller; moved some feature-based enhancements out of the main structure.

Feedforward becomes a separate component of the PID controller and there is now:
f_pitch
f_roll
f_yaw

The default values of 60 for pitch and roll matches the default setpoint weight used in BF3.4.  Yaw previously had no setpoint weight capability so the default here needs to be discussed.  Currently it's also set to 60 and flight testing seems positive.  Feedforward on yaw adds a lot of value so I don't think we want to default to 0.  Instead we need decide on the default.

All occurences of setpoint weight have been replaced by feedforward. "setpoint_relax_ratio" has been renamed to "feedforward_transition".

The pidSum now consists of P + I + D + F.

D has been added back for yaw (disabled by default with d_yaw = 0). We've found little need for D for normal quads but it may have value for other configurations - particularly tricopters.

Updated CMS menus to support adjusting the feedforward for each axis.

Changed the default for "rc_interp_ch" to be "RPYT".  Need yaw to be smoothed to support feedforward.

Open issues:

Needs BFC support
- Need to add support for the axis "F" gains.
- Remove "setpoint weight" slider.
- Rename "D Setpoint transition" to "Feedforward transition"

Needs BBE support
- Header "setpoint_relaxation_ratio" has been renamed "feedforward_transition"
- Header "dterm_setpoint_weight" has been replaced with an array named "feed_forward_weight".
  example: H feed_forward_weight:65,60,60    (R,P,Y)
- PID component "AXISF" has been added for all axes. Should be handled like P, I and D values.
- PidSum calculation needs to include F.

Needs LUA script support
- Support the renamed "setpoint_relax_ratio".
- Support for feedforward weight on all 3 axes.

Open code issues:
- rc_adjustments.c - support for adjusting feedforward weight for all axes. Currently only supporting roll - needs coordination with BFC.
2018-07-21 10:26:23 -04:00
mikeller
4439852984 Fixed test. 2018-07-22 00:24:48 +12:00
ctzsnooze
4c917efa50 Smooth anti gravity 2018-07-21 23:49:41 +12:00
mikeller
35b93f2c18 Fixed tests. 2018-07-19 00:09:55 +12:00
leocb
05e42db90b Added Max G-force OSD stat 2018-07-17 11:44:01 -03:00
Michael Keller
46fec897ed
Merge pull request #6378 from robertlacroix/sticky-paralyze
Generalize sticky mode code
2018-07-18 00:48:54 +12:00
Michael Keller
1e9dfe355e
Merge pull request #6381 from robertlacroix/vtx-unittest
Add basic VTX unit test
2018-07-17 18:42:28 +12:00
Michael Keller
e2cf7fc238
Merge pull request #6233 from leocb/add-gforce-osd
Added G-Force to the OSD
2018-07-17 18:28:58 +12:00
Robert Lacroix
18765e3593 Add basic VTX unit test
The vtx code doesn't have a lot of test coverage, so this adds a basic unit test that asserts vtx pit mode behavior

_Legal disclaimer: I am making my contributions/submissions to this project solely in my personal capacity and am not conveying any rights to any intellectual property of any third parties._
2018-07-16 14:10:46 +02:00
Robert Lacroix
cb792f30d2 Delay allowing sticky modes
On bootup aux channels start out at default and allow sticky modes right away,
although they should only be allowed once they are actually not active.

_Legal disclaimer: I am making my contributions/submissions to this project solely in my personal capacity and am not conveying any rights to any intellectual property of any third parties._
2018-07-16 13:50:55 +02:00
Robert Lacroix
aa18ab4afa Allow linking of modes
This allows modes to be linked, for example to link vtx pit mode to paralyze. Whenever paralyze is activated, vtx pit mode is activated as well. Also the logic to prevent mode changes when enabling paralyze can be removed in favor of making paralyze sticky.

Modes can be linked in CLI by providing the mode id as the last parameter of the aux command. For example in order to link vtx pit mode to paralyze, replace the last 0 of the pit mode aux (39) with the mode id of paralyze (45):

```
aux 2 39 2 1700 2100 0 0
```

becomes

```
aux 2 39 2 1700 2100 0 45
```

_Legal disclaimer: I am making my contributions/submissions to this project solely in my personal capacity and am not conveying any rights to any intellectual property of any third parties._
2018-07-13 13:05:15 +02:00
Michael Keller
b4953b8ff5
Merge pull request #6134 from mikeller/allow_custom_includes
Allow tests to define custom include directories (for libs).
2018-07-11 21:09:23 +12:00
Andrey Mironov
f1e33d170e
Added stub for unittest 2018-07-07 14:56:33 +03:00
Michael Keller
c6c3d0b5af
Merge pull request #6235 from etracer65/throttle_angle_correction
Fix throttle angle correction when smoothing throttle; reduce processing overhead
2018-06-30 18:46:51 +12:00
mikeller
00228427da Set yaw D default to 0 since it is unused anyway. 2018-06-30 15:25:50 +12:00
Bruce Luckcuck
5cd886017d Fix throttle angle correction when smoothing throttle; reduce processing overhead
Change the logic to not modify rcCommand directly and instead apply the additional throttle directly in the mixer.

Also move the logic to the attitude task instead of having it calculate in the PID loop. The logic relies on an angle that's only updated in the attitude task so there was no point in running the calculation every PID loop.
2018-06-28 15:56:01 -04:00
leocb
7df8075fa3 OSD G-force Fix unit test; use sqrtf 2018-06-28 16:15:16 -03:00
azol
8b98528590 fixed open connection twice times and timeout logic 2018-06-28 21:00:54 +08:00
azolyoung
53458d4cf1 Change rcsplit protocol to async 2018-06-23 11:55:15 +08:00
Frank
1702f61f7f
fix unittest
fix unittest for Hott
2018-06-21 15:33:33 +02:00
mikeller
1bd502e9ac Removed function declaration. 2018-06-17 13:40:15 +12:00
mikeller
8107ad254c Fixed special case for SPRACINGF3OSD, fixed tests. 2018-06-17 13:39:39 +12:00
mikeller
f8c3669ba5 Allow tests to define custom include directories (for libs). 2018-06-17 10:51:13 +12:00