b-parasite-esp32/code/nrf-connect/prstlib/dts/bindings/soil-calibration-coeffs.yaml
rbaron 1983f31af9 Store calibration polynomial in devicetree
This will enable us to transparently use different calibration for
different board revisions. The 2.0.0 revision changes the sensing
circuitry and will need its own coeffs.

In this commit, both models are run in parallel for debugging.
2023-03-19 15:06:39 +01:00

25 lines
1,002 B
YAML

description: >
Calibration coefficients for the soil sensing circuit. We have two polynomials whose input variable
is the battery voltage in Volts. The evaluated polynomial corresponds to the estimated ADC value,
assumed to be 10 bits, so in [0, 1024). The two polynomials are:
dry: For estimation of the fully dry state, given the battery voltage
wet: For estimation of the fully dry state, given the battery voltage
Note that each poly coefficient is specified as 1000 times its real values. This is because we can't
directly represent floating points in devicetree. The final evaludated value should be divided by
1000.0f in code.
compatible: soil-calibration-coeffe
include: base.yaml
properties:
dry:
type: array
required: true
description: The coefficients * 1000, as integers. 0th degree first, then 1st and 2nd last.
wet:
type: array
required: true
description: The coefficients * 1000, as integers. 0th degree first, then 1st and 2nd last.