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

11902 commits

Author SHA1 Message Date
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
Thorsten Laux
6b0bca4ef5 Fix dshot bidir on H7 2019-09-28 14:24:48 +02:00
x4FF3
906b84ba8c add mag and bmp support 2019-09-26 12:17:40 +02:00
unknown
319f55d878 Add TRANSTECF411 Target 2019-09-26 13:51:56 +08: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
Michael Keller
35e2e16e86
[VTX] Fixed version checks in smartaudio that disabled pitmode… (#8940)
[VTX] Fixed version checks in smartaudio that disabled pitmode on SA2.1 devices
2019-09-25 23:30:57 +12:00
Michael Keller
7ddf387fbc
Add board name to CLI version command output for unified targets (#8937)
Add board name to CLI version command output for unified targets
2019-09-25 23:25:37 +12:00
Michael Keller
81bca4b7b8
Fix VTX low power disarm when USE_VTX_RTC6705 is defined (#8936)
Fix VTX low power disarm when USE_VTX_RTC6705 is defined
2019-09-25 23:22:07 +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
Michael Keller
064ca9b75e
Added missing compilation warning for unsupported F3 targets. (#8930)
Added missing compilation warning for unsupported F3 targets.
2019-09-24 22:35:29 +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
functionpointer
d3d1a5fd89 [VTX] Fixed version checks in smartaudio that prevented pitmode from working on SA2.1 devices 2019-09-23 23:56:05 +02:00
jflyper
4e9923569a NUCLEOF103RG target
NUCLEOF103RG is a target for Nucleo-F103RG (Nucleo-F103RB transplanted
with STM32F103RG which has 1MB of FLASH).
Such hardware with this target comes in handy when a firmware that
doesn't fit in smaller FLASH variant when compiled with DEBUG option.

The target definition files are straight copy of NAZE, except LED0_PIN
has been redefined to use Nucleo's LD2 (User LED).

It is also easy to convert exisiting F1 targets to be built to run on
the Nucleo-F103RG board:

- Add
    #define FLASH_PAGE_SIZE 0x800
    to target.h

- Also add
    #undef USE_DSHOT
    #undef USE_LED_STRIP
    #undef USE_TRANSPONDER
    #undef USE_CAMERA_CONTROL
    to target.h to avoid non-F1 compatible code from getting in.

- Add
FLASH_SIZE  = 1024
    to target.mk
2019-09-23 23:58:03 +09:00
Bruce Luckcuck
0bd808d1dc Fix VTX low power disarm when USE_VTX_RTC6705 is defined
Affected all unified targets as USE_VTX_RTC6705 must be defined to allow supporting that VTX option. Would cause the low power index settings for RTC6705 to override the settings for other VTX type and set the vtxtable power level index to 2 instead of 1.
2019-09-23 09:13:25 -04:00
Michael Keller
d1d9875208
Fix compile errors if USE_DSHOT not defined (#8928)
Fix compile errors if USE_DSHOT not defined
2019-09-23 19:40:41 +12:00
Michael Keller
564db329b0
Merge pull request #8926 from ctzsnooze/exclude-yaw-from-ff_max_rate_limit_PR
exclude yaw from ff_max_rate_limit
2019-09-23 19:38:56 +12:00
Michael Keller
e2c569269a
Prevent DSHOT commands during protocol initialization/detection (#8927)
Prevent DSHOT commands during protocol initialization/detection
2019-09-23 18:57:44 +12:00
mikeller
460b7e5fc5 Removed unused feature 'SOFTSPI'. 2019-09-23 08:49:55 +12:00
Michael Keller
a54c33b952
UART buffers for F4 should not be in CCM DATA RAM for DMA to wo… (#8924)
UART buffers for F4 should not be in CCM DATA RAM for DMA to work
2019-09-22 23:39:27 +12:00
mikeller
a76b5666e5 Removed pins not available in LPQFP-100 or 144 packages. 2019-09-22 23:17:54 +12:00
mikeller
8cee81406e Added missing compilation warning for unsupported F3 targets. 2019-09-22 22:37:42 +12:00
mikeller
2e9f4c76c3 Improved the efficiency of 'applyFfLimit()'. 2019-09-22 16:17:51 +12:00
ctzsnooze
5112b66a0f improve code efficiency 2019-09-22 14:06:31 +10:00
Bruce Luckcuck
bd407fba88 Fix compile errors if USE_DSHOT not defined 2019-09-21 19:22:47 -04:00
Bruce Luckcuck
5a9ce05ec0 Prevent DSHOT commands during protocol initialization/detection
Adds a fixed delay after the motors are enabled before DSHOT commands can be sent. Fixes a problem caused by sending DSHOT commands too soon and prevent the ESC from properly detecting the protocol.
2019-09-21 18:26:05 -04:00
ctzsnooze
891b47e11e exclude yaw from ff_max_rate_limit 2019-09-22 08:19:37 +10:00
jflyper
ff72647486 UART buffers for F4 should not be in CCM DATA RAM for DMA to work 2019-09-22 04:04:26 +09:00
mikeller
941bcd727a Added SPI5 pin definition for STM32H7. 2019-09-21 22:24:49 +12:00
Michael Keller
031a21b9fc
Merge pull request #8914 from jflyper/bfdev-fix-STM32F745-target-not-to-use-SPI5-and-SPI6
STM32F745 Do not define USE_SPI_DEVICE_5 and USE_SPI_DEVICE_6
2019-09-21 16:48:31 +12:00
LinJieqiang
4462cb6977 TARGET: add support for "IFLIGHT_H7_TWING" board. 2019-09-20 10:23:36 +08:00
Michael Keller
bcc699df87
Revert Tramp power max check when setting power (#8907)
Revert Tramp power max check when setting power
2019-09-20 07:50:18 +12:00
jflyper
6fca1a8409 STM32F745 Do not define USE_SPI_DEVICE_5 and USE_SPI_DEVICE_6
SPI5 and SPI6 are only available in packages >= 144,
and these are not defined in bus_spi_pinconfig.c either.
Accessing spiInitDevice() with SPIDEV_5 or SPIDEV_6 would cause hard fault.
2019-09-19 23:57:26 +09:00
Bruce Luckcuck
6560f80dad Revert Tramp power max check when setting power
The maximum power capability supplied from different VTX models is inconsistent. Sometimes correctly representing the VTX's capabilities, while for others not accurate or misrepresentative. So the previously added check is preventing accessing power levels in cases where the VTX doesn't properly report its max limit.
2019-09-18 10:09:34 -04:00
Bruce Luckcuck
7e04a9666c Increase Tramp retry count and fix lockup if VTX out-of-sync with band/channel settings
Some VTX don't respond to every request so it's necessary to retransmit. A previous PR fixed a bug that caused more retries than expected and made the actual retries only be 2 as configured. Unfortunately this exposed the problem with the non-responding VTX with cases of it not responding to both retries. The problem was accidentally masked by a previous bug with the retry counter causing many retries to actually occur.

This then exposed a secondary problem in `vtx_common` that lead to a "lockup" condition if the actual VTX channel didn't match our expectation of what the channel should be based on the settings. We were getting into this state because of the (now working) retry limit and cases where the VTX didn't respond and change channels as expected.

Increased the retry count to 20.

Fixed the logic that would prevent subsequent channel changes if the actual VTX channel didn't match the expected value based on the settings. Also fixed a problem where the channel change would not work if the VTX was on a frequency that was not defined in `vtxtable`.
2019-09-17 18:11:51 -04:00
Michael Keller
dd2b0b9763
Merge pull request #8893 from joelucid/bitbang_prefer_tim8
prefer timer 8 for dshot_bitbang
2019-09-17 12:10:56 +12:00
Michael Keller
1d0afd8d50
Merge pull request #8897 from warhog/master
Removed usage of UNUSED macro for motorCount as motorCount is used now
2019-09-17 12:09:46 +12:00
x4FF3
2fa442a419 Target AIRF7
This reverts commit aa13b6da778232df5730c6bd88b7e830aee6f7e4.

fixes

change TBI and MID

add first line
2019-09-16 22:05:44 +12:00
warhog
7b9114d0d8 removed UNUSED macro for motorCount as motorCount is used in line 213 since commit ccf7ce964a 2019-09-15 21:11:10 +02:00
Thorsten Laux
9ed18b78b3 prefer timer 8 for dshot_bitbang 2019-09-15 14:35:42 +02:00
Michael Keller
644ab5d905
prevent using same timer channel twice (#8886)
prevent using same timer channel twice
2019-09-15 20:35:49 +12:00
Michael Keller
3bf89decdd
Update target config for FLYWOOF7DUAL,F405,F411 (#8750)
Update target config for FLYWOOF7DUAL,F405,F411
2019-09-15 10:41:26 +12:00
Michael Keller
7e160e1380
Fix an erroneous constant in the calculation of altitude from b… (#8874)
Fix an erroneous constant in the calculation of altitude from barometric pressure.
2019-09-15 00:43:42 +12:00
flywoo
485526e6ec Update target config for FLYWOOF7DUAL,F405,F411 2019-09-14 19:06:28 +08:00
Michael Keller
6f6ab50fb3
Make crash recovery settings limits rational to prevent infinit… (#8871)
Make crash recovery settings limits rational to prevent infinite crash recovery and controls lockout
2019-09-14 22:50:13 +12:00
Thorsten Laux
b29329c061 prevent using same timer channel twice 2019-09-14 09:09:52 +02:00
Bruce Luckcuck
26c5e6aae2 Revert crash_time timeout handling changes 2019-09-12 19:53:38 -04:00
Bruce Luckcuck
381b38ca52 Fix crash recovery timeout logic and make settings limits rational
Timeout logic was ignored if the user had the accelerometer enabled and the quad wasn't within the angle limit. This was made doubly troublesome as the angle limit could be set to zero preventing crash recovery from ever deactivating.

Also adjusted the ranges of the parameters to be more rational to avoid invalid configurations.
2019-09-12 19:53:38 -04:00
Michael Keller
4433dbb518
Add missing vtxStatus variable initialization in MSP_VTX_CONFIG (#8869)
Add missing vtxStatus variable initialization in MSP_VTX_CONFIG
2019-09-13 09:31:04 +12:00