Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
aleemont1 committed Dec 4, 2023
2 parents 18c7a0f + 99e41d9 commit f4d20e3
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions smart_bridge/src/tasks/CountDown.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

CountDown::CountDown(int countDown) : Task()
{
this->setStatus(false);
this->setStatus(false);
this->lcd = new LCD(0x27, 16, 2);
this->resetCountDown(N3);
Expand Down Expand Up @@ -50,24 +49,16 @@ void CountDown::startCountDown() // NOTE: Chiama direttamente this->setAc
void CountDown::printCountDown()
{
int count = getCountDown();
// Serial.println("Countdown: " + String(count) + " seconds");
lcd->write(("Countdown: " + String(count)).c_str(), 0, 0);
}

void CountDown::endsCountDown()
{
if (getCountDown() <= 0)
{
<<<<<<< HEAD
this->setStatus(true);
this->isCompleted();
this->printsEndsCountdown();
this->resetCountDown(N3);
=======
this->isCompleted(); // NOTE: non credo serva
this->printsEndsCountdown(); // NOTE: meglio chiamare direttamente la stampa, si usa meno spazio sullo stack
this->resetCountDown(N3);
>>>>>>> 005e2fa ([REFACTOR] Refactoring)
Serial.println("CountDown::Countdown resetted");
this->setCompleted();
}
Expand Down Expand Up @@ -109,23 +100,10 @@ bool CountDown::getStatus()
return this->status;
}

void CountDown::setStatus(bool value)
{
this->status = value;
}

bool CountDown::getStatus()
{
return this->status;
}

void CountDown::tick()
{
startCountDown();
printCountDown();
decreaseCountDown();
<<<<<<< HEAD
=======
endsCountDown(); // NOTE: lo chiami già in decreaseCountDown(), non serve chiamarlo qui.
>>>>>>> 005e2fa ([REFACTOR] Refactoring)
}

0 comments on commit f4d20e3

Please sign in to comment.