Skip to content

Commit

Permalink
Remove 2-second delay in state knit
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanperret authored and dl1com committed Jul 30, 2024
1 parent 25aa047 commit f69d0e7
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 7 deletions.
3 changes: 0 additions & 3 deletions src/ayab/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/ayab/knitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion test/test_fsm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
1 change: 0 additions & 1 deletion test/test_knitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit f69d0e7

Please sign in to comment.