You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* TODO: this is an inefficient busy-wait. Solutions?
*/
while(!this->isReady());
this->readValue();
The waitReady method should busy-wait for a predefined maximum amount of time. If the amount of time is exceeded, a TimeoutException should be thrown. The try-catch in setConfig can then handle accordingly.
Inheriting classes like AdvancedHX711 can then override with something else as needed.
This will also handle the case where DOUT is never "ready" for some unforeseen reason.
The text was updated successfully, but these errors were encountered:
AdvancedHX711 relies upon Watcher, which - currently - does not easily allow for notifications when data is ready. A rewrite may be in order. Perhaps event-based callbacks?
hx711/src/HX711.cpp
Lines 257 to 265 in de87c5b
The waitReady method should busy-wait for a predefined maximum amount of time. If the amount of time is exceeded, a
TimeoutException
should be thrown. The try-catch in setConfig can then handle accordingly.Inheriting classes like AdvancedHX711 can then override with something else as needed.
This will also handle the case where DOUT is never "ready" for some unforeseen reason.
The text was updated successfully, but these errors were encountered: