mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* refactored buzzer concept to UITask
* moved buzzer.h/cpp to helpers/ui
This commit is contained in:
parent
4a60548b7d
commit
7e90d386e2
7 changed files with 35 additions and 26 deletions
|
|
@ -53,6 +53,18 @@ void UITask::begin(DisplayDriver* display, NodePrefs* node_prefs, const char* bu
|
|||
|
||||
// v1.2.3 (1 Jan 2025)
|
||||
sprintf(_version_info, "%s (%s)", version, build_date);
|
||||
|
||||
#ifdef PIN_BUZZER
|
||||
buzzer.begin();
|
||||
#endif
|
||||
}
|
||||
|
||||
void UITask::soundBuzzer() {
|
||||
#if defined(PIN_BUZZER)
|
||||
// gemini's pick
|
||||
buzzer.play("MsgRcv3:d=4,o=6,b=200:32e,32g,32b,16c7");
|
||||
//Serial.println("DBG: Buzzzzzz");
|
||||
#endif
|
||||
}
|
||||
|
||||
void UITask::msgRead(int msgcount) {
|
||||
|
|
@ -248,6 +260,10 @@ void UITask::loop() {
|
|||
buttonHandler();
|
||||
userLedHandler();
|
||||
|
||||
#ifdef PIN_BUZZER
|
||||
if (buzzer.isPlaying()) buzzer.loop();
|
||||
#endif
|
||||
|
||||
if (_display != NULL && _display->isOn()) {
|
||||
static bool _firstBoot = true;
|
||||
if(_firstBoot && millis() >= BOOT_SCREEN_MILLIS) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue