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

18474 commits

Author SHA1 Message Date
Mark Haslinghuis
ad93ec30f1
[4.5.2] Fixes #13934: Fix motor(PWM protocol) spin while fc reset. (#13937) (#13958)
Fixes #13934: Fix motor(PWM protocol) spin while fc reset. (#13937)

* Fix motor(PWM protocol) spin while fc reset.

* move delay out to motorShutdown

Co-authored-by: ke deng <degkxp@hotmail.com>
2024-10-09 08:41:52 +11:00
Mark Haslinghuis
f7697e22fe
[4.5.2] Make jeti telemetry default (#13952)
Make telemetry default for jeti (#13951)
2024-10-04 17:01:11 +02:00
Mark Haslinghuis
dd3ca8336d
[4.5.2] Fix build when using SRXL telemetry (#13947) (#13950) 2024-10-04 06:31:14 +10:00
Mark Haslinghuis
3860b2062d
[4.5.2] Don't consider a prior I2C NACK to indicate the bus to be busy (#13917) (#13918)
Don't consider a prior I2C NACK to indicate the bus to be busy (#13917)

Co-authored-by: Steve Evans <SteveCEvans@users.noreply.github.com>
2024-09-24 10:36:50 +02:00
Mark Haslinghuis
d73d1a0757
[4.5.2] Fix kiss passthrough (#13922)
Fixes #13220: Fix kiss esc passthrough, Fix castle (escprog cc) command. (#13911)

* Fix kiss esc passthrough, Fix castle (escprog cc) command.

* Update src/main/drivers/serial_escserial.c

Thank you.



---------

Co-authored-by: Kiss Ultra <86871477+KissUltra@users.noreply.github.com>
Co-authored-by: Alex Fedorov <fedor@anuta.org>
2024-09-24 10:33:19 +02:00
Mark Haslinghuis
cfdcf57f4c
[4.5.2] OSD background rendering (#13897) (#13900)
OSD background rendering (#13897)

* Ensure display severity attribute is set to defaults for background items

* MAX7456 doesn't have a background layer

Co-authored-by: Steve Evans <SteveCEvans@users.noreply.github.com>
2024-09-13 23:38:03 +02:00
Mark Haslinghuis
4d892b79e2
[4.5.2] Fix sbufReadData not advancing src pointer (#13873)
Fix sbufReadData not advancing src pointer
2024-09-04 08:32:37 +02:00
Mark Haslinghuis
07da4999c7
[4.5.2] Fix angle mode rate change (#13864) 2024-08-31 06:51:34 +10:00
nerdCopter
77141cfeb9
[4.5.2] version bump (#13865) 2024-08-31 06:33:18 +10:00
Mark Haslinghuis
aa81b811c4
[4.5.2] Split OSD element rendering into draw and display states (#13813) (#13839)
Split OSD element rendering into draw and display states (#13813)

Co-authored-by: Steve Evans <SteveCEvans@users.noreply.github.com>
2024-08-30 16:45:31 +02:00
Mark Haslinghuis
4a67af735d
[4.5.2] FIX: Modify STM32F405 UID Address for MSC Enumeration (#13769) (#13827)
Modify STM32F405 UID Address for MSC Enumeration (#13769)

Update usbd_msc_desc.c

Co-authored-by: ainosukii <95574594+ainosukii@users.noreply.github.com>
2024-08-19 08:27:42 +10:00
Mark Haslinghuis
63b0aa18d5
[4.5.2] FIX: telemetry for Spektrum/SRXL (#13814) (#13820)
Fix telemetry for Spektrum/SRXL (#13814)

* Fix telemetry for Spektrum/SRXL

* Update after ledvinap review

* Update comments
2024-08-16 07:13:40 +10:00
Steve Evans
77d01ba3b7
[4.5.1] Read gyro data from correct lsm6dsv16x registers (#13787) 2024-07-27 01:50:05 +09:00
Mark Haslinghuis
073b70f7dc
[4.5.1] fix at32 serial bidir pp od init and smart audio (#13764) (#13771)
fix at32 serial bidir pp od init and smart audio (#13764)

include fix for F4 and G4 as well

Co-authored-by: Benedikt Kleiner <b.kleiner@str8labs.com>
Co-authored-by: Eike Ahmels <ea@weslink.de>
2024-07-17 08:34:23 +02:00
Mark Haslinghuis
72101c4f1c
[4.5.1] AT32: Add PC6 and PC7 I2C pins (#13761) 2024-07-10 10:48:43 +10:00
Mark Haslinghuis
ec8c59b49b
[4.5.1] Fixes #13664 - Smartaudio don't work with Softserial (#13715) (#13734) 2024-06-29 07:51:51 +10:00
Mark Haslinghuis
d6a26102a4
[4.5.1] Update to LSM6DSV16X gyro driver (#13724) (#13731) 2024-06-28 07:06:01 +10:00
J Blackman
6cf13cdb4a
[4.5.1] FIX: make: Circular configs <- configs dependency dropped. (#13695) (#13726)
FIX: make: Circular configs <- configs dependency dropped. (#13695)

(cherry picked from commit 660018b1de)
2024-06-27 06:59:48 +10:00
Mark Haslinghuis
cffe79e387
[4.5.1] Set next state expected time on per element basis (#13706) (#13713)
Set next state expected time on per element basis (#13706)

* Set next state expected time on per element basis

* Rename osdNextElement to be clearer

Co-authored-by: Steve Evans <SteveCEvans@users.noreply.github.com>
2024-06-25 07:51:08 +10:00
Mark Haslinghuis
591c64ddc1
[4.5.1] Fix GPS Rescue using MSP is not getting Velocity to Home (#13639) (#13644) 2024-05-18 09:19:25 +10:00
Ivan Efimov
01fb78aa63
[4.5.1] Remove superfluous checks of useDshotTelemetry (#13634) 2024-05-14 06:40:41 +10:00
Mark Haslinghuis
0f001ad245
[4.5.1] battery - fix BATTERY_NOT_PRESENT detection, detection logic change (#13623)
battery - fix BATTERY_NOT_PRESENT detection, detection logic change (#13599)

* battery - fix BATTERY_NOT_PRESENT detection, detection logic change

Detection logic is refactored - battery voltage delta is tested each
50ms, voltage is considered stable when difference of last 10 samples
is smaller than 100mV
This makes stable threshold more forgiving than #13350 (time for
comparison is 50 instead of 500ms).

* battery - improve stable voltage detection

- voltageStablePrevFiltered every time delta is exceeded
- voltage within range is ANDed over 100ms periods
- voltage is stable if it was within range for 10 out of 11 periods
  - slowly changing voltage will update threshold, but voltage will be
    considered stable
  - 1 update/s (100mV/s) is tolerated

* battery - fuix typos, improve comments

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
2024-05-10 13:24:36 +10:00
Dominic Clifton
0f7d05fec1
Fix hard-coded TARGET_IO_PORT* defines. (#13605)
This should be able to be overridden by targets.  e.g. ones that  use
octospi IO lines 4-7 instead of 0-3.
2024-04-30 01:33:16 +02:00
Mark Haslinghuis
d7fe372732
Bump patch level to 4.5.1 (#13600) 2024-04-30 01:28:20 +02:00
Mark Haslinghuis
c155f5830d
Update EEPROM version for 4.5 (#13498) 2024-04-28 11:51:47 +10:00
Steve Evans
565de1b68b
Use the cached value of useDshotTelemetry to ensure consistent runtime use if dshot_bidir is changed (#13589) 2024-04-28 09:31:50 +10:00
Mark Haslinghuis
54377940e0
Fix W25N01G lockup when using QUAD/OCTO SPI (#13584)
* Fix W25N01G lockup when using QUAD/OCTO SPI

* Move clock speed setting to configure
2024-04-25 23:41:54 +02:00
BloodSakura3774
5dae5f85b3
Sync usbd_product_string behavior (#13529)
* Update target.h
2024-04-24 08:06:38 +10:00
Mark Haslinghuis
92287b870d
Fix smartport over softserial using override (#13540)
* Fix smartport over softserial

* Constrain baudrateIndex does not work

* Reapply 57600 for SmartPort

* Use custom define for baudrate override

* Return when baudrate requested is above set limit of softserial

* Thanks ledvinap

* Fix macro name

* Cloud Build API does not allow define size > 32
2024-04-23 21:04:52 +02:00
Dominic Clifton
8d1d8872d6
Remove functionality to enter flash bootloader by sending 'F' on a UART configued for MSP. (#13572)
Remove functionality to enter flash bootloader by sending 'F' on a UART
configured for MSP.

* The proper way to reboot to the boot loader is by sending an
MSP_REBOOT command.
2024-04-23 11:53:53 +02:00
Petr Ledvina
7bf3928f91
RX - minor optimizations/minor cleanup (#13493)
* RX - minor optimizations/minor cleanup

- reuse millis() in rxInit
- rcData[] is float
- cleanup some float math
- fix GET_FRAME_ERR_LPF_FREQUENCY macro argument

* Update src/main/pg/rx.h

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

---------

Co-authored-by: Petr Ledvina <ledvinap@hp124.ekotip.cz>
Co-authored-by: Jan Post <Rm2k-Freak@web.de>
2024-04-23 11:17:34 +02:00
Dominic Clifton
790fabcfbc
Fix inability to use the CLI resource command to configure LPUART_RX. (#13568)
* See https://github.com/betaflight/betaflight/issues/13567#issuecomment-2068693404
* See https://github.com/betaflight/betaflight/pull/13306#discussion_r1502901863
2024-04-23 02:04:03 +02:00
Mark Haslinghuis
e756c92f87
Use clang 15 as default (#13561) 2024-04-23 08:28:04 +10:00
Steve Evans
407ca40cbc
Fix pointer alignment to 8 bytes for MacOS unit tests (#13564) 2024-04-23 08:26:59 +10:00
Steve Evans
e0c0b64a4b
Nonblocking w25n01g code tidy up (#13562)
* In case of BUS_ABORT still process and linked segments

* Tidy up segments

* Set SPI clock speed for w25n01g
2024-04-22 23:14:20 +02:00
Petr Ledvina
d447d795f4
Improve unittest build system (#13554)
* unittest - fix duplicate symbols in unittests

Some symbols were declared again
With clang -fcommon, this resulted in allocatin in common segment and
prevented error.
(tentative definitions in C standard).
-fno-common (now default in clang https://reviews.llvm.org/D75056)
causes compilation errors.

Declarations are now marked extern.

* unittest - fix scheduler array size for unittest

Unittest needs extra space for canary

* unittest - fix missing include (needed for clang-16)

* unittest - remove unused varibles

-Werror in clang 15+

* unittest - increase max supported version to clang-16

* unittest - conditionaly disable useless output in unittests

* unittest - C++11 version of STATIC_ASSERT

* unittest - fix initializers for g++

- Change order of initializers to match order in struct
- make valueTable initializion consistent (necessary for C++)
- adapt controlRateConfig

* unittest - adapt scheduler_unitest for g++

scheduler_stubs.c is necessary to initialize task_attributes

* unittest - fix ledstrip unittest

only part of config was zeroed

* unittest - fix g++ warnings

- memcpy when length is known and \0 is not copied
- isError is local stub, no extern
- serialReadStub - don't memcpy into object, use initializer

* cli - cleanup cliGetSettingIndex

- compare only passed bytes (old version may read data after
name)
- input string is const

* unittest - fix ld warning from PG sections

move pg data sections after .rodata. Sections were marked as writable
due to relocation (!?). That marked .text output section
(containing .pg_data) as writable too and linker correctly complained
that executable section is writable.

* unittest - cleanup

* unittest - adapt after code cleanup, add gcc

- remove clang flags that are not necessary now (tested on clang-11
and clang-16)
- add support for gcc ( make test CC=gcc CXX=g++ )
- add suport for different optimization level (detects some code
problems) : make test OPTIMIZE=-O2
- fallback to clang on Linux too

* fixup! unittest - conditionaly disable useless output in unittests
2024-04-22 22:43:24 +02:00
Mark Haslinghuis
d20d42dd48
Fix index and ability to configure LPUART_RX due to typo (#13565)
* Fix typo

* Fixes per review
2024-04-22 21:04:31 +02:00
Jan Post
951ba1d42f
Fix debug mode DEBUG_ATTITUDE (#13570)
Fix channel 0
2024-04-22 18:53:11 +02:00
Steve Evans
f4d6a2ce43
Make w25n01g FLASH driver non-blocking for SPI (#13555) 2024-04-21 09:42:33 -05:00
Mark Haslinghuis
30415a35aa
Fix setting pid denom (#13535)
* Fix setting pid denom

* Thanks ledvinap
2024-04-21 11:58:49 +02:00
Petr Ledvina
4ae1a672b4
Fix clang unitests (#13551) 2024-04-21 16:51:23 +10:00
Petr Ledvina
1da9515427
STM32H725 - fix USE_SOFTSERIAL (#13546) 2024-04-21 16:50:16 +10:00
Petr Ledvina
9a7c225643
hmc5883l - fix wrong register value (#13537) 2024-04-21 16:49:14 +10:00
Eike Ahmels
6e62cdf067
set default of spec prearm screen to false if race pro not defined (#13547)
* set default of spec prearm screen to false if race pro not defined

* Simple variant - thanks Ledvinap

---------

Co-authored-by: Eike Ahmels <ea@weslink.de>
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
2024-04-20 23:19:45 +02:00
Petr Ledvina
76178a232f
I2C - unify i2cUnstick implementation, improve unstick a bit (#13541)
* I2C - unify i2cUnstick implemntation, improve unstick a bit

Three copies were spread in I2C implementations.

- i2cUnstick is a bit more carefull about clock stretching
- bus status is returned (return true when bus in idle state)

* fixup! I2C - unify i2cUnstick implemntation, improve unstick a bit

* fixup! I2C - unify i2cUnstick implemntation, improve unstick a bit

---------

Co-authored-by: Petr Ledvina <ledvinap@hp124.ekotip.cz>
2024-04-20 17:07:53 +02:00
David Pinho
723cfe0da7
make mpuIntExtiHandler() static (#13520) (#13549)
Function was made public in e126f1 for SPI case but seems unused outside the
module. Make it static for all preprocessor cases and remove declaration.
2024-04-20 15:22:30 +02:00
Eike Ahmels
2821cdab3a
new flash added: py25q128ha (#13516) 2024-04-19 06:38:51 +10:00
Petr Ledvina
71776a852b
Barometer - remove unnecessary static variables (#13496)
Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
2024-04-17 15:36:58 +02:00
J Blackman
7c8a55258d
Fix for ITCM overflow for F722 (#13521)
* Fix for ITCM overflow for F722

* Better comments in target.h
2024-04-11 20:43:27 +02:00
Steve Evans
7073b0e351
Baro and Mag driver check for I2C bus being busy (#13509)
* Baro and Mag driver check for I2C bus being busy

* Update src/main/drivers/bus_i2c_busdev.c

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

---------

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
2024-04-10 01:53:33 +02:00