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

18012 commits

Author SHA1 Message Date
Steve Evans
bd68d3d4a9
Enable/disable the UART TX before changing the TX pin mode (#13018) 2023-08-08 08:50:12 +10:00
Mark Haslinghuis
96ffb3aa3d
fix led strip for h7 (#12890) (#12976)
* fix led strip for h7 (#12890)

* fix led strip for h7

* account for cloud build custom defines

* remove unused code

* Fix per review

---------

Co-authored-by: Eike Ahmels <eike.ahmels@tu-dortmund.de>
2023-08-06 10:07:29 +02:00
Mark Haslinghuis
c8e6124300
[MAINT] Add dshot_telemetry_start_margin setting (#12912) (#12964) 2023-07-18 06:51:25 +10:00
Steve Evans
a35fa26f23
Call updateInit() before writing motor command data (#12866) 2023-06-21 10:38:16 +02:00
Mark Haslinghuis
af99e428cb
Enable retrieval of the BUILD_KEY using MSP2 (#12264) (#12876)
* Enable retrieval of the BUILD_KEY using MSP2 (#12264)

* Enable retrieval of the BUILD_KEY using MSP2

* Repositioning

* Add releaseName

---------

Co-authored-by: J Blackman <blckmn@users.noreply.github.com>
2023-06-10 12:09:15 +02:00
Mark Haslinghuis
fd5f505bc1
Fix USE_TELEMETRY_IBUS (#12873) 2023-06-07 12:17:09 +02:00
J Blackman
8d12bc2421
[4.4.3] Update version.h (#12861)
Update version.h
2023-06-03 14:55:50 +02:00
Mark Haslinghuis
23d066d082
Revert PARAM_NAME_GPS_RESCUE_MAX_RESCUE_ANGLE range (#12854) 2023-06-01 08:40:24 +10:00
Mark Haslinghuis
56b441547c
[4.4.2] GPS Rescue IMU adaptation 0.2 (#12845) 2023-06-01 08:30:21 +10:00
ctzsnooze
29e1f4c730
[4.4.2] gps rescue initiated too close, imu fixes (#12835) 2023-05-28 15:50:28 +10:00
Mark Haslinghuis
bb0f06ea20
[4.4.2] Fix MS5611 (#12824) 2023-05-20 17:50:51 +10:00
Mark Haslinghuis
0915fc911a
[4.4.2] GPS Rescue Bugfix to ensure IMU adaptation to GPS course over ground (#12821)
GPS Rescue Bugfix to ensure IMU adaptation to GPS course over ground (#12789)

Restore previous IMU yaw heading behaviour when not in a rescue

Co-authored-by: ctzsnooze <chris.thompson@sydney.edu.au>
2023-05-20 17:50:34 +10:00
Mark Haslinghuis
1acf168b75
[4.4.2] fixes not working Ghost on F4xx (#12809) (#12811)
fixes not working Ghost on F4xx (#12809)

* fixes not working Ghost on F4xx

* minor fix

In the original line that was replaced, this was IOCFG_AF_PP_UP.

Co-authored-by: Homer <theisotopes@byom.de>
2023-05-15 21:22:45 +02:00
Mark Haslinghuis
605fb7bb8f
[4.4.2] Revert NVIC SPI priority (#12795) 2023-05-13 08:04:35 +10:00
Mark Haslinghuis
167bd0f3d0
[4.4.2] If CS is asserted between transfers then consider bus to be busy for … (#12784)
If CS is asserted between transfers then consider bus to be busy for all but owning device (#12604)

* If CS is asserted between transfers then consider bus to be busy for all but owning device

* Track if MAX7456 is mid DMA transfer, not simply that the SPI bus is busy

* Enable SPI DMA TX/RX together

Co-authored-by: Steve Evans <SteveCEvans@users.noreply.github.com>
2023-05-12 23:39:00 +02:00
Mark Haslinghuis
5a737a47e0
[4.4.2] Converge IMU faster at higher groundspeed during GPS Rescue (#12785)
Converge IMU faster at higher groundspeed during GPS Rescue (#12738)

* dynamic dcm_kp depending on groundspeed vs velocity to home

* reduce max pitch angle default to 40

* Only 10% of set velocity to home is enough, angle to 45

to reduce chance of sanity check against headwind

* fixes, thanks @KarateBrot

* Feedback from Ledvinap, ensure full pitch and yaw authority in descend

* pitch limit max of 1/3 and dcm_kp gain to 6x max

* apply IMU kP factor to yaw only via ez_ef

* More from @Ledvinap, constrain pitch in descent also

* Fix the velocity error gain, refactoring thanks to Ledvinap

* thanks, Mark!

* fixes, must be fabsf

* make IMU gain twice as sensitive to groundspeed error

* useCOG as float

* Fix unit test

* ensure cogYawGain is zero, except during gps rescue

* update comment after suggestion from ledvinap

* keep roll angle limit consistently at 50% of pitch limit when active

* changes to comments, thanks petr

Co-authored-by: ctzsnooze <chris.thompson@sydney.edu.au>
2023-05-12 23:34:52 +02:00
Mark Haslinghuis
29ad93892e
[4.4.2] Fix bootloader jump for g4 mcu (#12675) (#12783)
fix bootloader jump for g4 mcu (#12675)

Co-authored-by: Eike Ahmels <eike.ahmels@tu-dortmund.de>
2023-05-11 10:27:11 +02:00
Mark Haslinghuis
a46172a3ab
[4.4.2] Remove 15 m/s limit on estimated vario (#12788)
Remove 15 m/s limit on estimated vario
2023-05-11 10:26:25 +02:00
Mark Haslinghuis
ca12a4c611
[4.4.2] Tri-state USART TX output if load due to powered down peripheral is d… (#12782)
Tri-state USART TX output if load due to powered down peripheral is detected (#12760)

Tri-state USART TX output if loaded due to powered down peripheral being detected

Co-authored-by: Steve Evans <SteveCEvans@users.noreply.github.com>
2023-05-11 10:25:40 +02:00
Mark Haslinghuis
3fb822d877
[4.4.2] Fix GNSS new data (#12787)
Fix GNSS new data
2023-05-11 01:16:59 +02:00
J Blackman
d26e47ff02
[4.4.2] Reverting the config.h usage. (#12779)
* Reverting the config.h usage.

* Removing another remnant
2023-05-09 22:22:14 +02:00
nerdCopter
e5aab6aa66
[CONFIG] add W25Q128FV to NEUTRONRCF411SX1280 (#12755) 2023-05-06 03:20:22 +02:00
J Blackman
c27d7ebb0b
Update config.h 2023-04-26 12:54:12 +10:00
Mark Haslinghuis
5fdcfb5bc5
Fix handling of attribute type (#12707) 2023-04-22 11:40:11 +02:00
Steve Evans
93f0a2380e
DSHOT timing improvements (#12709)
DSHOT timing improvements:

If DSHOT telemetry is still being received, wait (12612)
Optimise DSHOT cache management loops (12672)
Send motor data and then immediately decode prior telemetry data for bitbanged DSHOT (12685)
2023-04-22 01:11:36 +02:00
Mark Haslinghuis
aa228ea583
Fix SDC (#12671) 2023-04-13 23:53:28 +02:00
J Blackman
983c04d846
Update version.h 2023-04-06 14:24:08 +10:00
SugarK
e43d591b2d
Add separate AAF values for ICM-42605 (#12616)
Co-authored-by: Tobias Bolin <tobias_bolin@hotmail.com>
2023-04-03 16:37:37 +02:00
Hans Christian Olaussen
64f48611aa
Exclude MSP_OSD_CONFIG if USE_OSD not defined (#12513) (#12590) 2023-04-02 11:23:09 +02:00
Hans Christian Olaussen
2c722653e1
4.4.1 Include smartport telemetry for Fport (#12314) (#12572)
Include smartport telemetry for Fport (#12314)
2023-03-26 11:18:39 +02:00
ctzsnooze
2c9b7072c6
Restore DShot Beacon control for 4.4 (#12560)
Restore DShot Beacon control
2023-03-22 12:26:32 +01:00
ctzsnooze
976330000d
DShot zero between beacon commands for 4.4, from 12544 (#12555)
DShot zero between beacon commands from 12544

Make beacon command timing independent of audio beeper
Send DShot zero between beacon commands.
Use cmpTimeUs for time comparisons
2023-03-21 23:34:17 +01:00
J Blackman
904532df1c
[4.4.1] FIX: Blackbox (as applied to 4.5.0) (#12520)
FIX: Blackbox (as applied to 4.5.0)
2023-03-15 20:54:13 +01:00
blckmn
a88e6fc67d FIX: Missing USE_BLACKBOX
(cherry picked from commit 75adc4da1e)
2023-03-11 21:48:10 +11:00
J Blackman
cbf1030fe3
[4.4.1] FIX CONFIG: Adding USE_FLASH to enable where hardware supports (#12499)
FIX CONFIG: Adding USE_FLASH to enable where hardware supports
2023-03-11 10:34:37 +11:00
nerdCopter
dd4805370d
Improve GPS Rescue Pitch smoothing and disarming (#12413) 2023-03-08 16:09:45 +11:00
J Blackman
e156d089b7
[4.4.1] FIX CONFIG: Adding USE_ACC, USE_GYRO and USE_BARO where appropriate. (#12477) 2023-03-08 12:04:12 +11:00
SugarK
ebc3479b6b
[4.4-maintenance] Fix ICM426XX AA filter (#12444) (#12465)
Fix ICM426XX AA filter (#12444)

* Change ICM426XX gyro initialization

- Shut down Acc and Gyro before setting non-GYRO_ODR, ACCEL_ODR, GYRO_FS_SEL, ACCEL_FS_SEL, GYRO_MODE, ACCEL_MODE registers
- Set correct User Bank before writing to registers

* Change ICM426XX GYRO_ACCEL_CONFIG0 to 15 from 14

* Remove unneeded delay commands

Co-authored-by: tbolin <tobias_bolin@hotmail.com>
2023-03-06 21:12:44 +11:00
Hans Christian Olaussen
a6ca76df8a
4.4-maintenance H7 Fix frozen ADC values (#12443)
H7 ADC buffer invalidate cache
2023-03-04 08:33:03 +11:00
Ivan Efimov
9eba513404
[4.4-maintenance] increase FF smoothing max to suit elrs 1000hz link rate (#12426) (#12433) 2023-02-28 12:43:13 +11:00
J Blackman
87031398e0
4.4.1: Latest changes from unified targets, and sdcard build fix. (#12415) 2023-02-28 08:04:26 +11:00
Ivan Efimov
53cd688653
Fix: Renamed USE_LEDSTRIP_64 to USE_LED_STRIP_64 (#12408) 2023-02-24 03:10:19 +01:00
J Blackman
10cae48ed2
4.4.1: Patch from master for undefined USE_ACC and USE_GYRO (#12385) 2023-02-18 12:19:56 +11:00
J Blackman
1e7b7868e9
4.4.1: Adding support for building by config (#12376)
Adding support for config.h (FIX: SPRACING)
2023-02-18 11:00:22 +11:00
J Blackman
74bd426da3
4.4.1: Patch for config.h files (#12380)
Patch for config.h files
2023-02-18 00:41:52 +01:00
Dominic Clifton
cf475e6806
Revert "Fix missing CUSTOM_DEFAULTS for H730/H750 targets. (#12281)" (#12334)
This reverts commit ec20d399c5.
2023-02-09 08:59:09 +11:00
Jan Post
e75d4d9048
Fix SDFT batchSize rounding (#12332) 2023-02-08 15:11:14 +01:00
Dominic Clifton
ba71dfe6d3
BF 4.4.1 rollup 1 (#12306)
* NVIC - Update ELRS and SPI atomic_block usage to use appropriate
priority levels.

* SD - Use SDIO by default if target uses USE_SDCARD_SDIO.
2023-02-07 23:22:16 +01:00
Dominic Clifton
5213bb5871
Fix unified targets that use OctoSPI. (BF4.4.x) (#12307)
OctoSPI and Memory Mapped Flash support (#11825)

* STM32H730/STM32H750 - Fix use of USE_LP_UART1 instead of USE_LPUART1.

* STM32H723 - Prepare for being able to build for using non-internal-flash
config storage.

* STM32H723 - Prepare for using non-default strings.

* STM32H723 - Disable 'use custom defaults' when using USE_EXST.

* STM32H723 - Disable CUSTOM_DEFAULTS_EXTENDED when EXST is used.

* OCTOSPI - Add initialisation code.

* Add support for RAM_CODE.

* STM32H730 - Add support for RAM_CODE via the .ram_code attribute.

* OCTOSPI - Proof-of-concept for disabling/enabling memory mapped mode on
a running system.

NOTE: The HAL libs are compiled into a memory mapped region, and this cannot be used for OctoSPI access when memory mapped mode is disabled.

* OCTOSPI - Drop HAL support after determining that it's not suitable for
the memory mapped flash use-case.

* OCTOSPI - Sometimes, when disabling memory map mode, the abort fails.
Handle this by disabling the OSPI peripheral first and re-enabling it
afterwards.

* SD/FLASH - Update comments regarding possible solutions to the catch-22
issue with SD/SPI/QUADSPI/OCTOSPI pin configurations.

* OCTOSPI - Use device instance directly.

* OCTOSPI - Prepare W25Q flash driver for octospi support.

* OCTOSPI - Add octospi flash detection.

Note: The method to detect flash chips is similar to the method used for
QUADSPI and as such the code was used as a base. However the initial
OCTOSPI implementation doesn't support the non-memory-mapped use-case so
the un-tested code is gated with `USE_OCTOSPI_EXPERIMENTAL`.

The key differences are:
* uses octospi api not quadspi api.
* flash chip clock speeds should not be changed for memory-mapped flash
chips, bootloader already set it correctly.
* only certain flash chips are capable of memory mapped support.

* W25Q - Ensure w25q128fv_readRegister returns 0 if the receive fails.

* OCTOSPI - Implement octoSpiTransmit1LINE, octoSpiReceive1LINE and
octoSpiReceive4LINES.

* OCTOSPI - Specify device from init.

* OCTOSPI - More fixes and work on init.

Current status is that memory mapped mode is disabled and flash chip is
detected, but w25q128fv_detect should not be calling w25q128fv_reset.

* FLASH - Add comment regarding wasted flash space on targets that only
use one bus type for the flash chip.

* FLASH - Split `detect` into `identify` and `configure`.

* OCTOSPI - Extract flashMemoryMappedModeEnable/Disable to separate
methods.

* FLASH - Reduce size of targets that don't support the use of multiple
flash interfaces.

* Single-flash-chip targets usually only support one type of io
interface.
* Without this, compiler warnings are generated in `flashSpiInit` for
targets that only use flash chip drivers that support quadspi or octospi
that don't even use SPI for flash.

* FLASH - Use MMFLASH_CODE/DATA to conditionally move code/data to RAM.

Only targets compiled to support memory mapped flash chips need the some
specific code in RAM.  Otherwise the code/data should be in the normal
linker section.

* FLASH - W25Q Prepare for memory mapped flash usage.

* Wait/Delay functions must work with interrupts disabled.
* Code used for reading/writing must run from RAM.

* OCTOSPI - Implement remaining required methods.

* OCTOSPI - Fixes for earlier code (not last commit).

* FLASH - W25Q update timeout values from Datasheet Rev L.

* FLASH - Prepare flash driver for use when memory mapped flash is
disabled.

* System - Prepare microsISR for use when memory mapped flash is disabled.

* FLASH - Add support for CONFIG_IN_MEMORY_MAPPED_FLASH.

* Flash - Fix incorrect gating on cli flash commands.

When compiling with USE_FLASH_CHIP and without USE_FLASHFS there were
compiler warnings.

* MMFLASH - Fix release-mode build.

* FLASH - Allow SPI pins to be reconfigured when using CONFIG_IN_MEMORY_MAPPED_FLASH.

MMFLASH only works via QuadSPI/OctoSPI peripherals.

* EXST - Disable the 2GB workaround which is now causing a different
error.

The error we get with 'remove-section' enabled is:

"error in private header data: sorry, cannot handle this file".  The
cause of this new error in the objcopy codebase is an out of memory
condition, somehow the 2GB files and this error are related but the root
cause of both is still unknown.

* OCTOSPI - Add support for STM32H723.

* STM32H723 - Add linker scripts for EXST usage.

* NucleoH723ZG - Add build script to demonstrate OCTOSPI and Memory Mapped
flash support.

* FLASH - WUse the size in bits to set the size of the buffer.

* FLASH - Fix typo in W25N driver defines.

Was using W28N instead of W25N

* OCTOSPI - Fix missing semilcolon when compiling without
USE_FLASH_MEMORY_MAPPED.

* OCTPSPI - Fix missing call to 'memoryMappedModeInit'.

* SPRacingH7RF - Add example build script to allow for testing prior to
unified target / cloud-build support.
2023-02-07 23:20:18 +01:00
Dominic Clifton
ec20d399c5
Fix missing CUSTOM_DEFAULTS for H730/H750 targets. (#12281) 2023-02-02 16:34:50 +01:00