Compare commits

...

2 Commits

Author SHA1 Message Date
7996cf50b0 fix timeout 2021-09-05 20:50:16 +02:00
7c2ad33e75 debug print 2021-09-05 20:48:34 +02:00
2 changed files with 3 additions and 1 deletions

View File

@@ -235,7 +235,7 @@ void TimeoutSerial::timeoutExpired(const boost::system::error_code& error)
void TimeoutSerial::readCompleted(const boost::system::error_code& error,
const size_t bytesTransferred)
{
if(!error)
if(!error || error.value() == 158)
{
result=resultSuccess;
this->bytesTransferred=bytesTransferred;

View File

@@ -270,6 +270,8 @@ Ymodem::Code Ymodem::receivePacket()
{
uint32_t len = read(&(rxBuffer[1]), YMODEM_PACKET_SIZE + YMODEM_PACKET_OVERHEAD - 1);
BOOST_LOG_TRIVIAL(debug) << "Len = " << len;
if(len < (YMODEM_PACKET_SIZE + YMODEM_PACKET_OVERHEAD - 1))
{
rxLength = len + 1;