From f69d0e7d94e19afbc1530bf5bbc1f1a1e40398e3 Mon Sep 17 00:00:00 2001 From: Jonathan Perret Date: Thu, 25 Jul 2024 22:31:36 +0200 Subject: [PATCH] Remove 2-second delay in state knit --- src/ayab/board.h | 3 --- src/ayab/knitter.cpp | 2 -- test/test_fsm.cpp | 1 - test/test_knitter.cpp | 1 - 4 files changed, 7 deletions(-) diff --git a/src/ayab/board.h b/src/ayab/board.h index 6b3f79512..8083af79e 100644 --- a/src/ayab/board.h +++ b/src/ayab/board.h @@ -47,9 +47,6 @@ constexpr uint8_t DBG_BTN_PIN = 7; // DEBUG BUTTON constexpr uint8_t I2Caddr_sol1_8 = 0x0U; ///< I2C Address of solenoids 1 - 8 constexpr uint8_t I2Caddr_sol9_16 = 0x1U; ///< I2C Address of solenoids 9 - 16 -// TODO(Who?): Optimize Delay for various Arduino Models -constexpr uint16_t START_KNITTING_DELAY = 2000U; // ms - // Determine board type #if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) // Arduino Uno diff --git a/src/ayab/knitter.cpp b/src/ayab/knitter.cpp index 7153ceaaf..f7a939d5e 100644 --- a/src/ayab/knitter.cpp +++ b/src/ayab/knitter.cpp @@ -239,8 +239,6 @@ bool Knitter::isReady() { void Knitter::knit() { if (m_firstRun) { m_firstRun = false; - // TODO(who?): optimize delay for various Arduino models - delay(START_KNITTING_DELAY); GlobalBeeper::finishedLine(); ++m_currentLineNumber; reqLine(m_currentLineNumber); diff --git a/test/test_fsm.cpp b/test/test_fsm.cpp index c40510704..6da078716 100644 --- a/test/test_fsm.cpp +++ b/test/test_fsm.cpp @@ -215,7 +215,6 @@ class FsmTest : public ::testing::Test { } void expect_first_knit() { - EXPECT_CALL(*arduinoMock, delay(START_KNITTING_DELAY)); EXPECT_CALL(*beeperMock, finishedLine); expect_reqLine(); } diff --git a/test/test_knitter.cpp b/test/test_knitter.cpp index 13894b931..392f12e33 100644 --- a/test/test_knitter.cpp +++ b/test/test_knitter.cpp @@ -253,7 +253,6 @@ class KnitterTest : public ::testing::Test { } void expect_first_knit() { - EXPECT_CALL(*arduinoMock, delay(START_KNITTING_DELAY)); EXPECT_CALL(*beeperMock, finishedLine); expect_reqLine(); }