Add default and clean up superfluous begin function.
This commit is contained in:
1 parent
75d2a8009e
commit
6b9331883d
1 file changed
+1
-6
@@ -47,12 +47,7 @@ class SoftwareTimer
|
||||
SoftwareTimer() { _handle = NULL; }
|
||||
virtual ~SoftwareTimer() { if(_handle != NULL) xTimerDelete(_handle, 0); }
|
||||
|
||||
void begin(uint32_t ms, TimerCallbackFunction_t callback)
|
||||
{
|
||||
_handle = xTimerCreate(NULL, ms2tick(ms), true, NULL, callback);
|
||||
}
|
||||
|
||||
void begin(uint32_t ms, TimerCallbackFunction_t callback, bool repeating)
|
||||
void begin(uint32_t ms, TimerCallbackFunction_t callback, bool repeating = true)
|
||||
{
|
||||
_handle = xTimerCreate(NULL, ms2tick(ms), repeating, NULL, callback);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user