mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-10-14 15:01:28 +08:00
Add serial_service.readBytes in wait_for_ack
This commit is contained in:
parent
a035516a20
commit
a5d18e1cbd
@ -112,6 +112,7 @@ bool GcodeHost::wait_for_ack(uint32_t timeout, bool checksum, const char * ack)
|
||||
size_t len = serial_service.available();
|
||||
if (len > 0) {
|
||||
uint8_t * sbuf = (uint8_t *)malloc(len+1);
|
||||
serial_service.readBytes(sbuf, len);
|
||||
if(!sbuf) {
|
||||
_error = ERROR_MEMORY_PROBLEM;
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user