void test_invalid_timer() { t = Invalid(Timer); TEST_ASSERT_FALSE_MESSAGE(isPwmTimer(t), "invalid timer should not be pwm"); TEST_ASSERT_FALSE_MESSAGE(IsValid(getTimerOutputPin(t)), "invalid timer should not have output pin"); setTimerValue(t, 23); // Check for no segfault. TEST_ASSERT_EQUAL_MESSAGE(0, getTimerValue(t), "invalid timer should have 0 timer value"); }
void assert_read(uint16_t set_ocr, uint16_t expected, int num) { char buf[] = "Unexpected timer ocr value read (run XX)"; sprintf(buf, "Unexpected timer ocr value read (run %i)", num); ocr = set_ocr; uint16_t val = getTimerValue(t); TEST_ASSERT_EQUAL_HEX_MESSAGE(expected, val, buf); }
void TimerWidget::setTimer() { mediaPlayer->stop(); stopFlashing(); setTimer(lineEdit->text()); emit timerSet(getTimerValue()); }
task autonomous() { // ..................................................................................... //Insert user code here. clearTimer(T1); while(getTimerValue(T1)<1000){ motor[frightMotor] = -80; motor[fleftMotor] = -80; } // ..................................................................................... }
void TimerWidget::showChanges() { lcdNumber->display(getTimerValue()); }