Merge pull request #497 from MichaelDu9226/3.0

Add serial_service.readBytes in wait_for_ack
This commit is contained in:
Luc 2020-09-02 07:49:03 +02:00 committed by GitHub
commit 0615c3e027
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;