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

14581 commits

Author SHA1 Message Date
Ivan Efimov
9bbe2836a4
Fix: disable sag compensation if RPM limit is active (#12918) 2023-08-08 08:51:53 +10:00
Mark Haslinghuis
33db707939
Revert 12512 (#12956) 2023-08-08 08:51:22 +10:00
Mark Haslinghuis
bcc7c3fe03
Rename default configuration macro's for vbat divider and multiplier (#12987) 2023-08-08 08:50:48 +10:00
Dominic Clifton
199c0ec99d
Fix escserial for HAL targets. (#12992)
* Fix escserial for HAL targets.

* Remove the code disabling ESCSERIAL for F7.

* Timer/StdPeriph - Add an implementation of 'timerReconfigureTimebase'.

Simply calls the `configTimeBase`, seemed cleaner than adding #ifdef USE_HAL_DRIVER everywhere instead.
2023-08-08 08:49:48 +10:00
Mark Haslinghuis
0eac4df5a4
Remove sdcard include header from usb_io (#13007) 2023-08-07 12:32:23 +02:00
Steve Evans
4831683155
Remove cs lock device (#12999)
Remove csLockDevice as SD card cannot share an SPI bus
2023-08-07 12:30:06 +02:00
Ivan Efimov
dfef3bfb0e
Added throttle flight statistics (#12978)
* Added throttle flight statistics

* Changed rc_stats.c/h license header to a modern one

* rc_stats.c Style fix
2023-08-06 17:32:57 +02:00
Steve Evans
fb9587b2ec
Use coloured fonts if supported (#13005) 2023-08-06 10:06:50 +02:00
Steve Evans
5d29a0be06
Fix MSP_DISPLAYPORT_UART assignment (#13000) 2023-08-02 16:16:58 +02:00
Mark Haslinghuis
438e96c1f0
Rename flight mode (#12983)
* Rename flight mode

* Remove GND mode
2023-08-01 11:24:32 +02:00
J Blackman
d5d3ee88be
Removing STM specific defines from common_pre, and other cleanups (#12982)
Removing STM specific defines from common_pre, and other cleanup
2023-07-27 11:34:28 +02:00
Mark Haslinghuis
0d96c7ec77
Add default port settings for serial port functions (#12986)
* Add default port settings for MSP and ESC_SENSOR

* Add more serial port functions

* Add missing FUNCTION_MSP_DISPLAYPORT
2023-07-26 08:54:26 +10:00
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
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
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
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
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