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

180 commits

Author SHA1 Message Date
jflyper
00840ce40f Prepare SD card SPI and SDIO variants for consolidation 2018-10-01 19:44:04 +09:00
jflyper
0ff2d864b4 Fix origins for timer channel list
Selection is zero origin
Channel number is one origin for user I/O
2018-09-25 14:28:13 +09:00
Michael Keller
adddd0976c
Merge pull request #6788 from jflyper/bfdev-usb-refactor-for-generic-target
Refactor USB toward generic target
2018-09-22 04:54:21 +12:00
Michael Keller
d32887c1e9
Merge pull request #6797 from mikeller/make_cli_errors_consistent
Made CLI error messages consistent.
2018-09-20 23:17:41 +12:00
Michael Keller
b43c6ca73b
Merge pull request #6796 from etracer65/adjustment_range_optimize
Optimize in-flight adjustments to only process configured ranges
2018-09-20 20:51:21 +12:00
Michael Keller
811775748b Made CLI error messages consistent. 2018-09-19 10:35:13 +12:00
Bruce Luckcuck
044648ca12 Optimize in-flight adjustments to only process configured ranges
Previously the logic would process all possible ranges defined by MAX_ADJUSTMENT_RANGE_COUNT even if some (or even all) ranges were not configured.  This change first builds a list of configured ranges and only processes thos entries.

Reduces CPU load by skipping unnecessary processing and minimizes the impact of increasing the number of available ranges.
2018-09-18 10:31:58 -04:00
Michael Keller
3a62d40372
Merge pull request #6697 from etracer65/cli_lookup_index_validation
Add CLI validation of parameters and print a corrupted value message
2018-09-18 23:39:18 +12:00
jflyper
a2f39c8844 Refactor USB toward generic target
- Move conditionals from pg/usb.c to common_defaults_post.h
- Add detectPin to usbDev_s.
- Bump PG version for usbDev_s.
- Add resource manipulation for USB_DETECT.
2018-09-18 14:51:12 +09:00
jflyper
9ef9f98310 Various fixes based on mikeller's comment. 2018-09-10 17:55:55 +09:00
jflyper
fc6c24c38e Configurable acc/gyro 2018-09-10 17:55:52 +09:00
Bruce Luckcuck
a76d22bf60 Add CLI validation of parameters and print a corrupted value message
Validates the index for lookup values to prevent referencing random memory.  Also validates the range of numeric parameters.

diff output will clearly show any corrupted parameters.
2018-09-05 07:36:42 -04:00
mikeller
0bce8549ee Renamed 'fc/fc_' files to remove the double 'fc'. 2018-08-26 14:07:06 +12: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
mikeller
8d03431699 Fixed errorneous 'resource' lines in 'diff' when 'USE_PWM' is disabled. 2018-08-12 00:14:34 +12:00
Bruce Luckcuck
68906f990b Changes from feedback - use source instead of type in sizeof() 2018-07-22 13:40:20 -04:00
Bruce Luckcuck
9745547175 Use memcmp for CLI defaults comparisons where appropriate
Saves 196 bytes on F3
2018-07-22 13:01:06 -04:00
mikeller
df55fc99ec Added MSP for reboot to MSC. 2018-07-17 18:34:06 +12: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
5a66fb510f Added reset of task max time to CLI tasks command 2018-07-07 14:04:00 +03:00
Bruce Luckcuck
d58118d1d3 Fix null pointer reference for "smix reverse"
The short syntax `smix reverse` is meant to print the table. When the logic was checking for parameters it was failing to deal with the null pointer when no parameters were present. Additionally the `smix reverse` was called at the end of a successful command to display the table so even though the command was succeeding it was crashing on the null pointer reference when trying to display the result.

Also some stylistic cleanup
2018-07-03 19:37:23 -04:00
jflyper
9d1e4db800 Call flashfsIsSupported instead of flashfsIsReady to check flash chip existence 2018-07-02 09:46:54 +09:00
Michael Keller
95dcce8471
Merge pull request #6194 from etracer65/rc_smoothing_retraining
RC smoothing retraining update - adds full support for CRSF
2018-06-24 10:24:28 +12:00
mikeller
6a2e59f248 Fixed off by one in beeper diff / dump. 2018-06-24 01:05:14 +12:00
Bruce Luckcuck
1982c94780 RC smoothing retraining update - adds full support for CRSF
Adds in flight monitoring of the rx frame rate and adapts the filters if the frame rate changes. Primarily to add support for Crossfire with its ability to switch from 150hz to 50hz (and back) under some circumstances. Will work with any protocol - not CRSF specific.   So if future receivers add the ability to switch frame rates dynamically the logic should support them.

If the current rx frame rate is more than +-20% from the previously detected rate, then the process will retrain for the next 50 samples as long as the rate continues to be outside the 20% tolerance. Once 50 samples are collected the new frame rate is updated and the filter cutoffs are adjusted. Only filters set with their cutoffs = 0 (auto) will be adjusted. There is a 2 second guard time after a successful update before retraining can start again to prevent rapid switching back and forth.

The logic is optimized to not perform any training if the filters are set to manual cutoffs. So there is an opportunity for advanced users to choose specific cutoffs and reduce the PID loop load slightly. However this is not recommended for Crossfire or other protocols that might change their rx frame rate.

Updated the output of the `rc_smoothing_info` cli command to match the revised logic.
2018-06-22 20:10:06 -04:00
mikeller
78cbd5725c Fixed Dshot beacon command description in CLI. 2018-06-09 12:06:50 +12:00
Bruce Luckcuck
e49c10b573 RC smoothing: improve rx frame rate detection, add rc_smoothing_info cli command
Improved the rx frame rate detection/training by delaying calculation to avoid loop time jitter during flight controller initialization.

For auto cutoffs calculate a value appropriate for BIQUAD or PT1 depending on the configuration.

Added a new rc_smoothing_info cli command to display internal details about its operation.
2018-06-05 18:25:13 -04:00
mikeller
227c08f94e Added profile / rateprofile info to 'get'. 2018-06-02 22:27:16 +12:00
mikeller
532e8afe61 Fixed dumping of profile values in CLI. 2018-06-02 21:01:22 +12:00
Bryce Johnson
0045b36320 Added blocked dshot commands, Added post command delay
Moved the dshotcommand to happen in pwm_output_dshot.
Simplified the timing and repeats to happen on a group basis instead works better for dshotburst
2018-06-01 21:56:11 +12:00
Michael Keller
f37a8184d5
Merge pull request #5891 from mikeller/add_disable_rx_loss_dshot_beacon_option
Implemented 'beacon' command in CLI.
2018-06-01 21:51:57 +12:00
mikeller
2ca07f7302 Fixed typo, BETAFLIGHTF3 flash overflow. 2018-06-01 00:48:21 +12:00
mikeller
f17567491f Fixes from review. 2018-05-31 23:25:03 +12:00
mikeller
432f330e60 Fixes from review. 2018-05-31 23:25:03 +12:00
mikeller
b4c44d8a46 Fixed writing of empty signature. 2018-05-31 23:25:03 +12:00
mikeller
0bf4708033 Added support for signing board / serial number. 2018-05-31 23:25:03 +12:00
mikeller
a101a58b68 Added ability to set and check board info. 2018-05-31 23:25:03 +12:00
mikeller
f307bf3134 Fixed build for exotic targets. 2018-05-31 19:43:46 +12:00
mikeller
7e8f261436 Implemented 'beacon' command in CLI. 2018-05-31 01:48:27 +12:00
mikeller
ab916d16b2 Added beacon config printing. 2018-05-30 01:20:33 +12:00
mikeller
2c3bf6ad2d Removed 'PREFERRED' beeper settings. 2018-05-30 00:50:55 +12:00
Michael Keller
418fd4beaa
Merge pull request #5990 from jflyper/bfdev-create-pg-rxSpiConfig
Add basic SPI RX configurability
2018-05-29 00:17:21 +12:00
Michael Keller
0bb6ab11e4
Merge pull request #5989 from mikeller/cleanup_cli_printing
Cleaned up CLI output generation, added 'cliPrintErrorLinef'.
2018-05-28 10:46:51 +12:00
jflyper
560af0b6ff Add SPI bus configurability 2018-05-27 20:30:06 +09:00
mikeller
a8e1a2938f Cleaned up CLI output generation, added 'cliPrintErrorLinef'. 2018-05-27 18:49:02 +12:00
jflyper
1a035aa0f3 Create a pg for rxSpiConfig 2018-05-27 13:13:20 +09:00
mikeller
1e5d1805b3 Fixed typo in CLI. 2018-05-27 15:35:04 +12:00
jflyper
041bfb22c6 Create a pg for rxConfig 2018-05-27 09:13:04 +09:00
Michael Keller
7b879679c0
Merge pull request #5974 from mikeller/fix_gps_rescue_config
Renamed 'gpsRescue' to 'gpsRescueConfig' and moved it into the appropriate location.
2018-05-27 00:06:15 +12:00