1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 04:15:44 +03:00
Commit graph

338 commits

Author SHA1 Message Date
Michael Keller
f3036221ea
Fix CLI rc_smoothing_info frame rate display formatting (#9289)
Fix CLI rc_smoothing_info frame rate display formatting
2019-12-22 14:34:51 +13:00
Bruce Luckcuck
682e989057 Fix CLI vtx command parsing, range checks, and output order in diff
Change to use vtxTableConfig PG settings for validation rather than the current runtime values for bands, channels and power levels. Fixes command parsing when restoring a `diff` as the `vtxtable` runtime values won't be available until after the reboot.

Fix "off by one" range check for power level that was preventing use of the highest power level configured in `vtxtable`.

Reverse the order of the `vtxtable` and `vtx` outputs in a `diff`/`dump` so that `vtxtable` settings will be applied first as the `vtx` settings are dependent on them.
2019-12-17 09:52:22 -05:00
Bruce Luckcuck
564ebfc48d Fix CLI rc_smoothing_info frame rate display formatting
The formatting of the fractional part of the frame interval was not correct. For example 9004us would be displayed as 9.4ms instead of 9.004ms.
2019-12-14 16:33:53 -05:00
mikeller
3142d5ad70 Cleaned up CLI 'resource' implementation. 2019-12-09 01:26:57 +13:00
Michael Keller
054bd66bc4
Update RC smoothing "auto" settings to consider interpolated fe… (#9249)
Update RC smoothing "auto" settings to consider interpolated feedforward
2019-12-02 11:31:05 +13:00
Michael Keller
00855c4bb7
Add optional search string support for CLI "help" command (#9250)
Add optional search string support for CLI "help" command
2019-12-02 11:30:48 +13:00
Bruce Luckcuck
b2a50819a3 Update RC smoothing "auto" settings to consider interpolated feedforward
Allows default settings for RC smoothing to work seamlessly regardless of the feedforward type selected ("classic" vs. interpolated).

Adds a new "AUTO" setting for the derivative filter type that will select based on whether interpolated feedforward is enabled (use PT1) or not (use BIQUAD). The derivative filter cutoff if set to auto (0) will also use a fixed cutoff calculated from a 100hz base if interpolated feedforward is enabled. Otherwise if classic FF is active then it will default to the previous method of calculating the cutoff based on the RX frame rate.
2019-11-30 19:06:44 -05:00
Alberto García Hierro
37e66b3dda Add support for FrSky OSD
- Add displayWriteFontCharacter() for font writing, removing all max7456
specific code.
- Add displayIsReady() for asynchronous display initialization
- Add displayBeginTransaction()/displayCommitTransaction() for display
transactions, which allow performing complex drawing operations without
flickering
- Add displayGetCanvas(), which retrieves the canvas associated with a
display (if it has it)
- Add canvas implementation for pixel based access for a display
- Add FrSkyOSD driver and displayPort driver
- Enable FrSkyOSD driver for targets with flash > 256
- Rename max7456_symbols.h to osd_symbols.h
2019-11-30 22:06:36 +00:00
Bruce Luckcuck
749dd6c6d7 Add optional search string support for CLI "help" command
Helps users locate CLI commands by searching both the command name and description.
2019-11-30 13:04:31 -05:00
mikeller
99f77fa88d Moved configuration validation into 'config.c'. 2019-11-24 21:19:26 +13:00
markhermelinggt
8c47e3334b
Copy-paste error on line 2829 in cli.c
Found through static analysis (GrammaTech CodeSonar).

I am quite convinced that the VTX_TABLE_MAX_BANDS on line 2829 should be VTX_TABLE_MAX_CHANNELS.

Possible the same replacement should be done on Line 2834, but I am not 100%.
2019-11-19 09:46:09 -05:00
Michael Keller
e34ba7f534
vtxtable powerlevels with no parameters returns the vtxtable po… (#9122)
vtxtable powerlevels with no parameters returns the vtxtable power levels extract with SA2.1
2019-11-05 22:04:22 +13:00
SteveCEvans
938a39ac8f Display available dBm power levels from SA2.1 VTX along with corresponding power expressed in mW 2019-11-02 01:25:55 +00:00
mikeller
4a7904695e Moved 'config.[ch]' into the 'config/' directory. 2019-10-28 11:17:25 +13:00
Michael Keller
040724bacd
Fix CLI task output header alignment (#9081)
Fix CLI task output header alignment
2019-10-23 13:20:49 +13:00
Michael Keller
9e44cd3ca5
Renamed 'rxRuntimeConfig' to 'rxRuntimeState'. (#9072)
Renamed 'rxRuntimeConfig' to 'rxRuntimeState'.
2019-10-22 11:27:36 +13:00
Bruce Luckcuck
73a29e4ff6 Fix CLI task output header alignment 2019-10-21 12:16:42 -04:00
Michael Keller
2888bdd2b8
Revise feature logic to separate runtime and config settings (#9029)
Revise feature logic to separate runtime and config settings
2019-10-22 01:11:02 +13:00
mikeller
0a0d3631a7 Renamed 'rxRuntimeConfig' to 'rxRuntimeState'. 2019-10-22 00:12:51 +13:00
Bruce Luckcuck
e64703308b Revise feature logic to separate runtime and config settings
Isolates and prevents changes to runtime active features. Any changes to enabled features are deferred until after a save/reboot. Simplifies the previous logic.

Prevents potential failures when features are changed at runtime but the underlying code is not capabile of dynamic reconfiguration.
2019-10-21 20:25:03 +13:00
mikeller
43feeb8196 Made 'cliProcessCustomDefaults' static. 2019-10-20 23:23:16 +13:00
Michael Keller
5824bd4d93
Removed unused feature 'SOFTSPI'. (#8931)
Removed unused feature 'SOFTSPI'.
2019-10-18 03:32:07 +13:00
Michael Keller
5efceb11a1
Add cliDebugPrint functions to facilitate easy debug printing t… (#8905)
Add cliDebugPrint functions to facilitate easy debug printing to CLI
2019-10-18 03:29:33 +13:00
Michael Keller
f02e1e081f
Remove deprecated CLI name command (#8837)
Remove deprecated CLI name command
2019-10-18 03:28:48 +13:00
Bruce Luckcuck
9cb48c97fd Add cliDebugPrint functions to facilitate easy debug printing to CLI
To use, include `cli/cli_debug_print.h` in your code and be sure `USE_CLI_DEBUG_PRINT` is defined. Then you'll have access to the following functions to print debugging messages in the CLI:
```
cliDebugPrintLineFeed
cliDebugPrint
cliDebugPrintLine
cliDebugPrintf
cliDebugPrintLinef
```
Output is suppressed when the CLI is not open.

May interfere with the autocomplete initialization when first entering the CLI if your code is outputting data when the CLI first opens. But as this is only meant for debugging it shouldn't be much of a concern.

You may also need to rate limit your messages if printing data in a loop.

All of the debugging code must be removed from any completed code before submission.
2019-09-28 14:52:01 -04:00
Michael Keller
be4db4cfa4
Fixed hanging on 'defaults nosave' when RX_SERIAL is enabled. (#8946)
Fixed hanging on 'defaults nosave' when RX_SERIAL is enabled.
2019-09-26 00:29:15 +12:00
Michael Keller
462699d1a5
Handle a lack of trailing newline in config file. (#8942)
Handle a lack of trailing newline in config file.
2019-09-25 23:32:19 +12:00
Bruce Luckcuck
adbab5f782 Add board name to CLI version command output for unified targets
Will help improve support efforts by more clearly indicating which board's targer config was applied to the underlying unified target base.
2019-09-24 19:23:16 -04:00
mikeller
4e8249e23a Fixed hanging on 'defaults nosave' when RX_SERIAL is enabled. 2019-09-25 10:01:56 +12:00
Kyle K
b81b263bd0 Handle a lack of trailing newline in config file.
The configurator properly checks that the config data fits, so there is no risk of a command being cut off
2019-09-24 08:06:39 +00:00
mikeller
460b7e5fc5 Removed unused feature 'SOFTSPI'. 2019-09-23 08:49:55 +12:00
Michael Keller
91b4129a48
Fix the problem of multiple timer allocations with bitbanged Ds… (#8852)
Fix the problem of multiple timer allocations with bitbanged Dshot.
2019-09-10 01:06:31 +12:00
Michael Keller
167b9f2e96
Fixed 'sd_info' showing incorrect information when SD card not… (#8849)
Fixed 'sd_info' showing incorrect information when SD card not configured.
2019-09-09 23:28:35 +12:00
mikeller
4acf0893df Fix the problem of multiple timer allocations with bitbanged Dshot. 2019-09-09 00:48:02 +12:00
mikeller
7018c81bf1 Fixed 'sd_info' showing incorrect information when SD card not configured. 2019-09-08 13:55:18 +12:00
mikeller
c14a388687 Fix problem with empty string set as 'manufacturer_id'. 2019-09-08 13:22:46 +12:00
Bruce Luckcuck
9889e59f78 Remove deprecated CLI name command
Functionality replaced with `set name = ` syntax.
2019-09-06 09:06:54 -04:00
jflyper
adf6fd1764 DMA bit banging Dshot, first cut
F405 working (OMNIBUSF4SD target)
F411 not tested
F722 working, needs testing (OMNINXT7 target)
F74x not working

NOX target (temporary)

bb_dshot with telemetry on f4
bbshot f7 targets and fix crash due to missing debug pins

remove empty line

add empty lines

remove OMNIBUSF4 specific debug pins

add missing comma

add missing comma

Use separate bbTimerHardware array to fix unified targets

eliminate now unneeded timerGetByUsage

don't duplicate timer1 def

Add auto mode, rename dshot_bbshot to dshot_bitbang

remove newline

renamve various files

various changes to address feedback

address feedback

address feedback

add pacer timers to timer show

don't disable telemetry if dshot_bitbang is on or auto

Address feedback, add faster decode implementation based on bit banding, modify dma parameters to reduce required memory bandwidth on half

remove debug output

remove NOINLINE

Protect gpio direction change with critical sections

FIXWS_SAVE_INDEX

add static back in

no forward typedef

address review feedback

disallow proshot1000 with dshot bitbang

Extracted and plumbed up 'dbgPin'.
2019-09-04 16:06:48 +12:00
mikeller
1c8cfbd241 Extended configuration status to accommodate custom defaults. 2019-09-03 09:57:43 +12:00
mikeller
36dc7306e2 Merge branch 'fix_custom_defaults_addresses' into add_custom_defaults_to_msp 2019-09-01 20:03:57 +12:00
mikeller
772b249a3f Added support for resetting to custom defaults to MSP. 2019-09-01 14:26:57 +12:00
mikeller
3128328224 Fixed start / end addresses for custom defaults. 2019-09-01 13:35:10 +12:00
Dominic Clifton
d016aa2fc4 DSHOT - Use cycle counting instead of recording timestamp in dshot motor_DMA_IRQHandler.
It turns out that two calls to micros() and the calculation of
directionChangeDurationUs took 581 cycles, vs 396 cycles without the
calls to micros() and deferred calculation of the duration which is only
needed in the CLI.

This brings the time down from around 7 microseconds to 5.5 microseconds
on an F3 at 72Mhz.

This makes the difference between 100% invalid telemetry and 4% invalid
telemetry on the first motor on the F3.

Squashed commits:
* Remove the forward declaration for `pwmDshotSetDirectionInput` and make
it static.
* Remove unneeded forward declaration of `motor_DMA_IRQHandler`.
* Remove duplication in DMA IRQ Handler.
  Doesn't affect resulting code but improves readability.
* Use an inline function to read DWT->CYCCNT.
* Remove unneeded forward declarations from cli.c now that the correct
header is included.
* Update DWT unlock method.
2019-08-29 20:01:20 +02:00
Michael Keller
d331aed726
Merge pull request #8723 from schugabe/pin_up_down_config
Add resource option to configure unused pins as pulldown
2019-08-21 22:55:48 +12:00
Thorsten Laux
0d73d51ba8 report erpm, rpm and hz for convenience in dshot_telemetry_info 2019-08-17 10:04:26 +02:00
Johannes Kasberger
6a713a0340 add pull_up to names, change pg config to array of elements, use correct DEFs 2019-08-15 18:59:28 +02:00
Johannes Kasberger
cc9687a2bf Add resource option to configure pin as pullup or pulldown input
all pins are initialized to pullup inputs per default. With resource PULLDOWN 1 PIN it is
possible to reconfigure the pin so it is a PULLDOWN input.

With this it's possible to prevent certain errors on some boards that have multiple pins connected
with an inverter and the pullup flows back via the inverter and pulls other pins low (see #7849)
2019-08-14 22:34:34 +02:00
Michael Keller
811eeea542
Fixed warnings when no custom defaults are found. (#8720)
Fixed warnings when no custom defaults are found.
2019-08-15 00:40:37 +12:00
Michael Keller
1c6949419c
[H7] SDMMC2 support (#8697)
[H7] SDMMC2 support
2019-08-14 23:54:04 +12:00
mikeller
0e2f7bcc3f Fixed warnings when no custom defaults are found. 2019-08-13 23:27:19 +12:00