Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding headtracker_max_angle and headtracker_yaw_reset_shimmy #4

Closed
wants to merge 22 commits into from

Conversation

limonspb
Copy link

  1. when headtracker_max_angle is set > 0, for example 45, the headtracker will report +/- 100% when angle is 45 degrees.
    So its just scaling the headtracker output to +/- headtracker_max_angle
  2. if headtracker_yaw_reset_shimmy set to OFF or zero, then head shimmy won't reset yaw (useful for headtracker as motion controller)

SteveCEvans and others added 22 commits April 28, 2024 09:31
Fix hard-coded TARGET_IO_PORT* defines.

This should be able to be overridden by targets.  e.g. ones that  use
octospi IO lines 4-7 instead of 0-3.
Firmware 4.5 Release date added
…etaflight#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 betaflight#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
* 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 <[email protected]>

* Update src/main/io/ledstrip.c

Co-authored-by: Petr Ledvina <[email protected]>

* Update src/main/io/ledstrip.c

Co-authored-by: Petr Ledvina <[email protected]>

* Update src/main/io/ledstrip.h

Co-authored-by: Petr Ledvina <[email protected]>

* Update src/main/io/ledstrip.c

Co-authored-by: Petr Ledvina <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: Mark Haslinghuis <[email protected]>
* Fix ICM20469

* Reorder defines for acc & gyro
* Remove canvas configuration in cli

* Add gating for OSD_CANVAS_SIZE_DEBUG
Copy link

Do you want to test this code? You can flash it directly from Betaflight Configurator:

  • Simply put #4 (this pull request number) in the Select commit field of the Configurator firmware flasher tab (you need to Enable expert mode, Show release candidates and Development).

WARNING: It may be unstable. Use only for testing!

@limonspb limonspb closed this May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants