olehs / PZEM004T

Arduino communication library for Peacefair PZEM-004T Energy monitor
MIT License
226 stars 114 forks source link

Fix swserial typo #74

Closed mcspr closed 3 years ago

mcspr commented 3 years ago

https://github.com/olehs/PZEM004T/commit/0debccb7221d75b44c11a43a3531dd7f9680bb00 changed the variable, but not the next statement

1.1.4 from the library registry will fail the build when swserial is enabled

/home/runner/.platformio/lib/PZEM004T/PZEM004T.cpp: In constructor 'PZEM004T::PZEM004T(uint8_t, uint8_t)':
/home/runner/.platformio/lib/PZEM004T/PZEM004T.cpp:30:5: error: 'port' was not declared in this scope
     port->begin(PZEM_BAUD_RATE);
     ^
*** [.pio/build/esp8266-4m-latest-base/lib678/PZEM004T/PZEM004T.cpp.o] Error 1
olehs commented 3 years ago

Thanks!