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

18491 commits

Author SHA1 Message Date
Ivan Efimov
9332248742
Adding OSD quick menu (#12977)
* QUICK CMS menu

* Added RPM LIMIT to quick menu

* rpm_limiter csm step = 100

* Renamings + USE_OSD_QUICK_MENU define

* Small fixes

* Style fixes

* tests makefile fix

* Activate quick menu by default, if defined USE_OSD_QUICK_MENU

* Changed .c/.h license headers to a modern one
2023-07-26 08:54:02 +10:00
Dominic Clifton
2edc5fb7d5
Makefile - use -gddb2, not -gddb3 due to issues with GDB crashing. (#12971)
Makefile - use gddb2, not gddb3 due to issues with GDB crashing.

The cause seems to be the macro debugging information which when generated by the compiler, apparently incorrectly, causes GDB to use excessive amounts of CPU and crash.

Error:
"gdb/utils.c:717\
: internal-error: virtual memory exhausted: can't allocate 4064
bytes.\nA problem internal to GDB ha\
s been detected,\nfurther debugging may prove unreliable."

Reference:

* https://sourceware.org/bugzilla/show_bug.cgi?id=28219#c15
* https://github.com/microsoft/vscode-cpptools/issues/9219#issuecomment-1118034083

Note this crashing behavior is observed with `GCC > 9.3.1`, `9.3.1` itself is OK.
2023-07-26 08:53:10 +10:00
Mark Haslinghuis
293e14e8bd
Revert 12577 change for F4 (#12969) 2023-07-21 13:23:40 +10:00
Mark Haslinghuis
1485438c40
Add H725 target support (#12951)
* Add H725 target support

* H7 - Add more notes regarding VOS and cpu frequency

* Remove H723xG_TARGETS
2023-07-14 11:01:41 +10:00
Mark Haslinghuis
949181e084
Add support for IST8310 compass (#12917)
* Add support for IST8310 compass

* fix read

* Using states

* Fixes after review
2023-07-10 15:47:12 +02:00
Eike Ahmels
214946bc3f
AT32F435 camera control (#12913)
* [AT32] camera control

* remove comments

* change to mcu specific implementation

* fix includes
2023-07-10 15:54:20 +10:00
Steve Evans
be9652923a
Add dshot_telemetry_start_margin setting (#12912) 2023-07-10 15:53:18 +10:00
Eike Ahmels
acb52cba56
add uart 6 and 7 (#12928)
* add uart 6 and 7

* Update src/main/drivers/at32/serial_uart_at32f43x.c

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

* code formatting

---------

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
2023-07-10 15:51:52 +10:00
tbolin
90d09e2e5b
Add unfiltered gyro black box field (#12907)
* Add unfiltered gyro black box field

* Rename UFGYRO and GyroUf to gyroUnfilt
2023-07-07 09:37:32 +02:00
ctzsnooze
9186d05468
GPS rescue IMU, velocity iTerm and other fixes (#12900)
* GPS rescue update after merge of IMU fix

imuYawCog boost on error
initial turn radius adjustment
attitude debug changes
rescue velocity iterm fixes
earth referencing of yaw forced to on
sanity check failure time 30s

* vary IMU gain according to groundspeed

* Review suggestions implemented
2023-07-05 17:51:28 +02:00
Steve Evans
1333771140
Handle USART TX pulldown (#12929)
SA is always unidirectional
Only switch AT32 TX line to input when transmission is complete
2023-07-02 22:09:00 +02:00
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