Skip to content

Level calculation incorrect for #28

Description

@Holgi-1726

The result of the level calculation is always 0 cm.
https://github.com/dragino/dragino-end-node-decoder/blame/63bc3645ad4eb61e407cd9502d759a8560765988/PS-LB/PS LB_TTN_V1.1_Decoder.txt#L99
A calculation like the following seems to be better for a 5m water level sensor:
decode.Water_deep_cm= parseFloat(((decode.IDC_intput_mA-4.0)*500/16).toFixed(3));
An own calibration might be even more accurate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions