The Watt hours used element was added per a feature request to give
another way of interpreting the battery usage. It was also added as a
post flight stat to show consumption similar to the mAh post flight
stat. This once again is just giving pilots another option that some may
find useful.
Fixed some review findings
Unified dshot average rpm calculations into one single function
Renamed calcEscRpm to erpmToRpm, and moved function to dshot.c
Removed unused esc_sensor.h header file from dshot.c
Removed esc_sensor.h header from modules that no longer needs it
Average RPM calculated by demmand only when rpm data is updated
Renamed rpm to averageRpm and fixed a bug
Update average rpm when telemetry data is received
Removed blank line
Fixed review findings
Fixed return values for erpmToRpm and getDshotAverageRpm so rpm value doesn't truncate
Restored osd_esc_rmp_alarm setting. This setting is used to set an alarm to notify when rpm goes down a specified threshold. Rpm can go over 109krpm (1s 26kv motors setup), but a low rpm alarm doesn't have to be set to a so high value so at this time [0-32767] seems an acceptable range
Rebased to master
Extended DSHOT telemetry
Fixed broken unit testing
Rebased to master
Extended DSHOT telemetry
Added DSHOT ESC fail to OSD warnings
Initial extended DSHOT implementation
DSHOT telemetry ranges readjusted
Added shot_telemetry_data to cli
Added DSHOT telemetry warnings
Added extended DSHOT telemetry temperature data to osd elements
Fixed DSHOT telemetry osd warnings
Make cli dshot telemetry types human readable
Fixed ESC temperature OSD element
Added extended dshot telemetry enable command to dshot command queue to enable it in tryArm function.
Fixed broken automated unit testing
Fixed text output for dshot_telemetry_data cli command
Decode extended telemetry only when it has been activated in the ESC
DSHOT extended telemetry is only enabled when an extended telemetry enable frame is being processed
Fixed broken automated unit testing
Update tail's dshot command in queue when running blocking commands, so extended dshot telemetry command responses can be associated to their corresponding extended dshot telemetry enable/disable command request
Added clariffication to dshot_get_telemetry_type_to_decode to explain mechanish used for processing DSHOT_CMD_EXTENDED_TELEMETRY_ENABLE response
Tabs cleanup
Added dshot motor stop fix when writting blocking commands
Added extended DSHOT telemetry to osd warnings
Fixed extended DSHOT telemetry in osd elements
Implemented msp extended dshot telemetry
Optimized osd warnings
Fixed code style
Added max temp to osd stats
Fixed automated unit testing
Fixed broken automated unit testing
Fixed missing extended dshot telemetry voltage and wrong current
Fixed unadverted change in gitignore file
Print esc number besides max esc tempetature in osd stats
issues and some other minor issues
ESC temperature is coded as an uint8 going from 0 to 255. Updated osd config esc_temp_alarm from int8_t to uint8_t to match esc temperature coding
issues and some other minor issues
Enable extended dshot telemetry when no esc sensors avaliable and dshot telemetry is enabled
Arranged dshot.h header and removed unnecessary headers from dshot.c
Updated dshot_telemetry_data cli command output
Fixed dshot_telemetry_data command
motor_output_unittest fixed
Fixed motor number printing in dshot_telemetry_data cli command
fixed motor_output_unittest
Merged dshot_telemetry_data into dshot_telemetry_info cli command
Fixed tabs
Fixed motor_output_unittest
Support extended DSHOT telemetry on DJI FPV
Fixed Compiling fails without USE_ESC_SENSOR and USE_DSHOT_TELEMETRY defines.
Fixed whencompiling without USE_ESC_SENSOR and USE_DSHOT_TELEMETRY
Reworked so code can be compiled with USE_ESC_SENSOR and USE_DSHOT_TELEMETRY separately
Enabling EDT the correct way
Removed unecessary conversions
Changed motorIndex datatype to uint8_t in dshot functions
single minimum GPS satellite setting
single required GPS satellite setting
CLI Baro vs GPS trust user interface
GPS trust refactoring
allow arming with GPS_FIX even if not enough sats
required sats must be present to arm
set required sat count to 8
add blackbox headers
Adds variations in GPS coordinate OSD element display:
1. Fractional degrees with 7 digits (default) - 000.0000000
2. Fractional degrees with 4 digits - 000.0000
3. Degrees, minutes, seconds - 000^00'00.0"E
4. Open Location Code (sometimed called Google Plus Code) - 23ABC4R8+M37
Uses Open Location Code library from:
https://github.com/google/open-location-code
Added support for `STATE(GPS_FIX_EVER)` to differentiate from having a fix now (`STATE(GPS_FIX)`) vs. ever having a fix.
Logic change to only display coordinates from the GPS module once a fix has been initially established. This prevents displaying interim coordinates supplied by the GPS while the fix is still being establised as these coordinates can be inaccurate by hundreds of miles. Once a fix is established initially then the coordinates will continue to be displayed even if the fix is lost or degrades in quality.
Add logic to "blink" the coordinates if the 3D fix is lost after initially being established. Alerts the user that the coordinate display may be inaccurate or no longer being updated. We want to keep the coordinates displayed to aid recovery if the user loses the fix (like crashing upside down).
Replace GPS defines `LAT` and `LON` used throughout the code with the enumeration:
```
typedef enum {
GPS_LATITUDE,
GPS_LONGITUDE
} gpsCoordinateType_e;
```
The Open Location Code option is bounded with `USE_GPS_PLUS_CODE` to allow it to be excluded if needed for targets with limited flash space. It currently fits for F411 but we may have to remove it in the future.
Updated the OSD element and stats rendering code to use this fuction to print floating point values of varying precisions.
Will make adding OSD element variants that provide different decimal precisions (like voltage, amperage, etc.) easy to implement since all that needs to change is the `decimalPlaces` passed to the function. As an example, see the `osdFormatAltitudeString()` function.
If at some later date a more capable `printf` package is inplemented, then the guts of the `osdPrintFloat()` function could just be simplified while leaving the abstraction in place.
Variant 1 (default): Altitude displays with one decimal place. No change in behavior.
Variant 2: Altitude displays as whole number (no decimal) so it will represent meters or feet depending on the units selected.
Provides a properly implemented way for MSP query type OSD implementations (like DJI) to display OSD warnings. Separates the warnings generation from the OSD task and shares common code to make the text available for the OSD and/or via MSP. Eliminates the need to implement hacks and workarounds like using the `CRAFT_NAME` field to display warnings. Since the warnings logic is now separate, the OSD task does not need to be running unlike other hacks.
Adds the `MSP2_GET_OSD_WARNINGS` message formatted as follows:
```
byte description
0 Display attributes including blink (see displayPortAttr_e in drivers/display.h)
1 Length of warning text
2-n Warning text characters
```
This mod adds an arrow symbol showing the location of the up/down on the OSD. The arrow direction points in the direction of up or down.
Update osd_elements.c
Making the Up/Down OSD reference its own element
Removing the Up/Down reference from the artificial horizon and making a specific element for this feature. Activation via CLI (for now)
Updates to Up/Down refernce OSD element
Changed the up/down reference so that it is its own separarte element. The position is absolute on the screen and immutable by the user for consistent operation. Updated settings to include CLI option for turning the feature on and off.
Update cms_menu_osd.c
Updated file to add Up/Down reference selection from OSD menu
Updates to simplify/correct Up/Down OSD element
Simplified/corrected logic and removed arcsine function. OSD up/down reference is now positionable by the user in the configurator.
Tweaks and codestyle updates
Feedback from Michael Keller
Updates to Up/Down OSD indicator
Created a bounding box of +/- 25 degrees for indicator
Coding style correction
minor correction to match BF coding style
Enable Up/Down reference in OSD
This mod adds an arrow symbol showing the location of the up/down on the OSD. The arrow direction points in the direction of up or down.
Update osd_elements.c
Making the Up/Down OSD reference its own element
Removing the Up/Down reference from the artificial horizon and making a specific element for this feature. Activation via CLI (for now)
Updates to Up/Down refernce OSD element
Changed the up/down reference so that it is its own separarte element. The position is absolute on the screen and immutable by the user for consistent operation. Updated settings to include CLI option for turning the feature on and off.
Updates to simplify/correct Up/Down OSD element
Simplified/corrected logic and removed arcsine function. OSD up/down reference is now positionable by the user in the configurator.
Tweaks and codestyle updates
Feedback from Michael Keller
Enable Up/Down reference for artificial horizon in OSD
This mod adds an arrow symbol showing the location of the up/down on the OSD. The arrow direction points in the direction of up or down.
Update osd_elements.c
Making the Up/Down OSD reference its own element
Removing the Up/Down reference from the artificial horizon and making a specific element for this feature. Activation via CLI (for now)
Updates to Up/Down refernce OSD element
Changed the up/down reference so that it is its own separarte element. The position is absolute on the screen and immutable by the user for consistent operation. Updated settings to include CLI option for turning the feature on and off.
Updates to simplify/correct Up/Down OSD element
Simplified/corrected logic and removed arcsine function. OSD up/down reference is now positionable by the user in the configurator.
Tweaks and codestyle updates
Feedback from Michael Keller
Coding style correction
minor correction to match BF coding style
Enable Up/Down reference for artificial horizon in OSD
This mod adds an arrow symbol showing the location of the up/down on the OSD. The arrow direction points in the direction of up or down.
Update osd_elements.c
Making the Up/Down OSD reference its own element
Removing the Up/Down reference from the artificial horizon and making a specific element for this feature. Activation via CLI (for now)
Updates to Up/Down refernce OSD element
Changed the up/down reference so that it is its own separarte element. The position is absolute on the screen and immutable by the user for consistent operation. Updated settings to include CLI option for turning the feature on and off.
Updates to simplify/correct Up/Down OSD element
Simplified/corrected logic and removed arcsine function. OSD up/down reference is now positionable by the user in the configurator.
Tweaks and codestyle updates
Feedback from Michael Keller
Corrections to unit tests
Corrected unit tests link failing due to not being able to find rMat[3][3]
Extends the OSD element position setting to include a 2 bit selector for alternate representations of the element. So up to 4 variants of an element can be supported. Meant to be used instead of adding new elements when the request is a mutually exclusive variant of an existing element. If there are no variants of an element then the logic falls back to "type 1" (`OSD_ELEMENT_TYPE_1`) which is the only representation of the element.
As an example, in this PR the "Battery usage" element has been extended to 4 types:
1. The original capacity remaining graphical bar (shrinks as battery is used) - this is the default.
2. Capacity used graphical bar (grows as battery is used).
3. Remaining capacity numerical percentage (goes down as battery is used).
4. Capacity used numerical percentage (goes up as battery is used).
When extending an element it is not necessary to support all 4 types and the element rendering code should default to the original type 1 version for unsupported types.
Will require Configurator support. Since the 2 high bits of the `uint16` were previously unused the setting will default to the "type 1" original variant in all cases where an incompatible Configurator is used.
Changes the blink logic to be OSD task loop based instead of time based.
The previous logic used a 200ms time interval for the blinking which didn't align well with the default 12hz OSD update frequency resulting in the logic periodically missing intervals resulting in an inconsistent blinking.
As the revised logic is now tied to the OSD task iterations the blinking will be consistent. However due to the timing the blink will be slightly faster - 167ms (6hz) vs. the previous 200ms (5hz) intervals. Technically the blinking was 6hz before but stuttered every 5th blink.
Since the OSD task rate can be changed from the default 60hz, the logic will fall back to the time-based implementation for non-default task rates.
Issue #10336
Fix Typo in Ghost driver
Update src/main/osd/osd.c
Co-authored-by: haslinghuis <mark@numloq.nl>
Update src/main/rx/ghst.c
Co-authored-by: haslinghuis <mark@numloq.nl>
Update src/main/rx/rx.c
Co-authored-by: haslinghuis <mark@numloq.nl>
Future-proof GHST driver, while adding RSSI and LQ support
Ensure that future packet types which contain 4 channels of data, plus auxiliary data, are correctly handled by BF releases that predate them.
Implement changes suggested by reviewers
Cosmetics
When motor is stopped and not spinning properly, show letter S instead
of expected esc output.
This is useful after crash recovery or during turtle mode.
make osdRFmode = 0 default
changes as requested
fixed formatting and unittests
remove 3.41 scaling on crsf LQ and simply osd drawing function
Update rx.c
changed loop to only go to 99 instead of 300