Add comment explaining available() <= 0 check

This commit is contained in:
J. Nick Koston
2026-02-09 04:30:59 -06:00
parent 3f3cf83aab
commit 13f9726534
+2
View File
@@ -81,6 +81,8 @@ void RD03DComponent::dump_config() {
}
void RD03DComponent::loop() {
// All current UART available() implementations return >= 0,
// use <= 0 to future-proof against any that may return negative on error.
int avail = this->available();
if (avail <= 0)
return;