mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
Serial active on create
This commit is contained in:
@@ -153,7 +153,7 @@ class Terminal : public Print {
|
||||
uint8_t curX = 0xff;
|
||||
|
||||
unsigned long _lastReceived = 0;
|
||||
State state = ST_INACTIVE;
|
||||
State state;
|
||||
Stream *_stream;
|
||||
EditLine _line;
|
||||
char _cc_buf[32] = {0};
|
||||
|
||||
@@ -540,6 +540,7 @@ void serialBegin() {
|
||||
term->setOnReadLine([](const char *str) {
|
||||
String line = String(str);
|
||||
pm.info("serial read: " + line);
|
||||
line.replace("#", " ");
|
||||
order_loop += line + ",";
|
||||
});
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ Terminal::Terminal(Stream *stream) : _stream{stream},
|
||||
_color(false),
|
||||
_controlCodes(false),
|
||||
_echo(false),
|
||||
_eol(CRLF){};
|
||||
_eol(CRLF) { state = ST_NORMAL; };
|
||||
|
||||
void Terminal::setStream(Stream *stream) {
|
||||
_stream = stream;
|
||||
|
||||
Reference in New Issue
Block a user