Add default and clean up superfluous begin function.

This commit is contained in:
Pol Van Aubel committed 2019-05-03 11:34:08 +02:00
1 parent 75d2a8009e
commit 6b9331883d
1 file changed
+1 -6
+1 -6
View File
@@ -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);
}