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

18189 commits

Author SHA1 Message Date
David O'Connor
c41b458e58
Allow custom H7 HSE freqs. Allow H7 HSI. Limit H723 speed to 520Mhz (#12291)
* Work

* Removed deprecated unified cfg comments
2023-05-12 00:01:13 +02:00
ctzsnooze
f44cc9fa6e
DShot bitbang decode - simple refactor (#12688)
* dshot bitbang decode simple refactor saves about 80 cycles

Co-Authored-By: 4712 <4712@users.noreply.github.com>

* int recommendation

---------

Co-authored-by: 4712 <4712@users.noreply.github.com>
2023-05-11 18:41:07 +02:00
ctzsnooze
10067ad6ad
TPA optimisations (#12721)
* TPA optimisations

* improvement, thanks @ledvinap

* update following review comments, thanks karatebrot and ledvinap

* include rx.h in pid_init.c to get PWM_RANGE_MIN

* review suggestion
2023-05-11 18:38:15 +02:00
Mark Haslinghuis
c6b3a1e129
Update mode label for BOXBLACKBOXERASE (#12752) 2023-05-11 17:15:40 +02:00
ctzsnooze
68dd061c51
Minor pid.c refactoring (#12722)
* Minor pid.c refactoring

* Only calculate unfiltered gyro delta for that debug

Remove unnecessary comment
Change multiplier to factor of 10

* remove some archaic comments

* clarify name of D_LPF_PRE_TPA_SCALE, use inverse in define

* Remove some blank lines

* undo conversion to division thanks -ffast-math
2023-05-11 17:06:36 +02:00
Mark Haslinghuis
f3fab663da
Fix GNSS new data (#12725)
Fix gps new data

Initialize next_fix
2023-05-11 00:47:50 +02:00
ctzsnooze
8e3389f452
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
2023-05-10 22:24:34 +02:00
Steve Evans
9ff4723c19
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
2023-05-10 22:17:06 +02:00
Zzyzx
922bc9d593
Add GPS Status Line to CLI Status Output (#12769)
* Add GPS status line to cli status output: connected status, UART + serial port baud + configured baud, configured status.

* Fixed unit test link fail.

* Really fixed unit test link fail (I hope).

* Really fixed unit test link fail (no really this time).

* Updated to address code reviews.

* Updated to address code reviews.

* Updated to address code reviews.
2023-05-10 14:22:54 +02:00
J Blackman
6e05967840
Config handling updated to using repository for hydration (#12714)
* Modification to allow src/config to be a repo within a repo.

* Moving config files to own repository, and including using make.

* Removing all old config files.

* Correct CI errors.

* Playing with pulling the configuration files from the API

* Attempt to get past github actions issue

* Adding additional assistance when configs not hydrated

* Move the workflow to support hydration before outputing target list.

* Correction for revision targets

* Requires additional config hydration

* Better messaging on what to do:

- when you have a local config.h for a new target, ignore hydration of target list if you are building the target config in question.
- when you are doing any activity that does not require hydration, e.g. printing out help or installing arm_sdk etc.

* Anything suffixed with clean should be allowed through

* Adjusting to simply use a copy of the repository. Noting we will need to decide whether or not to include MFTR name in the config directory or not.
2023-05-10 11:12:07 +02:00
Steve Evans
4dc04d6a33
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
2023-05-10 11:53:35 +10:00
Steve Evans
cbaf9b0265
Detect if no motor GPIO is specified during DSHOT intialisation (#12745) 2023-05-04 01:09:38 +01:00
Jan Post
460e4d00fe
Lead-Lag Compensator (#12730)
* Implement Lead-Lag-Compensator

* Refactoring / Clean up

* Remove trailing whitespaces
2023-05-03 10:01:36 +02:00
Mark Haslinghuis
405627dec2
[CONFIG] Updates from master-config and more (#12741)
* Updates from master-config
* Add OMNIBUSF4NANO
* Add TMOTORH743
* add GEPRCG4AIO
* Update MAMBAG4
* Update NEUTRONRCF435
2023-04-29 19:42:57 +10:00
ctzsnooze
34057bfbc2
Refactor Feedforward Angle and RC Smoothing - mashup of 12578 and 12594 (#12605)
* Refactor Feedforward Angle and RC Smoothing

* update rc_smoothing at regular intervals

* add Earth Ref to OSD, update pid and rate PG

* Initialise filters correctly

* refactoring to improve performance

* Save 24 cycles in Horizon calculations, other optimisations

At a cost of 40 bytes

* save 25 cycles and 330 bytes in rc_smoothing

* feedforward max rate improvements

* typo fix

* Karatebrot's review suggestions  part one

* Karatebrot's excellent suggestions part 2

* more efficient if we calculate inverse at init time

Co-Authored-By: Jan Post <post@stud.tu-darmstadt.de>

* Horizon delay, to ease it in when returning sticks to centre

* fix unit tests after horizon changes

Co-Authored-By: 4712 <4712@users.noreply.github.com>

* horizon_delay_ms, default 500

* fix unit test for feedforward from setpointDelta

* Final optimisations - thanks @Karatebrot for your advice

* increase horizon level strength default to 75 now we have the delay

* restore Makefile value which allowed local make test on mac

---------

Co-authored-by: Jan Post <post@stud.tu-darmstadt.de>
Co-authored-by: 4712 <4712@users.noreply.github.com>
2023-04-23 22:03:18 +02:00
Steve Evans
445758f3ec
Fix handling of attribute byte (#12701) 2023-04-21 00:15:04 +02:00
Jan Post
3167bf756c
Increment parameter group version of GPS config (#12681) 2023-04-20 21:22:42 +10:00
dawr68
271acf7ace
CONFIG: AOCODAF722MINI Add missing motor 8 output (#12690)
Add missing motor 8 pin definition
2023-04-20 11:57:17 +02:00
Mark Haslinghuis
1fa44099e1
Fix Softserial (#12679) 2023-04-20 00:44:29 +10:00
Steve Evans
e8126dd6dd
Send motor data and then immediately decode prior telemetry data for bitbanged DSHOT (#12685)
* Send motor data and then immediately decode prior telemetry data for bitbanged DSHOT
F4 can't handle 8K PID loop

* Fix missing cfg_pms.version

* Limit G4 to 4K PID rate as per F4
2023-04-19 13:05:46 +02:00
Steve Evans
fea097a893
Fix missing cfg_pms.version (#12695) 2023-04-19 12:03:23 +02:00
J Blackman
bf613e4ea6
CONFIG: New Target FOXEERF745V4_AIO (#12677) 2023-04-18 12:55:21 +02:00
Eike Ahmels
66d7f05448
fix bootloader jump for g4 mcu (#12675) 2023-04-16 00:51:53 +10:00
Steve Evans
20747ec3e3
Optimise DSHOT cache management loops (#12672) 2023-04-14 21:00:06 +02:00
ASDosjani
a0d009c4df
UBLOX Full Power mode + default STATIONARY model (#12659) 2023-04-14 20:40:22 +02:00
Martin Luessi
3bfbac4aa8
Fix flash M25P16 ID with QUADSPI (#12670) 2023-04-14 15:36:12 +10:00
Martin Luessi
70405307ff
Position: Remove 15 m/s limit on estimated vario (#12669)
Position: remove 15 m/s limit on estimated vario
2023-04-13 23:18:50 +02:00
J Blackman
ba01a6a48d
Obtain HSE_VALUE from config.h where provided. (#12632) 2023-04-13 13:33:45 +10:00
Mark Haslinghuis
1498c0aa5e
CONFIG: Add FLASH_W25Q128FV to SYNERGYF4 (#12660)
Fixes: https://github.com/betaflight/betaflight/issues/12643
2023-04-11 13:39:02 +10:00
J Blackman
a831878934
Fix PG initialization of DMA defaults for TIMUP configuration (#12633)
* Adding PG config defaults for TIMUP configuration

* Corrected index

* Adding in the additional TIMUP as commented.
2023-04-10 22:43:27 +02:00
Mark Haslinghuis
567d3dd2e5
Fix Mercury G4 and fix TODO for PID_PROCESS_DENOM for all targets (#12611)
* Fix Mercury G4

* Changes after #12632

* Fix TODO for PID_PROCESS_DENOM
2023-04-11 04:52:00 +10:00
Mark Haslinghuis
79d9b05827
CONFIG: Add ICM42688P to AIKONF7 (#12627)
Add ICM42688P to AIKONF7
2023-04-11 04:48:33 +10:00
Mark Haslinghuis
77cf7b1c3d
CONFIG: Add W25Q128FV to REVOLTOSD (#12651)
Add W25Q128FV to REVOLTOSD

Fixes: https://github.com/betaflight/betaflight/issues/12643
2023-04-11 04:47:41 +10:00
Mark Haslinghuis
b0f1321a19
CONFIG: Add BARO_BMP280 to FLYWOOF411 (#12650)
Add BARO_BMP280 to FLYWOOF411

Fixes: https://github.com/betaflight/betaflight/issues/12644
2023-04-11 04:47:16 +10:00
Mark Haslinghuis
109f2c1202
CONFIG: Add BARO_SPI_BMP280 to FRSKYF4 (#12649)
Add BARO_SPI_BMP280 to FRSKYF4

Fixes: https://github.com/betaflight/betaflight/issues/12642
2023-04-11 04:46:51 +10:00
Mark Haslinghuis
d063514e1d
CONFIG: Add BMP280 + W25Q128FV to AIRF7 (#12630) 2023-04-11 04:46:27 +10:00
Mark Haslinghuis
f42355953a
CONFIG: Add W25Q128FV to OMNINXT4 (#12652)
Add W25Q128FV to OMNINXT4

Fixes: https://github.com/betaflight/betaflight/issues/12643
2023-04-11 04:46:06 +10:00
Steve Evans
b7c5f84d2f
If DSHOT telemetry is still being received, wait (#12612) 2023-04-10 09:01:52 +10:00
Mark Haslinghuis
af97415da2
CONFIG: Fix TODO MAG & I2C (#12545)
Fix mag
2023-04-10 08:38:00 +10:00
dawr68
99ae6d897d
CONFIG: Fix TMotor F7 BMP280 baro (#12639)
Fix BMP280 define
2023-04-09 11:36:06 +02:00
ctzsnooze
b54ae921fc
update pid.c PG to 7 (#12619) 2023-04-08 05:32:26 +10:00
ASDosjani
aead5e5a59
Make UBLOX models more configurable (#12587)
* Make UBLOX models more configurable

* Add more nav model
2023-04-07 10:55:54 +02:00
Jan Post
2792d518d1
Implement Stopwatch (#12623)
* Implement stopwatch to measure time periods

* Add float version of stopwatchGetMicros()
2023-04-07 10:16:43 +10:00
HThuren
29ef811fa2
Add more info for sensor in (get) MSP_SENSOR_CONFIG (#12626)
* more info for sensor

* moved comment
2023-04-06 23:49:33 +02:00
HThuren
2878ad4e72
add getCoreTemp (#12608)
* add getCoreTemp

* add ifdef

* Update msp.c

Now also repported from MSP_STATUS

* Update src/main/msp/msp.c

Co-authored-by: Míguel Ángel Mulero Martínez <mcgivergim@gmail.com>

---------

Co-authored-by: Míguel Ángel Mulero Martínez <mcgivergim@gmail.com>
2023-04-06 22:22:05 +02:00
ASDosjani
e195bf7717
Cleanup + led overlay expansion (#12554)
* Cleanup + led overlay expansion

* fix tests
2023-04-06 20:54:31 +10:00
theojalba
437b03eb1f
Add SPRO-SPRACINGH7NANO.config (#12575)
* Add SPRO-SPRACINGH7NANO.config
* Remove dupicate #define and add line return at end of file
* Add #pragma once
* Remove extra SDCARD pins
* Remove unnecessary SPI and I2C #defines
* Add USE_FIRMWARE_PARTITION_FLAG
* Remove SDCARD flag
* Add timer pin map
* Add ADC voltage and current
* Fix ADC_RSSI
* Add DMA TIMUP
* Enable serial on UART1
* Add TIMUP_DMA_OPT
2023-04-06 16:11:38 +10:00
Jan Post
d2fbc30349
More efficient PTn gain calculation (#12610) 2023-04-06 01:58:04 +02:00
ot0tot
13feebe85f
Fix F411 PA10 Motor DMA Assignment (#12561) 2023-04-05 02:07:07 +10:00
Mark Haslinghuis
4ff09ff9bc
CONFIG: Add SUB250F411 (#12593) 2023-04-05 02:05:57 +10:00