From 6b9331883d8ea56b710af28c6c444f57cc8c4c53 Mon Sep 17 00:00:00 2001 From: Pol Van Aubel Date: Fri, 3 May 2019 11:34:08 +0200 Subject: [PATCH] Add default and clean up superfluous begin function. --- cores/nRF5/utility/SoftwareTimer.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cores/nRF5/utility/SoftwareTimer.h b/cores/nRF5/utility/SoftwareTimer.h index a36731d1..dbeb01d4 100644 --- a/cores/nRF5/utility/SoftwareTimer.h +++ b/cores/nRF5/utility/SoftwareTimer.h @@ -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); }