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

32 commits

Author SHA1 Message Date
Petr Ledvina
aa92203215
rc-modes bugfix - prevent buffer overflow when serializing box names (#13880) 2024-09-10 18:15:52 +02:00
ctzsnooze
254da8f460
Altitude hold for 4.6 (#13816) 2024-09-04 20:29:03 +10:00
Mark Haslinghuis
5a28ce5129
Make Cppcheck happier revived (#13566)
Co-authored-by: Štěpán Dalecký <daleckystepan@gmail.com>
2024-05-10 13:23:32 +10:00
Alejandro Hernández Cordero
9dc9c51d3e
Added SITL Gazebo (#12346) 2023-02-19 06:39:54 +11:00
Mathias Rasmussen
9957ceb275 Fix function brace style 2022-10-12 16:31:55 +02:00
Bruce Luckcuck
f688227db6 Only enable PINIOBOX task when needed
Previously the task was always enabled and there's no reason for it to be running if there are no boxID associations.

Saves a few cycles by not running. But has a bigger effect on the scheduler by minimizing the number of active tasks when possible.
2020-04-12 20:31:32 -04:00
mikeller
f3ec114a2a Added custom (switch) box naming. 2020-03-12 07:04:24 +13:00
jflyper
ff16686893 White space tidy 2020-02-17 23:54:57 +13:00
mikeller
4a7904695e Moved 'config.[ch]' into the 'config/' directory. 2019-10-28 11:17:25 +13:00
root
130266af7b Fix to make the AND Logic work on all modes
This fixes #8118
2019-04-30 22:43:17 +00:00
Dave Huber
fbe42a0646 Updated mode logic to work more intuitively
Any OR macs OR all AND macs required to activate mode
2019-02-28 20:01:42 -06:00
Dave Huber
6a67972c6c Updated linked mode processing
Allows links and ranges in a single mode.
Code styling changes.
Add config validation for chained links (not allowed).
2019-02-21 14:45:52 -06:00
Bruce Luckcuck
42af168854 Optimize rc modes activation conditions processing
Analyze the rc modes activation conditions and only process configured entries. Previously the entire possible list was processed even though typically only a handful are configured.

Reduces the RX task processing time by about 25% (~44us to ~33us) with an average setup of 3 modes configured (F405, SBUS). Processing time savings will diminish as the user configures more modes. But typically far fewer than the maximum of 20 will be configured.
2019-02-05 16:05:16 -05:00
mikeller
7b7ddd099f Remove unused BARO, GPS_HOME, GPS_HOLD modes. 2018-10-29 00:50:44 +13:00
mikeller
817bb2ed86 Rename 'isAirmodeActive()' to 'airmodeIsEnabled()'. 2018-10-23 01:09:17 +13:00
mikeller
6206f034a8 Improved handling of airmode detection. 2018-10-23 01:05:50 +13:00
mikeller
6de1c32d9d Added shadow copies for CLI and MSP. 2018-08-21 00:36:47 +12:00
mikeller
c99629bbf1 Removed calls to (latching) 'feature()'. 2018-08-21 00:35:55 +12:00
ctzsnooze
4c917efa50 Smooth anti gravity 2018-07-21 23:49:41 +12:00
Robert Lacroix
a81576b2ae Generalize sticky mode code
Instead of hard coding paralyze this makes the code extensible to possible
future sticky modes

_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-17 12:15:50 +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
mikeller
93ab648183 Added disabling of GPS_RESCUE when 3D is enabled. 2018-07-01 21:33:32 +12:00
jflyper
041bfb22c6 Create a pg for rxConfig 2018-05-27 09:13:04 +09:00
mikeller
557d704b9e Fixed RC modes PG version after GPS rescue. 2018-05-21 15:07:36 +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
blckmn
a9f74cd6df Removed excess trailing spaces before new lines on licenses. 2018-04-25 20:58:00 +10:00
blckmn
46fe22b4bd Direct license replacement 2018-04-22 09:22:46 +10:00
mikeller
b489d0ba9d Renamed 'parameter_group' to 'pg'. 2017-12-19 23:36:31 +13:00
Dave Huber
b9272ae325 Added Logic AND to Modes
Added Mode Inversion configuration, CLI commands, and update.
Changed Mode Inversion to Mode Logic.
configure by AND/OR instead of output inversion.
Fixed Mode Logic code after debugging.
Added PG_REGISTER to cli unittest.
Revert version to previous.
Revamped Mode Logic using existing Conditions config.
Requires coordination with BF-configurator, but works with CLI (added argument in 'aux' command).
Coding standard changes.
Cleaned up code. Added modeLogic enum.
removed executable permissions.
Code cleanup, cliAux backward compatible.
changed bitArrayInv to bitArrayXor.
allow for old 'aux' command (without last argument) to be made. asserts MODELOGIC_OR instead of resetting the memory.
2017-12-12 10:35:15 -06:00
jflyper
7a57468c8c Configurable ADC 2017-11-07 17:50:45 +09:00
Dominic Clifton
db006b1585 Merge pull request #2856 from ledvinap/improvement-64bit-boxid
array based box masks
2017-06-19 13:31:08 +12:00