1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 06:45:16 +03:00
Commit graph

736 commits

Author SHA1 Message Date
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
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
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
Thorsten Laux
7e12e9da18 don't link debug.c to pid unit test 2018-05-28 16:40:09 +02:00
jflyper
041bfb22c6 Create a pg for rxConfig 2018-05-27 09:13:04 +09:00
Michael Keller
42726fd2ae
Merge pull request #5973 from mikeller/fix_unittest_stubbing
Fixed stubbing of 'debug.c' in unittests.
2018-05-27 00:05:59 +12:00
Michael Keller
ce7f112cfc
Merge pull request #5916 from jflyper/bfdev-spiPreInitCs-to-support-configurability
Convert spiPreInit for configurability
2018-05-26 23:53:25 +12:00
mikeller
bf0a9c5c4f Fixed stubbing of 'debug.c' in unittests. 2018-05-26 15:09:24 +12:00
jflyper
f9a43099db SPI CS preinit for configurability 2018-05-24 22:00:26 +09:00
mikeller
2feae20c32 Replaced instances of '#include <platform.h>' with '#include "platform.h"'. 2018-05-24 23:46:19 +12:00
Michael Keller
a07b4987aa
Merge pull request #5941 from DieHertz/noinline-and-fastcode-only
Apply NOINLINE conditionally on ITCM presence
2018-05-24 09:35:40 +12:00
s0up
24c8ae22c8 Merge branch 'master' of github.com:betaflight/betaflight into gps_rescue_beta 2018-05-23 08:14:51 -07:00
Andrey Mironov
3733640c08 Changed NOINLINE to be applied conditionally on ITCM presence 2018-05-23 16:34:01 +03: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
s0up
7ad65031e2 revert failsafe code, re-implement commented unit tests, add degrees suffix for min/max angle in rescue mode 2018-05-20 19:14:09 -07:00
s0up
ac6b8088c9 add gps rescue mode 2018-05-20 16:28:17 -07:00
Bruce Luckcuck
0916d117b8 Add OSD warning options as cli parameters
Previously only a single bitmapped parameter was available in the cli but this wasn't very useful as the users would have to understand the bit positions to enable/disable warning options. This change exposes each warning item as a separate parameter.
2018-05-11 20:06:34 -04:00
Michael Keller
ea8432b941
Merge pull request #5851 from robertlacroix/graveyard
Add Paralyze mode support
2018-05-12 12:02:18 +12:00
Robert Lacroix
092baf5805 Add Paralyze mode support
During team relay races it's unsafe to retrieve crashed quads because the course is continuously hot. In order to safely fly a backup quad with the primary quad crashed in the field (but powered up) it's necessary to:

* Disable arming, so that the crashed quad doesn't unintentionally arm as well. This is specifically a problem when a transmitter can send signals to all powered up receivers (like FrSky and others).
* Change VTX to an unused channel with low power output
* Turn off telemetry

This change introduces a new mode called paralyze which disables arming and prevents mode changes (except beeper). It can only be invoked while the quad isn't armed. Once it's invoked, the FC has to be power cycled. In order to invoke it, the mode needs to be in a disengaged state at least once, so that forgetting to flip the switch back after crashing doesn't immediately invoke graveyard on the backup quad.

_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-05-10 07:40:31 -07:00
s0up
de5fa47c4c navigation feature / reference removal 2018-05-09 10:28:36 -07:00
Michael Keller
7bc2b70043
Merge pull request #5846 from mikeller/cleanup_msp_port_releasing
Cleaned up implementation of MSP port releasing when shared.
2018-05-08 23:40:56 +12:00
mikeller
908beb2912 Fixed tests. 2018-05-08 22:58:33 +12:00
Bruce Luckcuck
905f14d86c Change enabled OSD stats storage to bitmap
Previously the flags controlling the enabled OSD stats were stored as an array of boolean. This change reduces config storage by storing the flags as bits inside a single uint32.
2018-05-07 12:07:25 -04:00