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

18409 commits

Author SHA1 Message Date
Petr Ledvina
16776dc29f
Fix wrong test for BOXMSPOVERRIDE channel (#12857)
`msp_override_channels_mask` bits are indexed by raw channels, but
auxChannelIndex (starting from NON_AUX_CHANNEL_COUNT) was used for test

Co-authored-by: Petr Ledvina <ledvinap@hp124.ekotip.cz>
2023-06-10 17:07:36 +10:00
Petr Ledvina
ee35b6afe3
Update gtest to newer version (#12871)
Update gtest

Copy of debian/stable libgtest-dev

Co-authored-by: Petr Ledvina <ledvinap@hp124.ekotip.cz>
2023-06-10 17:06:47 +10:00
Tanner Beard
46ebf1fc97
RPM Limiter Patch (#12877)
initial commit
2023-06-10 17:06:17 +10:00
J Blackman
7d7b6596b0
Removing Timer Usage Flags (#12862) 2023-06-07 06:49:13 +10:00
Míguel Ángel Mulero Martínez
d8a9906e92
Upgrade stale action to v8 (#12858)
Co-authored-by: J Blackman <blckmn@users.noreply.github.com>
2023-06-06 11:12:34 +02:00
J Blackman
d730929927
Remove target create / update workflow (#12852)
- as no longer required
2023-06-02 02:14:01 +02:00
Míguel Ángel Mulero Martínez
66734f4574
Fix cloud build comment action (#12851) 2023-06-01 04:11:29 +10:00
ctzsnooze
2f927e3271
GPS rescue IMU adaptation 0.2 (#12841)
* GPS rescue IMU adaptation 0.2

* minor tweak to give more IMU gain at lower max angle
2023-05-31 09:23:21 +10:00
Tanner Beard
26701f0638
RPM Limiter (#12054) 2023-05-29 06:18:16 +10:00
Míguel Ángel Mulero Martínez
2570e71b42
Add PR cloud comment to maintenance branch too (#12837) 2023-05-29 06:10:06 +10:00
ctzsnooze
f69fedd1f2
Improve behaviour when GPS Rescue is initiated close to home (#12715)
* When initiated close to home, descend then land, 50 deg max

* restore divisions thanks -ffast-math

* fix typo in comment

* refactoring, improving flight behaviour

* modify comments, add a constraint

* refactor throttle D Multiplier and velocity iterm, improve comments

* move out if too close, boost IMU gain in fly home
2023-05-25 18:02:24 +10:00
SpencerGraffunder
aad197f791
Add GPS Lap Timer (#11856)
* Add gps lap timer

* change timing to GPS time instead of local time

* rebase and minor changes

* implement KarateBrot's suggestions

* follow ledvinap's suggestions, some OSD symbol changes

* move platform.h include to the top

Co-authored-by: Jan Post <Rm2k-Freak@web.de>

* fix osd elements not showing, remove useless block

* cleanup, move pg stuff to pg folder

* cleanup from review

* minor mods to gps lap timer update, add number of laps tracked

* rename time variable

* add const to timeMs

Co-authored-by: Jan Post <Rm2k-Freak@web.de>

* Update licenses, add is_sys_element macro

* update licenses

* round to nearest centisecond

Co-authored-by: Jan Post <Rm2k-Freak@web.de>

---------

Co-authored-by: Jan Post <Rm2k-Freak@web.de>
2023-05-25 02:31:22 +02:00
ctzsnooze
23a416b431
Thrust linear code optimisations (#12720)
remove conditions on thrust linear calculation
2023-05-24 21:36:00 +02:00
Míguel Ángel Mulero Martínez
f4e8b421c2
Remove assets attachment from PR comment (#12834) 2023-05-25 01:05:03 +10:00
Mark Haslinghuis
f13a73d3e0
Handle invalid baro pressure values (#12815)
Fix MS5611
2023-05-21 11:17:30 +02:00
Míguel Ángel Mulero Martínez
b9f6eacf70
Add cloud build instructions to Pull Request (#12817) 2023-05-20 17:52:24 +10:00
ASDosjani
7a39c8037f
Add NMEA Custom commands (#12591)
* Add NMEA Custom command

* Add delay

* Remove strdup

* more effective way by ledvinap

Update src/main/pg/gps.h

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>

required changes

Update src/main/io/gps.c

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

Update src/main/io/gps.c

Co-authored-by: Jan Post <Rm2k-Freak@web.de>

Update src/main/io/gps.c

Co-authored-by: Jan Post <Rm2k-Freak@web.de>

Update src/main/io/gps.c

Co-authored-by: Jan Post <Rm2k-Freak@web.de>

Update src/main/cli/settings.c

Co-authored-by: Jan Post <Rm2k-Freak@web.de>

Update src/main/pg/gps.h

Co-authored-by: Jan Post <Rm2k-Freak@web.de>

Update src/main/pg/gps.h

Co-authored-by: Jan Post <Rm2k-Freak@web.de>

fix namings

* Update src/main/io/gps.c

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>

* Update src/main/io/gps.c

Co-authored-by: Jan Post <Rm2k-Freak@web.de>

---------

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
Co-authored-by: Jan Post <Rm2k-Freak@web.de>
2023-05-19 13:01:02 +02:00
ctzsnooze
f841367928
GPS Rescue Bugfix to ensure IMU adaptation to GPS course over ground (#12789)
Restore previous IMU yaw heading behaviour when not in a rescue
2023-05-17 13:40:04 +02:00
Homer
1a9001f5cd
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.
2023-05-14 17:11:42 +02:00
Mark Haslinghuis
223c2b3f5b
Fix bidirectional dshot on F7 (#12796) 2023-05-12 18:56:52 +02:00
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