RTTTL on message types
This commit is contained in:
@@ -59,12 +59,23 @@ void UITask::begin(DisplayDriver* display, NodePrefs* node_prefs, const char* bu
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void UITask::soundBuzzer() {
|
void UITask::soundBuzzer(buzzerEventType bet) {
|
||||||
#if defined(PIN_BUZZER)
|
#if defined(PIN_BUZZER)
|
||||||
// gemini's pick
|
switch(bet){
|
||||||
buzzer.play("MsgRcv3:d=4,o=6,b=200:32e,32g,32b,16c7");
|
case buzzerEventType::contactMessage:
|
||||||
//Serial.println("DBG: Buzzzzzz");
|
// gemini's pick
|
||||||
|
buzzer.play("MsgRcv3:d=4,o=6,b=200:32e,32g,32b,16c7");
|
||||||
|
break;
|
||||||
|
case buzzerEventType::channelMessage:
|
||||||
|
case buzzerEventType::roomMessage:
|
||||||
|
case buzzerEventType::newContactMessage:
|
||||||
|
case buzzerEventType::noBuzzer:
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Serial.print("DBG: Buzzzzzz -> ");
|
||||||
|
Serial.println((int) bet);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UITask::msgRead(int msgcount) {
|
void UITask::msgRead(int msgcount) {
|
||||||
|
|||||||
@@ -44,6 +44,6 @@ public:
|
|||||||
void clearMsgPreview();
|
void clearMsgPreview();
|
||||||
void msgRead(int msgcount);
|
void msgRead(int msgcount);
|
||||||
void newMsg(uint8_t path_len, const char* from_name, const char* text, int msgcount);
|
void newMsg(uint8_t path_len, const char* from_name, const char* text, int msgcount);
|
||||||
void soundBuzzer();
|
void soundBuzzer(buzzerEventType bet = buzzerEventType::noBuzzer);
|
||||||
void loop();
|
void loop();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -520,7 +520,7 @@ protected:
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
ui_task.soundBuzzer();
|
ui_task.soundBuzzer(buzzerEventType::newContactMessage);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -583,7 +583,7 @@ protected:
|
|||||||
_serial->writeFrame(frame, 1);
|
_serial->writeFrame(frame, 1);
|
||||||
} else {
|
} else {
|
||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
ui_task.soundBuzzer();
|
ui_task.soundBuzzer(buzzerEventType::contactMessage);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
|
|||||||
@@ -15,6 +15,16 @@
|
|||||||
- make message ring tone configurable
|
- make message ring tone configurable
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
enum class buzzerEventType
|
||||||
|
{
|
||||||
|
noBuzzer,
|
||||||
|
contactMessage,
|
||||||
|
channelMessage,
|
||||||
|
roomMessage,
|
||||||
|
newContactMessage
|
||||||
|
};
|
||||||
|
|
||||||
class genericBuzzer
|
class genericBuzzer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user