mirror of
https://github.com/meshtastic/firmware.git
synced 2025-07-31 19:05:44 +00:00
Shorter audio feedback for InkHUD buttons (#7301)
This commit is contained in:
parent
13ac182142
commit
1063ef9034
@ -39,8 +39,8 @@ void InkHUD::Events::begin()
|
|||||||
void InkHUD::Events::onButtonShort()
|
void InkHUD::Events::onButtonShort()
|
||||||
{
|
{
|
||||||
// Audio feedback (via buzzer)
|
// Audio feedback (via buzzer)
|
||||||
// Short low tone
|
// Short tone
|
||||||
playBoop();
|
playChirp();
|
||||||
// Cancel any beeping, buzzing, blinking
|
// Cancel any beeping, buzzing, blinking
|
||||||
// Some button handling suppressed if we are dismissing an external notification (see below)
|
// Some button handling suppressed if we are dismissing an external notification (see below)
|
||||||
bool dismissedExt = dismissExternalNotification();
|
bool dismissedExt = dismissExternalNotification();
|
||||||
@ -64,8 +64,8 @@ void InkHUD::Events::onButtonShort()
|
|||||||
void InkHUD::Events::onButtonLong()
|
void InkHUD::Events::onButtonLong()
|
||||||
{
|
{
|
||||||
// Audio feedback (via buzzer)
|
// Audio feedback (via buzzer)
|
||||||
// Low tone, longer than playBoop
|
// Slightly longer than playChirp
|
||||||
playBeep();
|
playBoop();
|
||||||
|
|
||||||
// Check which system applet wants to handle the button press (if any)
|
// Check which system applet wants to handle the button press (if any)
|
||||||
SystemApplet *consumer = nullptr;
|
SystemApplet *consumer = nullptr;
|
||||||
|
@ -104,11 +104,11 @@ void setupNicheGraphics()
|
|||||||
buttons->setHandlerDown(1, [backlight]() { backlight->peek(); });
|
buttons->setHandlerDown(1, [backlight]() { backlight->peek(); });
|
||||||
buttons->setHandlerLongPress(1, [backlight]() {
|
buttons->setHandlerLongPress(1, [backlight]() {
|
||||||
backlight->latch();
|
backlight->latch();
|
||||||
playBeep();
|
playBoop();
|
||||||
});
|
});
|
||||||
buttons->setHandlerShortPress(1, [backlight]() {
|
buttons->setHandlerShortPress(1, [backlight]() {
|
||||||
backlight->off();
|
backlight->off();
|
||||||
playBoop();
|
playChirp();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Begin handling button events
|
// Begin handling button events
|
||||||
|
@ -107,7 +107,7 @@ void setupNicheGraphics()
|
|||||||
buttons->setWiring(1, PIN_BUTTON2);
|
buttons->setWiring(1, PIN_BUTTON2);
|
||||||
buttons->setHandlerShortPress(1, [inkhud]() {
|
buttons->setHandlerShortPress(1, [inkhud]() {
|
||||||
inkhud->nextTile();
|
inkhud->nextTile();
|
||||||
playBoop();
|
playChirp();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Begin handling button events
|
// Begin handling button events
|
||||||
|
@ -104,7 +104,7 @@ void setupNicheGraphics()
|
|||||||
buttons->setWiring(1, PIN_BUTTON2);
|
buttons->setWiring(1, PIN_BUTTON2);
|
||||||
buttons->setHandlerShortPress(1, [inkhud]() {
|
buttons->setHandlerShortPress(1, [inkhud]() {
|
||||||
inkhud->nextTile();
|
inkhud->nextTile();
|
||||||
playBoop();
|
playChirp();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Begin handling button events
|
// Begin handling button events
|
||||||
|
Loading…
Reference in New Issue
Block a user