eamars / OpenTrickler-RP2040-Controller

OpenTrickler controller application on RP2040 platform
https://discord.gg/ZhdThA2vrW
GNU General Public License v3.0
13 stars 8 forks source link

Handle strtof parsing errors #49

Closed ullbergm closed 3 months ago

ullbergm commented 3 months ago

Description: This pull request adds error checking to the code that parses the weight from the scales. This may be an edge case, but it won't hurt to handle it correctly. In the event that strtof fails to parse a float out of the string, it will return 0 and without error checking, that could make OpenTrickler dispense powder when it shouldn't.

Changes:

Testing: