nodemcu / nodemcu-firmware

Lua based interactive firmware for ESP8266, ESP8285 and ESP32
https://nodemcu.readthedocs.io
MIT License
7.62k stars 3.12k forks source link

platform uart: really feed uart data to both console and on-data cb #3545

Closed jasaw closed 1 year ago

jasaw commented 1 year ago

I made a mistake yesterday on the PR #3538 where first byte of uart data is fed to the LUA console and 2nd byte to the on-data callback. It should have been feeding all bytes to both LUA console and on-data callback.

Sorry my bad.

This PR loops all the uart bytes for the console first, then loops all the uart bytes again for the on-data callback.

@jmattsson Please review.

jmattsson commented 1 year ago

Well whoops, I too should've caught that yesterday!