Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/RTOScppTimer.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class TimerBase {
_start = start;
}

virtual bool create(bool start) = 0;
virtual bool create() = 0;

bool start(TickType_t ticks_to_wait = portMAX_DELAY) {
return xTimerStart(_handle, ticks_to_wait);
Expand Down Expand Up @@ -92,10 +92,10 @@ class TimerDynamic : public TimerBase {
if (start) this->start();
}

bool create(bool start) {
bool create() {
_handle = xTimerCreate(_name, _period, _auto_reload, _id, _callback);
if (_handle == nullptr) return false;
return start ? this->start() : true;
return _start ? this->start() : true;
}
};

Expand All @@ -111,10 +111,10 @@ class TimerStatic : public TimerBase {
if (start) this->start();
}

bool create(bool start) {
bool create() {
_handle = xTimerCreateStatic(_name, _period, _auto_reload, _id, _callback, &_tcb);
if (_handle == nullptr) return false;
return start ? this->start() : true;
return _start ? this->start() : true;
}

private:
Expand Down