Sfoglia il codice sorgente

test_pwm: relax the requirement of mcpwm test

laokaiyao 4 anni fa
parent
commit
48fdf6912d
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      components/driver/test/test_pwm.c

+ 2 - 2
components/driver/test/test_pwm.c

@@ -169,9 +169,9 @@ static void mcpwm_start_stop_test(mcpwm_unit_t unit, mcpwm_timer_t timer)
     TEST_ESP_OK(mcpwm_stop(unit, timer));
     usleep(10000); // wait until timer stopped
     pulse_number = mcpwm_pcnt_get_pulse_number(TEST_PWMA_PCNT_UNIT, 100);
-    TEST_ASSERT_INT_WITHIN(0, 0, pulse_number);
+    TEST_ASSERT_INT_WITHIN(2, 0, pulse_number);
     pulse_number = mcpwm_pcnt_get_pulse_number(TEST_PWMB_PCNT_UNIT, 100);
-    TEST_ASSERT_INT_WITHIN(0, 0, pulse_number);
+    TEST_ASSERT_INT_WITHIN(2, 0, pulse_number);
 }
 
 TEST_CASE("MCPWM start and stop test", "[mcpwm]")