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

18780 commits

Author SHA1 Message Date
Dominic Clifton
6ba117d69e
Improve CI target visibility (#12930)
* Add SPRacingH7RF to CI targets.

* It uses memory-mapped flash.
* It uses OctoSPI.
* It uses EXST.

* Add SPRACINGH7EXTREME to CI targets.

* It uses QuadSPI.
* It uses EXST.
2023-06-30 10:02:25 +10:00
Eike Ahmels
0503311498
Fix Serial USB COM port (#12911) 2023-06-23 02:51:56 +10:00
ASDosjani
2eb378c66d
[AT32] Change evaluation order (#12903)
Change evaluation order
2023-06-22 16:05:03 +02:00
Eike Ahmels
3f80b0c8bf
Implement DShot bit bang for AT32 (#12577)
* implement dshot bitbang for AT32

* fix dshot bitbang bidirectional for AT32

* AT32 target features

* implement latest improvements from steve to at32

* generalize AT32 target.h

* Tri-state USART TX output if load due to powered down peripheral is detected

* enable LED STRIP for AT32

* at bitbang timer adjustments

* revert makefile changes

* revert target generalization

* Update src/main/drivers/at32/platform_mcu.h

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

---------

Co-authored-by: Steve Evans <Steve@SCEvans.com>
Co-authored-by: J Blackman <blckmn@users.noreply.github.com>
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
2023-06-22 07:31:16 +10:00
ASDosjani
c243e83de2
Platform target evaluation fix (#12904) 2023-06-21 11:09:38 +02:00
tbolin
96c788c87f
Add (e)RPM field to blackbox logs (#12823)
* Add RPM black box field

* Fix settings table spacing

* Move RPM field to end of FlightLogFieldSelect enum

* Fix various RPM logging related bugs

- change eRPM I frame encoding to UNSIGNED_VB (was SIGNED_VB)
- change eRPM P frame prediction to PREVIOUS (was AVERAGE_2)
- change eRPM log field name to 'eRPM(/100)' (was 'RPM')
- rename rpm field in blackboxMainState_s to erpm
- minor formatting fixes to BlackBoxMainFields spacing and some if clauses

* Remove superfluous parentheses in blackbox.c
2023-06-20 01:41:39 +02:00
Petr Ledvina
8308540932
Refactor imuCalcKpGain (#12859)
Rewrite of old code, shall be functionally identical. Timer wraparound
bugs fixed.
Both original and new version do not match function comments, another
change is necessary.

Co-authored-by: Petr Ledvina <ledvinap@hp124.ekotip.cz>
2023-06-20 01:03:06 +02:00
Mark Haslinghuis
48be6f26a9
Fix rcSmoothing warning OSD (#12898) 2023-06-19 10:59:15 +02:00
Petr Ledvina
5eaab0226d
IMU - increase gain on large Course over ground error (#12792)
* IMU - increase gain on large Course over ground error
* Fix Cog calculation in IMU

Old code did align CoG antiparallel to Yaw. Cross product stays the
same, but dot product is inverted.

@iNav - this is probably reason for magic numbers in iNav IMU
rewrite (especially wind compensation)

* Update gtest

Copy of debian/stable libgtest-dev

* Add unittest for IMU CoG

Work in progress

* IMU - convert compass to new alignment calculation

* IMU Unittests

- new wrapped EXPECT_NEAR_DEG / EXPECT_NEAR_RAD
- magnetometer testing

* IMU - CoG evaluation based on thrust vector

---------

Co-authored-by: Petr Ledvina <ledvinap@hp124.ekotip.cz>
2023-06-19 09:30:45 +10:00
Andrey Mironov
a98364fa55
Separate resources for SOFTSERIAL_TX & SOFTSERIAL_RX (#11786)
* Addressed review comments

* Unify USE_SOFTSERIAL

---------

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
2023-06-18 02:25:01 +02:00
Mark Haslinghuis
d1eb214332
Fix rcSmoothing warning (#12893) 2023-06-18 01:48:58 +02:00
Schuwi
c1694c2b60
Fix g force calculation (#12892) 2023-06-18 08:45:05 +10:00
Eike Ahmels
ac84115f8d
fix led strip for h7 (#12890)
* fix led strip for h7

* account for cloud build custom defines

* remove unused code
2023-06-17 12:36:10 +02:00
J Blackman
70b9c7fb66
GPIO alternate function initialisation removal for HAL. (#12888)
GPIO alternate function removal for HAL.

The all timer initialisation was actually not required as the initialisation is located where needed (previously required for STD PERIPH / AT32). The previous for loop excluded the actual setup in any case as all the full timer hardware items where TIM_USE_ANY.
2023-06-16 17:53:21 +02:00
Andrey Mironov
b8855d3a71
G4 LPUART rework (#11821)
* Extracted SOTSERIAL_TX & RX resources

* Fixed LPUART1 on G4
2023-06-15 17:18:20 +02:00
Dmytro
7b39d3d296
Rename make folder to get rid of build error. (#12880)
When trying to build firmware with current directory in PATH environment
it scans for make command and generates "Permission denied" error in
case if current directory in PATH precedes /usr/bin/ directory.In my
case it was caused by incorrect pyenv init script.

Rename make folder to avoid errors like this.
2023-06-14 21:48:55 +02:00
Mark Haslinghuis
eb4d95e039
[CONFIG] Add NUCLEOF446 Development Board (#12678)
Add NUCLEOF446 Development Board
2023-06-14 13:42:33 +10:00
Mark Haslinghuis
10aab0236a
Fix MAG redefines (#12882) 2023-06-14 13:36:53 +10:00
Steve Evans
2af7337204
Call updateInit() before writing motor command data (#12865) 2023-06-14 00:09:51 +02:00
Dominic Clifton
646de8c57d
Fix GPIO AF settings being overridden by timerInit(). (#12886) 2023-06-13 19:08:56 +10:00
Mark Haslinghuis
7d1007ea03
Enables retrieval of the RELEASE_NAME using MSP2 (#12878)
Retrieve releasename
2023-06-11 02:28:52 +02:00
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