1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-18 22:05:17 +03:00
Commit graph

800 commits

Author SHA1 Message Date
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
Bruce Luckcuck
843a25903a Display OSD message and countdown if arming is delayed due to beacon
Provides a clear indication that arming is delayed for cases where DSHOT beacon is active.

Clears the OSD and displays "DISABLING BEACON" and "ARMING IN X.Y" with an active countdown in tenths of a second while arming is delayed due to DSHOT beacon. Once delay period is over the normal "ARMING" message appears.

If the DSHOT beacon is not active then this delay screen is not displayed.
2018-06-12 20:04:06 -04:00
Michael Keller
21414faf1c
Merge pull request #6079 from etracer65/dshot_beacon_motor_direction
Add guard time between dshot beacon and arming/disarming
2018-06-10 12:50:15 +12:00
Bruce Luckcuck
1e6e9e719f Add guard time between dshot beacon and arming/disarming
Tries to prevent DSHOT beacon commands from interfering with commands to set the motor direction.

Adds a 2 second delay after disarming before DSHOT beacon commands will be sent. This attempts to prevent the beacon commands from interfering with the motor direction reset that happens after using crash flip mode.

During arming if a DSHOT beacon command has been sent within 2 seconds the arming will be delayed until the 2 seconds have passed. This attempts to prevent interference with the motor direction commands sent at arming.
2018-06-09 18:59:59 -04:00
Bryce Johnson
a86e0bc41c frsky-spi-D16 was counting every telemetry state as a good packet. If it was garbage packet it would go straight into the rcData
Add some debugging
2018-06-10 01:37:31 +12:00
mikeller
df06b9b4cb Fixed tests. 2018-06-04 00:23:45 +12:00
mikeller
6131ac1449 Fixed tests. 2018-05-31 23:25:03 +12:00
Michael Keller
011711c0c1
Merge pull request #5998 from Cleric-K/failsafe-mode-switch
Failsafe switch choosable behavior
2018-05-31 23:15:51 +12:00
Michael Keller
07dfbd7b62
Merge pull request #6001 from mikeller/make_rssi_scalable
Make all RSSI sources scalable.
2018-05-31 10:59:32 +12:00
mikeller
6eea0d45ca Changes from review. 2018-05-30 22:29:42 +12:00
Michael Keller
eecb59db45
Merge pull request #5963 from joelucid/iterm_relax
ITerm relax feature
2018-05-30 09:32:21 +12:00
Cleric-K
e17abc4063 Failsafe switch choosable behavior #5994
The `failsafe_kill_switch` parameter has been renamed to
`failsafe_switch_mode` and it determines what happens
when the Failsafe mode is activated with an AUX switch.
It takes one of three values:
  0 - simulates RC signal loss - thus activates Stage1 failsafe
      (former behavior when kill switch option was OFF)
  1 - disarms immediately
      (former behavior when kill switch option was ON)
  2 - activates the failsafe procedure (Stage2) immediately (new)
2018-05-29 23:28:09 +03:00
mikeller
e75eaf85ce Fixed tests. 2018-05-30 00:45:45 +12: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