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