diff --git a/src/Internal/RepeatAfter.h b/src/Internal/RepeatAfter.h index 46a5081..3a40f86 100644 --- a/src/Internal/RepeatAfter.h +++ b/src/Internal/RepeatAfter.h @@ -18,7 +18,7 @@ namespace TimersOneForAll } //每隔指定毫秒数重复执行任务。重复次数若为负数,或不指定重复次数,则默认无限重复 template - void RepeatAfter(int32_t RepeatTimes = -1) + void RepeatAfter(int32_t RepeatTimes) { constexpr Internal::TimerSetting TS = Internal::GetTimerSetting(TimerCode, IntervalMilliseconds); Internal::SLRepeaterSet(RepeatTimes); diff --git a/src/Internal/SquareWave.h b/src/Internal/SquareWave.h index 4bece8d..d8902b6 100644 --- a/src/Internal/SquareWave.h +++ b/src/Internal/SquareWave.h @@ -266,7 +266,7 @@ namespace TimersOneForAll } //生成循环数有限的方波。如不指定循环次数,默认无限循环 template - void SquareWave(int16_t RepeatTimes = -1) + void SquareWave(int16_t RepeatTimes) { Internal::InternalSW(RepeatTimes); }