* CLEANUP: Move flash drivers to their own directory
* Missed flash_w25q128fv.h.
* Directories in #include, and specifying all source files explicitly.
* Revert RX driver src file implicit declaration
* Allow TPA_LOW to be negative (for wings)
* Fix minimax type
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
* Range -128 to 127
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
* Proper limits for TPA
Co-authored-by: Jan Post <Rm2k-Freak@web.de>
* separate minmaxes for wing/without wing for TPA_LOW
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
* Separate define for TPA_LOW_RATE_MIN
---------
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
Co-authored-by: Jan Post <Rm2k-Freak@web.de>
* TPA delay in ms (for wings)
* Added comments for time constant
* ledvinap's suggestions
* tpaFactor local variable (based on ledvinap's suggestions)
* pt1FilterGainFromDelay with inlined calculations for cutoff (based on ledvinap's suggestions)
* Karatebrot extra review
* Pump PG for pidConfig_t
* Fixes based on review
* Moved tpaLpf to the end of pidRuntime_t
* Add support for W25N02K 2Gbit/256Mbyte FLASH
* Remove duplicate defintion check
* Rename W25N01G_BB_*_BLOCK macros
* Remove debug
* Create unified driver for W25N01G and W25N02K devices
* Put device parameters in a table
* Add W25N01GV to stacked die driver
* Do not enable features by default
* Enable OSD by default if included
* Enable OSD by default if included 2
* Fixes per review blckmn
* Add gate
* Only enable defined features
* No need for DEFAULT_FEATURES predefine
* No need for gating as we use featuresSupportedByBuild
* Fixes per review from ledvinap
* Features - refactor featureNames[]
Use designated initializers for used features. NULL values are stored
in gaps.
Use ARRAYLEN() for featureNames iteration
Use `unsigned` for bitmasks
* Features - add featuresSupportedByBuild
bitmask of features that are supported in current build
configuration. Copied from init.c sanitization
* Features - simplify feature sanitization code
featuresSupportedByBuild makes things much easier
* Features - improve cli feature handling
- refuse all features that are not compiled in
- AlreadyDisabled/AlreadyEnabled info
- refuse operation if multiple features match
* fixup! Features - improve cli feature handling
* Features - print available and not supported features separately
* Update src/main/cli/cli.c
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
* features - print full state without command
---------
Co-authored-by: Petr Ledvina <ledvinap@hp124.ekotip.cz>
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
* Beeper - improve/fix beeper sequencing
- beeperSequenceAdvance is used to advance beeperPos
- sequences starting with 0 (delay first) are handled correctly
- 'empty' beeper states are supressed
- leds do blink beeper sequence, even when beeper is silenced
* Beeper - refactor beep_multiBeeps
- simpler length definition
- helpper function to simplify beep generation
* Beeper - refactor beeperTable
Refuse modes where beeperTableEntry->sequence is NULL
Rest of code is refactored without functional changes
* Beeper - improve micros() overflow handling + minor refactoring
- beeperNextToggleTime==0 when not enabled
- lastDshotBeaconCommandTimeUs is updated during DSHOT_BEACON_GUARD_DELAY_US phase
- DSHOT_BEACON_ALLOWED_MODES instead of explicit tests
* Beeper - minor refactor
- improve comments
- add STATIC_ASSERT
- reformat some code
- move #ifdef to better follow semantic structure
- return unsigned from BEEPER_GET_FLAG
* fixup! Beeper - minor refactor
---------
Co-authored-by: Petr Ledvina <ledvinap@hp124.ekotip.cz>
Update gps.c
Added calculateNavInterval() function call into MSP GPS logic. Needed to update gpsSol.navIntervalMs so velocity to home can get calculated.
* Add LED functions: Battery Bar, GPS Bar
Battery Bar:
Indicates the battery percentage with a loading bar style
GPS Bar:
Indicates the amount of locked GPS satellites with a loading bar style
* LED altitude function
Adds a new function: LED altitude.
Sets the LED color based on the altitude, measured from the initialized position.
* set led color to background if value decreases
Even if the gps satellite count decreases at a later point in time, the LEDs update correctly now.
It is the same for the battery level function.
LEDs color changes more strongly now when based on altitude.
* Added proper ifdefs for GPS and Barometer
* fixed unittest and use estimate altitute
- fixed unittest
- cleaner indentation
- the altitude function now uses the estimate function instead of the raw value (gps+barometer)
* counters in struct, gps bar color gradient
- Counters for the led bar are now handled in a structure.
- Moved the led bar code to a seperate function that is only called when the led config changes.
- improved usefulness of the gps led bar with less than 4 leds installed by adding a color gradient.
* Update src/main/io/ledstrip.c
Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
* Update src/main/io/ledstrip.c
Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
* Update src/main/io/ledstrip.c
Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
* Update src/main/io/ledstrip.h
Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
* Update src/main/io/ledstrip.c
Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
* one min led for very low battery, use failsafe sats to interpolate
- at least one led is lit up for the battery/gps bar at all time (to show color gradient, also making the function more useful when only applying it to 1 led).
- gps bar now takes the failsafe min sats (or default 8) to interpolate between red and green.
- rewrote the led codes to be less fragile
- some structural changes that also adress comments on the pull request
* fix code if no gps rescue is used
fixes code if no gps rescue is used.
sets the default min sats to 8.
* Update src/main/io/ledstrip.c
Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
* Fixes per review ledvinap
* Fixes per review Ledvinap 2
* Update src/main/io/ledstrip.c
* Update src/main/io/ledstrip.c
---------
Co-authored-by: jonas-becker <jonas@Thinkpad>
Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
* 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