From c548958f6ebbf372e3771e8a9012a5faab34d73b Mon Sep 17 00:00:00 2001 From: StanJ <53401742+Tech-TX@users.noreply.github.com> Date: Sat, 4 Apr 2020 11:47:54 -0500 Subject: [PATCH] Tone limit 20KHz (#7179) Set Tone maximum frequency to 20KHz (was 5KHz) --- cores/esp8266/Tone.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cores/esp8266/Tone.cpp b/cores/esp8266/Tone.cpp index 35a5a4151..0a156fe21 100644 --- a/cores/esp8266/Tone.cpp +++ b/cores/esp8266/Tone.cpp @@ -35,8 +35,8 @@ static void _startTone(uint8_t _pin, uint32_t high, uint32_t low, unsigned long pinMode(_pin, OUTPUT); - high = std::max(high, (uint32_t)100); - low = std::max(low, (uint32_t)100); + high = std::max(high, (uint32_t)25); // new 20KHz maximum tone frequency, + low = std::max(low, (uint32_t)25); // (25us high + 25us low period = 20KHz) if (startWaveform(_pin, high, low, (uint32_t) duration * 1000)) { _toneMap |= 1 << _pin;