Skip to content

Commit

Permalink
修复PlayTone模板应用错误bug、SquareWave条件表达式bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Ebola-Chan-bot committed Jul 14, 2021
1 parent 0ebcaa3 commit c1be23c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=TimersOneForAll
version=1.4.0
version=1.4.1
author=EbolaChan <[email protected]>
maintainer=EbolaChan <[email protected]>
sentence=Make full use of all your hardware timers on your Arduino board. 充分利用你开发板上所有的硬件计时器
Expand Down
2 changes: 1 addition & 1 deletion src/Internal/PlayTone.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ namespace TimersOneForAll
{
constexpr Internal::TimerSetting TS = Internal::GetTimerSetting(TimerCode, 500.f / FrequencyHz);
Gifts::EfficientDigitalToggle<PinCode>();
Internal::SLRepeaterSet<TimerCode, Gifts::EfficientDigitalToggle<PinCode>, uint32_t(FrequencyHz) * Milliseconds / 500, DoneCallback>(TS.TCNT, TS.PrescalerBits);
Internal::SLRepeaterSet<TimerCode, TS.TCNT, TS.PrescalerBits, Gifts::EfficientDigitalToggle<PinCode>, DoneCallback>(uint32_t(FrequencyHz) * Milliseconds / 500);
}
}
2 changes: 1 addition & 1 deletion src/Internal/SquareWave.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ namespace TimersOneForAll
SetOCRB<TimerCode>(TryTS.TCNT * HighMilliseconds / FullCycle);
LR<TimerCode> = RepeatTimes;
COMPA<TimerCode> = Gifts::EfficientDigitalWrite<PinCode, HIGH>;
COMPB<TimerCode> = RepeatTimes > 0 ? []
COMPB<TimerCode> = RepeatTimes > 0 ? (void(*)())[]
{
Gifts::EfficientDigitalWrite<PinCode, LOW>();
if (!--LR<TimerCode>)
Expand Down

0 comments on commit c1be23c

Please sign in to comment.