Question about HX711_ADC::start functions
duese97 opened this issue · 1 comments
Hi,
I have a question considering these functions:
void HX711_ADC::start(unsigned long t)
and
void HX711_ADC::start(unsigned long t, bool dotare)
I looks to me like the function parameter t
is a duration, how long "dummy measurements" shall be done (if I understand the documentation correctly).
However, when the start function is called a longer time after boot (when millis() is way larger) this will not work any more.
I would expect the calculation to look something like this for the while(millis() < t)
to work:
t = t + millis() + 400;
Is this intended?
Hi! Yes I agree that it would have been better as you suggest, but it has been like that from the beginning and I'm a bit reluctant to change it as it could have unintedned effects for the users of the library. I suggest that you use millis() + t
as argument if you want to call the function a while after boot.