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): process DSM LIPO Cells Monitor sensor correctly #4720

Merged
merged 4 commits into from
Mar 13, 2024

Conversation

frankiearzu
Copy link
Contributor

@frankiearzu frankiearzu commented Mar 11, 2024

Fixes #4715

Summary of changes:

Fix processing of message 0x3A:

  1. Create individual Cells Sensors (Cel1..Cel6)
  2. Create Grouped "Cels" sensor who contains all the Cells. This is compatible with FrSky, and can be used as the source to compute the Min/Max Cell.

image
image

1. Fix processing of message 0x3A
2. Fix Temperatures to have no decimals, otherwise they will not convert correctly between C/F.
@frankiearzu frankiearzu changed the title Fix for #4715, Process correctly Cells (0x3A) message fix(Telemetry) DSM - Process correctly LIPO Cells Monitor Sensor Mar 11, 2024
@pierrotm777
Copy link

Thanks you for your job :-)
Do i need to build a nightly firmware or can you build a firmware for a Tx16S please ?

@pfeerick
Copy link
Member

To access the automatic builds for a PR, first open up the PR page. Under the PR title, you should see a series of tabs (Comments, Commits, Checks, Files Changed). Click on the Checks tab. Then if you are after the radio firmware, click on the link on the left side mentioning firmware. If you want a Companion/Simulator build, pick the one that suits your operating system. Then, under the 'Artifacts' heading near the bottom of the page will be a link to the zip file containing either the firmware or companion package.

@pierrotm777
Copy link

Sorry, i don't understand what is the PR page (too french :-).
Do you have a link ?
Thanks

@pierrotm777
Copy link

OOps PULL REQUEST ?

@pfeerick
Copy link
Member

Sorry, yes, Pull Request. You are there/here already.

@pierrotm777
Copy link

Ok, i have found thanks

@frankiearzu
Copy link
Contributor Author

frankiearzu commented Mar 11, 2024

@pfeerick don't merge it yet.. I think by fixing #4723 will allow to have temperatures using decimal places.
Looking at the code, many Telemetry protocols have Temperatures with Prec1, so better for do a fix that works for all (frsky, and other), and not just for Spektrum. I can remove just the temperature override to Prec0 in this fix.

Removing the Temp to Prec0 conversion,  it will be handled properly by another PR.
Optimization on Traversing the sensor table. Since the table is sorted by the message i2cAddress,  once we are past that sensor, we can stop.  TODO: Future optimization: create an index to get to the start of the sensor in the table much faster.
@frankiearzu
Copy link
Contributor Author

frankiearzu commented Mar 12, 2024

@pfeerick DONE.. Checked in the fix for the temperature UNIT conversion in another PR. #4728

@pfeerick pfeerick changed the title fix(Telemetry) DSM - Process correctly LIPO Cells Monitor Sensor fix(telemetry): process DSM LIPO Cells Monitor sensor correctly Mar 13, 2024
@pfeerick pfeerick added this to the 2.10 milestone Mar 13, 2024
@pfeerick pfeerick merged commit 6ad7910 into EdgeTX:main Mar 13, 2024
43 checks passed
@frankiearzu frankiearzu deleted the tel-lipo-monitor branch March 13, 2024 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

For SPEKTRUM telemetry, the sensor with 6 lipo cell provides wrong values for the last 5 cell voltages
3 participants