You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for your library! It's the most advanced RTTTL library I could find and it works wonderfully on the Nano. But on a STM32 it won't compile due to a differing signature of the noTone function:
/**************************************************************************** * Custom functions ****************************************************************************/// Arduino on STM32 (and potentially other platforms) defines// noTone() with a second (optional) argument. This leads to// compilation failures, unless the second argument is bound// to its default value.voidnoToneWrapper(uint8_t pin) {
noTone(pin);
}
ToneFuncPtr _tone = &tone;
NoToneFuncPtr _noTone = &noToneWrapper;
DelayFuncPtr _delay = &delay;
MillisFuncPtr _millis = &millis;
(I can submit a proper PR if you want.)
The text was updated successfully, but these errors were encountered:
Hi, thanks for your library! It's the most advanced RTTTL library I could find and it works wonderfully on the Nano. But on a STM32 it won't compile due to a differing signature of the
noTone
function:https://github.com/stm32duino/Arduino_Core_STM32/blob/6f28a4884a77ffddc8bdc1e44a781b9f6cbccf08/cores/arduino/Tone.h#L37
The optional second argument breaks the asignment to
_noTone
:For what it's worth, here's my simple fix:
(I can submit a proper PR if you want.)
The text was updated successfully, but these errors were encountered: