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>
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>
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>
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>
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>
* 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
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.
* 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>
* 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
* 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>
* 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>
* 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>