Skip to content

Commit

Permalink
modified: src/TCone.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
MicroBeaut committed Apr 30, 2024
1 parent 97ccdc1 commit 62148e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/TCone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ TCone::TCone(uint16_t period, TaskMember *tasks, uint8_t size) {
_size = size;
_periodicCallbackFunction = nullptr;
_taskCallbackFunction = nullptr;
this->enable(true);
}
void TCone::callbackOnPeriodicElapsed(PeriodicCallback function) {
_periodicCallbackFunction = function;
Expand All @@ -31,8 +32,6 @@ void TCone::begin() {
TCCR1B = (1 << WGM12) | (1 << CS12) | (1 << CS10);
OCR1A = MS2OCR( _period);
TIMSK1 |= (1 << OCIE1A);

this->enable(true);
}

void TCone::enable(bool enable) {
Expand Down Expand Up @@ -77,6 +76,7 @@ void TCone::internalSetPeriod(uint16_t period) {

void TCone::internalReset(uint8_t id) {
_tasks[id].done = false;
_tasks[id].prev = false;
_tasks[id].elapsed = 0;
}

Expand Down

0 comments on commit 62148e5

Please sign in to comment.