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

153 commits

Author SHA1 Message Date
Michael Keller
02c7ac8c93
Merge pull request #7124 from mikeller/rename_use_flash
Renamed USE_FLASH to USE_FLASH_CHIP for clarity.
2018-11-26 21:51:27 +13:00
phobos-
c88a5a3a22 Refactored SPI RX led blink and bind plug functionality to rx_spi_common 2018-11-25 10:37:18 +01:00
mikeller
c8e484df94 Renamed USE_FLASH to USE_FLASH_CHIP for clarity. 2018-11-25 13:47:31 +13:00
jflyper
569f0bae62 Implement configurable system clock generation
PLL-HSE working

PLL-HSI working

Move SystemCoreClockUpdate in SystemInit to end

Switching from HSI-PLL to HSE-PLL (and back) is working

It works during various levels of overclocking.

Renamed CLI variable hse_mhz to system_hse_mhz

Restored the original position of the spectrum bind code

The internal logic of the spectrum bind code will prevent binding
process to fire if executed after soft reset.

Remove stale call to delay

Add a comment about call to spektrumBind placement

Declared SystemXXXSource functions, handled sign-ness warning.

Cleaned up commented out sections

USB clock generation for F446

Default HSE value for backward compatibility

Cleaned up more unused stuff

Handle non-F4 targets

Added comment about PLL_M selection

Removed fake gyro/acc from test target
2018-11-23 15:36:10 +13:00
Michael Keller
233a68c9c1
Merge pull request #6163 from RicoKirstein/pll_osd_clock
added the USEMCO2ASOSDCLOCK define for the F7 cpus.
2018-11-22 20:58:25 +13:00
Michael Keller
68eaf9e1aa
Merge pull request #7068 from mikeller/eliminate_adjustment_range_dependency
Removed issue with sparse 'defaultAdjustmentConfigs' in adjustment ranges.
2018-11-13 12:49:38 +13:00
mikeller
bc09e929b5 Removed issue with sparse 'defaultAdjustmentConfigs' in adjustment ranges. 2018-11-13 01:29:02 +13:00
Michael Keller
3259abfbc0
Merge pull request #7061 from pulquero/support_uint32_set_vars
Support for setting uint32 vars.
2018-11-12 01:10:55 +13:00
Mark Hale
0ace402ea3 Support for setting uint32 vars.
Signed-off-by: Mark Hale <mark.hale@physics.org>
2018-11-09 18:10:27 +00:00
Bruce Luckcuck
13a365dd35 Fix missing string terminator for CLI map command defaults output 2018-10-31 16:16:38 -04:00
mikeller
b10737a9fd Added option to reset serial passthrough on drop of DTR. 2018-10-29 22:16:44 +13:00
jflyper
9f47d130b9 Adds the MCO driver facility for F7 targets
MCO2 output as run time configurable option
Add sanity check for MCO2 pin
changed output mode to AF from OUTPUT in mco driver
MCO for F4 is not implemented yet
Reinstate original OMNIBUSF7 target.h
Add config variable mco2_on_pc9
Make MCO2 pin hardcoded with mco2_on_pin control variable
fixed mco2 clock config corruption
removed unused pin definitions
2018-10-26 19:51:19 +02:00
mikeller
a03f30efa0 Converted 'SKIP_' defines to 'USE_'. 2018-10-25 00:38:05 +13:00
jflyper
00dab4288f More strict application of USE_UART and USE_INVERTER 2018-10-08 15:06:42 +09:00
Michael Keller
cc820d99de
Merge pull request #6865 from chibaron/add_sfhss
Add SFHSS-SPI-RX
2018-10-08 01:01:13 +13:00
jflyper
57a6060005 Prevent sdcard_getMetadata from being called when card is not inserted or not ready 2018-10-05 03:41:53 +09:00
Michael Keller
29015af2e2
Merge pull request #6872 from AlienWiiBF/GYRO_GENERIC
Update Gyro driver for generic target
2018-10-03 23:44:01 +13:00
chibaron
f04f2f7cbb Fix unit test 2018-10-03 14:29:11 +09:00
MJ666
9e36354c45 Update Gyro driver for generic target 2018-10-03 00:26:55 +02:00
Chris
bc95da4259 Fixes SD_DET for SDIO 2018-10-02 21:56:16 +02:00
chibaron
9a452f4a1e Change SFHSS bind parameter rxSfhssSpiConfig to rxFrSkySpiConfig 2018-10-03 00:32:18 +09:00
chibaron
95d3200c92 fix coding style 2018-10-02 01:51:25 +09:00
chibaron
cb5fc4fd63 Add SFHSS-SPI-RX 2018-10-01 23:27:40 +09:00
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