Add comment explaining early guard

This commit is contained in:
J. Nick Koston
2026-02-09 09:31:02 -06:00
parent 38aeb9be37
commit b2879f7f99

View File

@@ -56,6 +56,8 @@ void PylontechComponent::setup() {
void PylontechComponent::update() { this->write_str("pwr\n"); }
void PylontechComponent::loop() {
// Early return avoids stack adjustment for the batch buffer below.
// loop() runs ~7000/min so most calls have nothing to read.
int avail = this->available();
if (avail > 0) {
// pylontech sends a lot of data very suddenly