endail / hx711-pico-c

Implementation of single and multiple HX711 use via RP2040's state machine
https://endail.github.io/hx711-pico-c/
MIT License
32 stars 7 forks source link

Assert *len == 0 #14

Closed endail closed 2 years ago

endail commented 2 years ago

https://github.com/endail/hx711-pico-c/blob/9f103f9cf7701c818c375075577e94a5d38a8977/src/scale.c#L140

This function should not assume len == 0. It should however either assign a value of 0 before reading any values, or use a local len var then assign to len before returning. Preferably the latter.