mirror of
https://github.com/luc-github/ESP3D.git
synced 2025-10-24 11:50:52 -07:00
Buzzer bug fixed. (#1081)
* Adjusted buzzer initialization logic to support ESP-IDF 5.1.1, added conditional compilation to be compatible with older versions * Update buzzer.cpp
This commit is contained in:
@@ -54,9 +54,8 @@ bool BuzzerDevice::begin() {
|
||||
end();
|
||||
}
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
setToneChannel(0);
|
||||
ledcSetup(0, 12000, 8);
|
||||
#endif // defined(ARDUINO_ARCH_ESP32)
|
||||
ledcAttachChannel(0, 12000, 8, 0);
|
||||
#endif // defined(ARDUINO_ARCH_ESP32)
|
||||
if (ESP3DSettings::readByte(ESP_BUZZER) == 1) {
|
||||
_started = true;
|
||||
playsound(5000, 240);
|
||||
|
||||
Reference in New Issue
Block a user