Преглед на файлове

fixed ymodem poll cycles

stefan преди 9 месеца
родител
ревизия
f85d99b8a1
променени са 2 файла, в които са добавени 1 реда и са изтрити 3 реда
  1. 1 1
      src/shellmatta_ymodem.c
  2. 0 2
      test/integrationtest/test_integration_ymodem.cpp

+ 1 - 1
src/shellmatta_ymodem.c

@@ -292,7 +292,7 @@ shellmatta_retCode_t shellmatta_ymodem_poll(shellmatta_handle_t handle)
         ret = SHELLMATTA_OK;
         break;
     case SHELLMATTA_YMODEM_WAIT_FOR_END:
-        if(0u != inst->ymodem.pollCyclesLeft)
+        if(inst->ymodem.pollCyclesLeft > 1u)
         {
             inst->ymodem.pollCyclesLeft --;
         }

+ 0 - 2
test/integrationtest/test_integration_ymodem.cpp

@@ -209,8 +209,6 @@ SCENARIO("Test successful transmissions in ymodem")
                         CHECK(ret == SHELLMATTA_OK);
                         ret = shellmatta_processData(handle, (char*)"", 0);
                         CHECK(ret == SHELLMATTA_OK);
-                        ret = shellmatta_processData(handle, (char*)"", 0);
-                        CHECK(ret == SHELLMATTA_OK);
 
                         THEN("The transmission finishes successfully")
                         {