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

fix(telemetry-DSM): Fix for Flight Pack Monitor Sensor #3690

Merged
merged 1 commit into from
Jun 19, 2023

Conversation

frankiearzu
Copy link
Contributor

@frankiearzu frankiearzu commented Jun 18, 2023

Fix the Flight Pack sensor processing.

TESTED WITH THE REAL SENSOR up to 5000mAh packs
Sensor: Capacity Sensor SPMA9605

The main problem was that we expected the data to come in big-endian encoding, but in reality, the sensor send it in little-endian. This was causing the 1st byte to change much faster, and eventually move into the negative value (16 bit integer)

Added more validations to handle little-endian values, and recognize NO-DATA scenarios for little-endian.

Fixes #1649

Fix the Flight Pack sensor processing.

The main problem was that we expected the data to come in big-endian encoding, but in reality, the sensor send it in little-endian.   This was causing the 1st byte to change much faster, and eventually move into the negative value.

Added more validations to handle little-endian values, and recognize NO-DATA scenarios
@frankiearzu frankiearzu reopened this Jun 18, 2023
@pfeerick pfeerick added the not-our-bug Bug stemming from outside EdgeTX project label Jun 19, 2023
@pfeerick pfeerick added this to the 2.9 milestone Jun 19, 2023
@pfeerick pfeerick merged commit bdb78ba into EdgeTX:main Jun 19, 2023
@frankiearzu frankiearzu deleted the 2.9_DSM_FlightPack_Fix branch June 19, 2023 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-our-bug Bug stemming from outside EdgeTX project telemetry 📶
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Range of Spektrum Telemetry Battery Capacity Sensor
2 participants