debug print

This commit is contained in:
2021-09-05 20:48:34 +02:00
parent bd685f3f85
commit 7c2ad33e75
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.val)
{
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;