mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-14 18:55:59 +08:00
Buzzer bug fixed. (#1081)
All checks were successful
build-ci / build (push) Successful in 55m59s
All checks were successful
build-ci / build (push) Successful in 55m59s
* 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:
parent
dc8e221d7d
commit
429007b349
@ -54,9 +54,8 @@ bool BuzzerDevice::begin() {
|
|||||||
end();
|
end();
|
||||||
}
|
}
|
||||||
#if defined(ARDUINO_ARCH_ESP32)
|
#if defined(ARDUINO_ARCH_ESP32)
|
||||||
setToneChannel(0);
|
ledcAttachChannel(0, 12000, 8, 0);
|
||||||
ledcSetup(0, 12000, 8);
|
#endif // defined(ARDUINO_ARCH_ESP32)
|
||||||
#endif // defined(ARDUINO_ARCH_ESP32)
|
|
||||||
if (ESP3DSettings::readByte(ESP_BUZZER) == 1) {
|
if (ESP3DSettings::readByte(ESP_BUZZER) == 1) {
|
||||||
_started = true;
|
_started = true;
|
||||||
playsound(5000, 240);
|
playsound(5000, 240);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user