main (dis)charge loop uses a maximum (dis)charge duration before halting cycle, it would be probably better to detect if the value has been stale for a period of time. (it would use for instance 2 parameters: a minimum delta value that says the voltage is moving, and a maximum duration for the voltage to reach this delta)
we could also use another option to force next cycle even if a timeout is reached
main (dis)charge loop uses a maximum (dis)charge duration before halting cycle, it would be probably better to detect if the value has been stale for a period of time. (it would use for instance 2 parameters: a minimum delta value that says the voltage is moving, and a maximum duration for the voltage to reach this delta)
we could also use another option to force next cycle even if a timeout is reached