mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
initial support for generic RTTTL notifier
This commit is contained in:
parent
f9c0056955
commit
be88bea42d
4 changed files with 112 additions and 1 deletions
|
|
@ -66,6 +66,11 @@
|
|||
static UITask ui_task(&board);
|
||||
#endif
|
||||
|
||||
#ifdef PIN_BUZZER
|
||||
#include "buzzer.h"
|
||||
genericBuzzer buzzer;
|
||||
#endif
|
||||
|
||||
// Believe it or not, this std C function is busted on some platforms!
|
||||
static uint32_t _atoi(const char* sp) {
|
||||
uint32_t n = 0;
|
||||
|
|
@ -484,7 +489,12 @@ class MyMesh : public BaseChatMesh {
|
|||
}
|
||||
|
||||
void soundBuzzer() {
|
||||
// TODO
|
||||
#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
|
||||
|
||||
}
|
||||
|
||||
protected:
|
||||
|
|
@ -1553,6 +1563,10 @@ public:
|
|||
ui_task.setHasConnection(_serial->isConnected());
|
||||
ui_task.loop();
|
||||
#endif
|
||||
|
||||
#ifdef PIN_BUZZER
|
||||
if (buzzer.isPlaying()) buzzer.loop();
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -1620,6 +1634,10 @@ void setup() {
|
|||
|
||||
board.begin();
|
||||
|
||||
#ifdef PIN_BUZZER
|
||||
buzzer.begin();
|
||||
#endif
|
||||
|
||||
#ifdef DISPLAY_CLASS
|
||||
DisplayDriver* disp = NULL;
|
||||
if (display.begin()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue