2023-07-26 16:34:36 -07:00
|
|
|
/**
|
|
|
|
|
* @file ExternalNotificationModule.cpp
|
|
|
|
|
* @brief Implementation of the ExternalNotificationModule class.
|
2023-07-26 17:08:04 -07:00
|
|
|
*
|
|
|
|
|
* This file contains the implementation of the ExternalNotificationModule class, which is responsible for handling external
|
|
|
|
|
* notifications such as vibration, buzzer, and LED lights. The class provides methods to turn on and off the external
|
|
|
|
|
* notification outputs and to play ringtones using PWM buzzer. It also includes default configurations and a runOnce() method to
|
|
|
|
|
* handle the module's behavior.
|
|
|
|
|
*
|
2023-07-26 16:34:36 -07:00
|
|
|
* Documentation:
|
2023-11-06 14:03:44 -08:00
|
|
|
* https://meshtastic.org/docs/configuration/module/external-notification
|
2023-07-26 17:08:04 -07:00
|
|
|
*
|
2023-07-26 16:34:36 -07:00
|
|
|
* @author Jm Casler & Meshtastic Team
|
|
|
|
|
* @date [Insert Date]
|
|
|
|
|
*/
|
2022-02-27 00:18:35 -08:00
|
|
|
#include "ExternalNotificationModule.h"
|
2021-01-27 19:18:16 -08:00
|
|
|
#include "MeshService.h"
|
|
|
|
|
#include "NodeDB.h"
|
|
|
|
|
#include "RTC.h"
|
|
|
|
|
#include "Router.h"
|
2022-10-22 13:35:34 +02:00
|
|
|
#include "buzz/buzz.h"
|
2022-05-07 20:31:21 +10:00
|
|
|
#include "configuration.h"
|
2023-12-12 08:36:37 -06:00
|
|
|
#include "main.h"
|
2023-01-18 08:56:47 -06:00
|
|
|
#include "mesh/generated/meshtastic/rtttl.pb.h"
|
2021-01-27 19:18:16 -08:00
|
|
|
#include <Arduino.h>
|
|
|
|
|
|
2023-07-03 16:34:32 +02:00
|
|
|
#ifdef HAS_NCP5623
|
2023-06-26 20:59:44 -04:00
|
|
|
#include <graphics/RAKled.h>
|
2023-05-06 07:17:40 -05:00
|
|
|
#endif
|
|
|
|
|
|
2025-04-01 22:39:40 +02:00
|
|
|
#ifdef HAS_LP5562
|
|
|
|
|
#include <graphics/NomadStarLED.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
2024-04-22 14:42:52 +01:00
|
|
|
#ifdef HAS_NEOPIXEL
|
|
|
|
|
#include <graphics/NeoPixel.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
2024-04-16 21:28:12 +01:00
|
|
|
#ifdef UNPHONE
|
|
|
|
|
#include "unPhone.h"
|
|
|
|
|
extern unPhone unphone;
|
|
|
|
|
#endif
|
|
|
|
|
|
2025-04-01 22:39:40 +02:00
|
|
|
#if defined(HAS_RGB_LED)
|
2024-04-18 22:00:33 +01:00
|
|
|
uint8_t red = 0;
|
|
|
|
|
uint8_t green = 0;
|
|
|
|
|
uint8_t blue = 0;
|
2025-04-01 22:39:40 +02:00
|
|
|
uint8_t white = 0;
|
2024-04-18 22:00:33 +01:00
|
|
|
uint8_t colorState = 1;
|
|
|
|
|
uint8_t brightnessIndex = 0;
|
|
|
|
|
uint8_t brightnessValues[] = {0, 10, 20, 30, 50, 90, 160, 170}; // blue gets multiplied by 1.5
|
|
|
|
|
bool ascending = true;
|
|
|
|
|
#endif
|
|
|
|
|
|
2022-10-22 13:35:34 +02:00
|
|
|
#ifndef PIN_BUZZER
|
|
|
|
|
#define PIN_BUZZER false
|
|
|
|
|
#endif
|
|
|
|
|
|
2021-01-27 19:18:16 -08:00
|
|
|
/*
|
2021-01-30 09:36:17 -08:00
|
|
|
Documentation:
|
2023-11-06 14:03:44 -08:00
|
|
|
https://meshtastic.org/docs/configuration/module/external-notification
|
2021-01-27 19:18:16 -08:00
|
|
|
*/
|
|
|
|
|
|
2021-01-30 09:17:40 -08:00
|
|
|
// Default configurations
|
2022-10-22 14:13:45 +02:00
|
|
|
#ifdef EXT_NOTIFY_OUT
|
2022-02-27 01:49:24 -08:00
|
|
|
#define EXT_NOTIFICATION_MODULE_OUTPUT EXT_NOTIFY_OUT
|
2022-10-22 14:13:45 +02:00
|
|
|
#else
|
|
|
|
|
#define EXT_NOTIFICATION_MODULE_OUTPUT 0
|
|
|
|
|
#endif
|
2022-02-27 01:49:24 -08:00
|
|
|
#define EXT_NOTIFICATION_MODULE_OUTPUT_MS 1000
|
2021-01-27 21:20:18 -08:00
|
|
|
|
2025-09-28 13:17:57 +13:00
|
|
|
#define EXT_NOTIFICATION_FAST_THREAD_MS 25
|
2023-12-12 08:36:37 -06:00
|
|
|
|
2021-01-27 21:20:18 -08:00
|
|
|
#define ASCII_BELL 0x07
|
|
|
|
|
|
2023-01-21 18:22:19 +01:00
|
|
|
meshtastic_RTTTLConfig rtttlConfig;
|
2022-12-29 16:53:36 +01:00
|
|
|
|
2022-12-08 16:27:56 +01:00
|
|
|
ExternalNotificationModule *externalNotificationModule;
|
|
|
|
|
|
|
|
|
|
bool externalCurrentState[3] = {};
|
|
|
|
|
|
|
|
|
|
uint32_t externalTurnedOn[3] = {};
|
2021-01-28 23:02:00 -08:00
|
|
|
|
2022-12-29 16:53:36 +01:00
|
|
|
static const char *rtttlConfigFile = "/prefs/ringtone.proto";
|
|
|
|
|
|
2022-02-27 01:49:24 -08:00
|
|
|
int32_t ExternalNotificationModule::runOnce()
|
2021-01-27 19:18:16 -08:00
|
|
|
{
|
2022-12-28 14:57:40 +01:00
|
|
|
if (!moduleConfig.external_notification.enabled) {
|
2022-12-08 16:27:56 +01:00
|
|
|
return INT32_MAX; // we don't need this thread here...
|
|
|
|
|
} else {
|
2025-09-28 13:17:57 +13:00
|
|
|
uint32_t delay = EXT_NOTIFICATION_MODULE_OUTPUT_MS;
|
|
|
|
|
bool isRtttlPlaying = rtttl::isPlaying();
|
2023-12-12 08:36:37 -06:00
|
|
|
#ifdef HAS_I2S
|
2025-09-28 13:17:57 +13:00
|
|
|
// audioThread->isPlaying() also handles actually playing the RTTTL, needs to be called in loop
|
|
|
|
|
isRtttlPlaying = isRtttlPlaying || audioThread->isPlaying();
|
2023-12-12 08:36:37 -06:00
|
|
|
#endif
|
2025-10-24 10:37:38 +11:00
|
|
|
if ((nagCycleCutoff <= millis())) {
|
|
|
|
|
// Turn off external notification immediately when timeout is reached, regardless of song state
|
2022-12-27 21:51:35 +01:00
|
|
|
nagCycleCutoff = UINT32_MAX;
|
2022-12-30 10:27:07 -06:00
|
|
|
LOG_INFO("Turning off external notification: ");
|
2024-03-12 21:42:08 -10:00
|
|
|
for (int i = 0; i < 3; i++) {
|
2024-10-29 21:41:21 +11:00
|
|
|
setExternalState(i, false);
|
2023-01-04 14:45:28 +01:00
|
|
|
externalTurnedOn[i] = 0;
|
|
|
|
|
LOG_INFO("%d ", i);
|
2022-12-27 21:51:35 +01:00
|
|
|
}
|
2024-09-27 15:14:22 +02:00
|
|
|
#ifdef HAS_I2S
|
|
|
|
|
// GPIO0 is used as mclk for I2S audio and set to OUTPUT by the sound library
|
|
|
|
|
// T-Deck uses GPIO0 as trackball button, so restore the mode
|
|
|
|
|
#if defined(T_DECK) || (defined(BUTTON_PIN) && BUTTON_PIN == 0)
|
|
|
|
|
pinMode(0, INPUT);
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
2023-01-04 14:45:28 +01:00
|
|
|
isNagging = false;
|
2022-12-27 21:51:35 +01:00
|
|
|
return INT32_MAX; // save cycles till we're needed again
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-13 13:32:23 +08:00
|
|
|
// If the output is turned on, turn it back off after the given period of time.
|
2023-01-04 14:45:28 +01:00
|
|
|
if (isNagging) {
|
2025-09-28 13:17:57 +13:00
|
|
|
delay = (moduleConfig.external_notification.output_ms ? moduleConfig.external_notification.output_ms
|
|
|
|
|
: EXT_NOTIFICATION_MODULE_OUTPUT_MS);
|
|
|
|
|
if (externalTurnedOn[0] + delay < millis()) {
|
2024-10-29 21:41:21 +11:00
|
|
|
setExternalState(0, !getExternal(0));
|
2022-12-08 16:27:56 +01:00
|
|
|
}
|
2025-09-28 13:17:57 +13:00
|
|
|
if (externalTurnedOn[1] + delay < millis()) {
|
2024-11-17 14:36:06 +01:00
|
|
|
setExternalState(1, !getExternal(1));
|
2022-12-08 16:27:56 +01:00
|
|
|
}
|
2025-07-21 06:49:08 +08:00
|
|
|
// Only toggle buzzer output if not using PWM mode (to avoid conflict with RTTTL)
|
2025-09-28 13:17:57 +13:00
|
|
|
if (!moduleConfig.external_notification.use_pwm && externalTurnedOn[2] + delay < millis()) {
|
2024-11-28 13:34:09 +02:00
|
|
|
LOG_DEBUG("EXTERNAL 2 %d compared to %d", externalTurnedOn[2] + moduleConfig.external_notification.output_ms,
|
|
|
|
|
millis());
|
2024-11-17 14:36:06 +01:00
|
|
|
setExternalState(2, !getExternal(2));
|
2022-12-08 16:27:56 +01:00
|
|
|
}
|
2025-04-01 22:39:40 +02:00
|
|
|
#if defined(HAS_RGB_LED)
|
2024-04-21 08:24:51 +01:00
|
|
|
red = (colorState & 4) ? brightnessValues[brightnessIndex] : 0; // Red enabled on colorState = 4,5,6,7
|
|
|
|
|
green = (colorState & 2) ? brightnessValues[brightnessIndex] : 0; // Green enabled on colorState = 2,3,6,7
|
|
|
|
|
blue = (colorState & 1) ? (brightnessValues[brightnessIndex] * 1.5) : 0; // Blue enabled on colorState = 1,3,5,7
|
2025-04-01 22:39:40 +02:00
|
|
|
white = (colorState & 12) ? brightnessValues[brightnessIndex] : 0;
|
2023-07-03 16:34:32 +02:00
|
|
|
#ifdef HAS_NCP5623
|
2023-05-06 07:17:40 -05:00
|
|
|
if (rgb_found.type == ScanI2C::NCP5623) {
|
|
|
|
|
rgb.setColor(red, green, blue);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
2025-04-01 22:39:40 +02:00
|
|
|
#ifdef HAS_LP5562
|
|
|
|
|
if (rgb_found.type == ScanI2C::LP5562) {
|
|
|
|
|
rgbw.setColor(red, green, blue, white);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
2024-04-21 08:24:51 +01:00
|
|
|
#ifdef RGBLED_CA
|
|
|
|
|
analogWrite(RGBLED_RED, 255 - red); // CA type needs reverse logic
|
|
|
|
|
analogWrite(RGBLED_GREEN, 255 - green);
|
|
|
|
|
analogWrite(RGBLED_BLUE, 255 - blue);
|
|
|
|
|
#elif defined(RGBLED_RED)
|
2024-04-18 22:00:33 +01:00
|
|
|
analogWrite(RGBLED_RED, red);
|
|
|
|
|
analogWrite(RGBLED_GREEN, green);
|
|
|
|
|
analogWrite(RGBLED_BLUE, blue);
|
2024-04-22 14:42:52 +01:00
|
|
|
#endif
|
|
|
|
|
#ifdef HAS_NEOPIXEL
|
|
|
|
|
pixels.fill(pixels.Color(red, green, blue), 0, NEOPIXEL_COUNT);
|
|
|
|
|
pixels.show();
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef UNPHONE
|
|
|
|
|
unphone.rgb(red, green, blue);
|
2024-04-21 08:24:51 +01:00
|
|
|
#endif
|
2024-04-18 22:00:33 +01:00
|
|
|
if (ascending) { // fade in
|
|
|
|
|
brightnessIndex++;
|
|
|
|
|
if (brightnessIndex == (sizeof(brightnessValues) - 1)) {
|
|
|
|
|
ascending = false;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
brightnessIndex--; // fade out
|
|
|
|
|
}
|
|
|
|
|
if (brightnessIndex == 0) {
|
|
|
|
|
ascending = true;
|
|
|
|
|
colorState++; // next color
|
|
|
|
|
if (colorState > 7) {
|
|
|
|
|
colorState = 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-09-28 13:17:57 +13:00
|
|
|
// we need fast updates for the color change
|
|
|
|
|
delay = EXT_NOTIFICATION_FAST_THREAD_MS;
|
2024-04-18 22:00:33 +01:00
|
|
|
#endif
|
|
|
|
|
|
2023-07-22 09:26:54 -05:00
|
|
|
#ifdef T_WATCH_S3
|
2024-04-21 08:59:40 +01:00
|
|
|
drv.go();
|
2023-07-22 09:26:54 -05:00
|
|
|
#endif
|
2024-04-21 08:59:40 +01:00
|
|
|
}
|
2022-12-28 14:57:40 +01:00
|
|
|
|
2024-04-21 08:59:40 +01:00
|
|
|
// Play RTTTL over i2s audio interface if enabled as buzzer
|
2023-12-12 08:36:37 -06:00
|
|
|
#ifdef HAS_I2S
|
2025-09-28 13:17:57 +13:00
|
|
|
if (moduleConfig.external_notification.use_i2s_as_buzzer) {
|
2024-04-21 08:59:40 +01:00
|
|
|
if (audioThread->isPlaying()) {
|
|
|
|
|
// Continue playing
|
|
|
|
|
} else if (isNagging && (nagCycleCutoff >= millis())) {
|
|
|
|
|
audioThread->beginRttl(rtttlConfig.ringtone, strlen_P(rtttlConfig.ringtone));
|
|
|
|
|
}
|
2025-09-28 13:17:57 +13:00
|
|
|
// we need fast updates to play the RTTTL
|
|
|
|
|
delay = EXT_NOTIFICATION_FAST_THREAD_MS;
|
2023-12-12 08:36:37 -06:00
|
|
|
}
|
|
|
|
|
#endif
|
2024-04-21 08:59:40 +01:00
|
|
|
// now let the PWM buzzer play
|
Unify the native display config between legacy display and MUI (#6838)
* Add missed include
* Another Warning fix
* Add another HAS_SCREEN
* Namespace fixes
* Removed depricated destination types and re-factored destination screen
* Get rid of Arduino Strings
* Clean up after Copilot
* SixthLine Def, Screen Rename
Added Sixth Line Definition Screen Rename, and Automatic Line Adjustment
* Consistency is hard - fixed "Sixth"
* System Frame Updates
Adjusted line construction to ensure we fit maximum content per screen.
* Fix up notifications
* Add a couple more ifdef HAS_SCREEN lines
* Add screen->isOverlayBannerShowing()
* Don't forget the invert!
* Adjust Nodelist Center Divider
Adjust Nodelist Center Divider
* Fix variable casting
* Fix entryText variable as empty before update to fix validation
* Altitude is int32_t
* Update PowerTelemetry to have correct data type
* Fix cppcheck warnings (#6945)
* Fix cppcheck warnings
* Adjust logic in Power.cpp for power sensor
---------
Co-authored-by: Jason P <applewiz@mac.com>
* More pixel wrangling so things line up NodeList edition
* Adjust NodeList alignments and plumb some background padding for a possible title fix
* Better alignment for banner notifications
* Move title into drawCommonHeader; initial screen tested
* Fonts make spacing items difficult
* Improved beeping booping and other buzzer based feedback (#6947)
* Improved beeping booping and other buzzer based feedback
* audible button feedback (#6949)
* Refactor
---------
Co-authored-by: todd-herbert <herbert.todd@gmail.com>
* Sandpapered the corners of the notification popup
* Finalize drawCommonHeader migration
* Update Title of Favorite Node Screens
* Update node metric alignment on LoRa screen
* Update the border for popups to separate it from background
* Update PaxcounterModule.cpp with CommonHeader
* Update WiFi screen with CommonHeader and related data reflow
* It was not, in fact, pointing up
* Fix build on wismeshtap
* T-deck trackball debounce
* Fix uptime on Device Focused page to actually detail
* Update Sys screen for new uptime, add label to Freq/Chan on LoRa
* Don't display DOP any longer, make Uptime consistent
* Revert Uptime change on Favorites, Apply to Device Focused
* Label the satelite number to avoid confusion
* Boop boop boop boop
* Correct GPS positioning and string consistency across strings for GPS
* Fix GPS text alignment
* Enable canned messages by default
* Don't wake screen on new nodes
* Cannedmessage list emote support added
* Fn+e emote picker for freetext screen
* Actually block CannedInput actions while display is shown
* Add selection menu to bannerOverlay
* Off by one
* Move to unified text layouts and spacing
* Still my Fav without an "e"
* Fully remove EVENT_NODEDB_UPDATED
* Simply LoRa screen
* Make some char pointers const to fix compilation on native targets
* Update drawCompassNorth to include radius
* Fix warning
* button thread cleanup
* Pull OneButton handling from PowerFSM and add MUI switch (#6973)
* Trunk
* Onebutton Menu Support
* Add temporary clock icon
* Add gps location to fsi
* Banner message state reset
* Cast to char to satisfy compiler
* Better fast handling of input during banner
* Fix warning
* Derp
* oops
* Update ref
* Wire buzzer_mode
* remove legacy string->print()
* Only init screen if one found
* Unsigned Char
* More buttonThread cleaning
* screen.cpp button handling cleanup
* The Great Event Rename of 2025
* Fix the Radiomaster
* Missed trackball type change
* Remove unused function
* Make ButtonThread an InputBroker
* Coffee hadn't kicked in yet
* Add clock icon for Navigation Bar
* Restore clock screen definition code - whoops
* ExternalNotifications now observe inputBroker
* Clock rework (#6992)
* Move Clock bits into ClockRenderer space
* Rework clock into all device navigation
* T-Watch Actually Builds Different
* Compile fix
---------
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
* Add AM/PM to Digital Clock
* Flip Seconds and AM/PM on Clock Display
* Tik-tok pixels are hard
* Fix builds on Thinknode M1
* Check for GPS and don't crash
* Don't endif til the end
* Rework the OneButton thread to be much less of a mess. (#6997)
* Rework the OneButton thread to be much less of a mess. And break lots of targets temporarily
* Update src/input/ButtonThread.h
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix GPS toggle
* Send the shutdown event, not just the kbchar
* Honor the back button in a notificaiton popup
* Draw the right size box for popup with options
* Try to un-break all the things
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* 24-hour Clock Should have leading zero, but not 12-hour
* Fixup some compile errors
* Add intRoutine to ButtonThread init, to get more responsive user button back
* Add Timezone picker
* Fix Warning
* Optionally set the initial selection for the chooser popup
* Make back buttons work in canned messages
* Drop the wrapper classes
* LonPressTime now configurable
* Clock Frame can not longer be blank; just add valid time
* Back buttons everywhere!
* Key Verification confirm banner
* Make Elecrow M* top button a back button
* Add settings saves
* EInk responsiveness fixes
* Linux Input Fixes
* Add Native Trackball/Joystick support, and move UserButton to Input
* No Flight Stick Mode
* Send input event
* Add Channel Utilization to Device Focused frame
* Don't shift screens when we draw new ones
* Add showOverlayBanner arguments to no-op
* trunk
* Default Native trackball to NC
* Fix crash in simulator mode
* Add longLong button press
* Get the args right
* Adjust Bluetooth Pairing Screen to account for bottom navigation.
* Trackball everywhere, and unPhone buttons
* Remap visionmaster secondary button to TB_UP
* Kill ScanAndSelect
* trunk
* No longer need the canned messages input filter
* All Canned All the time
* Fix stm32 compile error regarding inputBroker
* Unify tft lineheights (#7033)
* Create variable line heights based upon SCREEN_HEIGHT
* Refactor textPositions into method -> getTextPositions
* Update SharedUIDisplay.h
---------
Co-authored-by: Jason P <applewiz@mac.com>
* Adjust top distance for larger displays
* Adjust icon sizes for larger displays
* Fix Paxcounter compile errors after code updates
* Pixel wrangling to make larger screens fit better
* Alert frame has precedence over banner -- for now
* Unify on ALT_BUTTON
* Align AM/PM to the digit, not the segment on larger displays
* Move some global pin defines into configuration.h
* Scaffolding for BMM150 9-axis gyro
* Alt button behavior
* Don't add the blank GPS frames without HAS_GPS
* EVENT_NODEDB_UPDATED has been retired
* Clean out LOG_WARN messages from debugging
* Add dismiss message function
* Minor buttonThread cleanup
* Add BMM150 support
* Clean up last warning from dev
* Simplify bmm150 init return logic
* Add option to reply to messages
* Add minimal menu upon selecting home screen
* Move Messages to slot 2, rename GPS to Position, move variables nearer functional usage in Screen.cpp
* Properly dismiss message
* T-Deck Trackball press is not user button
* Add select on favorite frame to launch cannedMessage DM
* Minor wording change
* Less capital letters
* Fix empty message check, time isn't reliable
* drop dead code
* Make UIRenderer a static class instead of namespace
* Fix the select on favorite
* Check if message is empty early and then 'return'
* Add kb_found, and show the option to launch freetype if appropriate
* Ignore impossible touchscreen touches
* Auto scroll fix
* Move linebreak after "from" for banners to maximize screen usage.
* Center "No messages to show" on Message frame
* Start consolidating buzzer behavior
* Fixed signed / unsigned warning
* Cast second parameter of max() to make some targets happy
* Cast kbchar to (char) to make arduino string happy
* Shorten the notice of "No messages"
* Add buzzer mode chooser
* Add regionPicker to Lora icon
* Reduce line spacing and reorder Position screen to resolve overlapping issues
* Update message titles, fix GPS icons, add Back options
* Leftover boops
* Remove chirp
* Make the region selection dismissable when a region is already set
* Add read-aloud functionality on messages w/ esp8266sam
* "Last Heard" is a better label
* tweak the beep
* 5 options
* properly tear down freetext upon cancel
* de-convelute canned messages just a bit
* Correct height of Mail icon in navigation bar
* Remove unused warning
* Consolidate time methods into TimeFormatters
* Oops
* Change LoRa Picker Cancel to Back
* Tweak selection characters on Banner
* Message render not scrolling on 5th line
* More fixes for message scrolling
* Remove the safety next on text overflow - we found that root cause
* Add pin definitions to fix compilation for obscure target
* Don't let the touchscreen send unitialized kbchar values
* Make virtual KB just a bit quicker
* No more double tap, swipe!
* Left is left, and Right is right
* Update horizontal lightning bolt design
* Move from solid to dashed separator for Message Frame
* Single emote feature fix
* Manually sort overlapping elements for now
* Freetext and clearer choices
* Fix ESP32 InkHUD builds on the unify-tft branch (#7087)
* Remove BaseUI branding
* Capitalization is fun
* Revert Meshtastic Boot Frame Changes
* Add ANZ_433 LoRa region to picker
* Update settings.json
---------
Co-authored-by: HarukiToreda <116696711+HarukiToreda@users.noreply.github.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Jason P <applewiz@mac.com>
Co-authored-by: todd-herbert <herbert.todd@gmail.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-21 06:36:04 -05:00
|
|
|
if (moduleConfig.external_notification.use_pwm && config.device.buzzer_gpio && canBuzz()) {
|
2024-04-21 08:59:40 +01:00
|
|
|
if (rtttl::isPlaying()) {
|
|
|
|
|
rtttl::play();
|
|
|
|
|
} else if (isNagging && (nagCycleCutoff >= millis())) {
|
|
|
|
|
// start the song again if we have time left
|
|
|
|
|
rtttl::begin(config.device.buzzer_gpio, rtttlConfig.ringtone);
|
|
|
|
|
}
|
2025-09-28 13:17:57 +13:00
|
|
|
// we need fast updates to play the RTTTL
|
|
|
|
|
delay = EXT_NOTIFICATION_FAST_THREAD_MS;
|
2022-12-28 14:57:40 +01:00
|
|
|
}
|
2024-04-21 08:24:51 +01:00
|
|
|
|
2025-09-28 13:17:57 +13:00
|
|
|
return delay;
|
2024-04-21 08:59:40 +01:00
|
|
|
}
|
2021-01-27 19:18:16 -08:00
|
|
|
}
|
|
|
|
|
|
Unify the native display config between legacy display and MUI (#6838)
* Add missed include
* Another Warning fix
* Add another HAS_SCREEN
* Namespace fixes
* Removed depricated destination types and re-factored destination screen
* Get rid of Arduino Strings
* Clean up after Copilot
* SixthLine Def, Screen Rename
Added Sixth Line Definition Screen Rename, and Automatic Line Adjustment
* Consistency is hard - fixed "Sixth"
* System Frame Updates
Adjusted line construction to ensure we fit maximum content per screen.
* Fix up notifications
* Add a couple more ifdef HAS_SCREEN lines
* Add screen->isOverlayBannerShowing()
* Don't forget the invert!
* Adjust Nodelist Center Divider
Adjust Nodelist Center Divider
* Fix variable casting
* Fix entryText variable as empty before update to fix validation
* Altitude is int32_t
* Update PowerTelemetry to have correct data type
* Fix cppcheck warnings (#6945)
* Fix cppcheck warnings
* Adjust logic in Power.cpp for power sensor
---------
Co-authored-by: Jason P <applewiz@mac.com>
* More pixel wrangling so things line up NodeList edition
* Adjust NodeList alignments and plumb some background padding for a possible title fix
* Better alignment for banner notifications
* Move title into drawCommonHeader; initial screen tested
* Fonts make spacing items difficult
* Improved beeping booping and other buzzer based feedback (#6947)
* Improved beeping booping and other buzzer based feedback
* audible button feedback (#6949)
* Refactor
---------
Co-authored-by: todd-herbert <herbert.todd@gmail.com>
* Sandpapered the corners of the notification popup
* Finalize drawCommonHeader migration
* Update Title of Favorite Node Screens
* Update node metric alignment on LoRa screen
* Update the border for popups to separate it from background
* Update PaxcounterModule.cpp with CommonHeader
* Update WiFi screen with CommonHeader and related data reflow
* It was not, in fact, pointing up
* Fix build on wismeshtap
* T-deck trackball debounce
* Fix uptime on Device Focused page to actually detail
* Update Sys screen for new uptime, add label to Freq/Chan on LoRa
* Don't display DOP any longer, make Uptime consistent
* Revert Uptime change on Favorites, Apply to Device Focused
* Label the satelite number to avoid confusion
* Boop boop boop boop
* Correct GPS positioning and string consistency across strings for GPS
* Fix GPS text alignment
* Enable canned messages by default
* Don't wake screen on new nodes
* Cannedmessage list emote support added
* Fn+e emote picker for freetext screen
* Actually block CannedInput actions while display is shown
* Add selection menu to bannerOverlay
* Off by one
* Move to unified text layouts and spacing
* Still my Fav without an "e"
* Fully remove EVENT_NODEDB_UPDATED
* Simply LoRa screen
* Make some char pointers const to fix compilation on native targets
* Update drawCompassNorth to include radius
* Fix warning
* button thread cleanup
* Pull OneButton handling from PowerFSM and add MUI switch (#6973)
* Trunk
* Onebutton Menu Support
* Add temporary clock icon
* Add gps location to fsi
* Banner message state reset
* Cast to char to satisfy compiler
* Better fast handling of input during banner
* Fix warning
* Derp
* oops
* Update ref
* Wire buzzer_mode
* remove legacy string->print()
* Only init screen if one found
* Unsigned Char
* More buttonThread cleaning
* screen.cpp button handling cleanup
* The Great Event Rename of 2025
* Fix the Radiomaster
* Missed trackball type change
* Remove unused function
* Make ButtonThread an InputBroker
* Coffee hadn't kicked in yet
* Add clock icon for Navigation Bar
* Restore clock screen definition code - whoops
* ExternalNotifications now observe inputBroker
* Clock rework (#6992)
* Move Clock bits into ClockRenderer space
* Rework clock into all device navigation
* T-Watch Actually Builds Different
* Compile fix
---------
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
* Add AM/PM to Digital Clock
* Flip Seconds and AM/PM on Clock Display
* Tik-tok pixels are hard
* Fix builds on Thinknode M1
* Check for GPS and don't crash
* Don't endif til the end
* Rework the OneButton thread to be much less of a mess. (#6997)
* Rework the OneButton thread to be much less of a mess. And break lots of targets temporarily
* Update src/input/ButtonThread.h
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix GPS toggle
* Send the shutdown event, not just the kbchar
* Honor the back button in a notificaiton popup
* Draw the right size box for popup with options
* Try to un-break all the things
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* 24-hour Clock Should have leading zero, but not 12-hour
* Fixup some compile errors
* Add intRoutine to ButtonThread init, to get more responsive user button back
* Add Timezone picker
* Fix Warning
* Optionally set the initial selection for the chooser popup
* Make back buttons work in canned messages
* Drop the wrapper classes
* LonPressTime now configurable
* Clock Frame can not longer be blank; just add valid time
* Back buttons everywhere!
* Key Verification confirm banner
* Make Elecrow M* top button a back button
* Add settings saves
* EInk responsiveness fixes
* Linux Input Fixes
* Add Native Trackball/Joystick support, and move UserButton to Input
* No Flight Stick Mode
* Send input event
* Add Channel Utilization to Device Focused frame
* Don't shift screens when we draw new ones
* Add showOverlayBanner arguments to no-op
* trunk
* Default Native trackball to NC
* Fix crash in simulator mode
* Add longLong button press
* Get the args right
* Adjust Bluetooth Pairing Screen to account for bottom navigation.
* Trackball everywhere, and unPhone buttons
* Remap visionmaster secondary button to TB_UP
* Kill ScanAndSelect
* trunk
* No longer need the canned messages input filter
* All Canned All the time
* Fix stm32 compile error regarding inputBroker
* Unify tft lineheights (#7033)
* Create variable line heights based upon SCREEN_HEIGHT
* Refactor textPositions into method -> getTextPositions
* Update SharedUIDisplay.h
---------
Co-authored-by: Jason P <applewiz@mac.com>
* Adjust top distance for larger displays
* Adjust icon sizes for larger displays
* Fix Paxcounter compile errors after code updates
* Pixel wrangling to make larger screens fit better
* Alert frame has precedence over banner -- for now
* Unify on ALT_BUTTON
* Align AM/PM to the digit, not the segment on larger displays
* Move some global pin defines into configuration.h
* Scaffolding for BMM150 9-axis gyro
* Alt button behavior
* Don't add the blank GPS frames without HAS_GPS
* EVENT_NODEDB_UPDATED has been retired
* Clean out LOG_WARN messages from debugging
* Add dismiss message function
* Minor buttonThread cleanup
* Add BMM150 support
* Clean up last warning from dev
* Simplify bmm150 init return logic
* Add option to reply to messages
* Add minimal menu upon selecting home screen
* Move Messages to slot 2, rename GPS to Position, move variables nearer functional usage in Screen.cpp
* Properly dismiss message
* T-Deck Trackball press is not user button
* Add select on favorite frame to launch cannedMessage DM
* Minor wording change
* Less capital letters
* Fix empty message check, time isn't reliable
* drop dead code
* Make UIRenderer a static class instead of namespace
* Fix the select on favorite
* Check if message is empty early and then 'return'
* Add kb_found, and show the option to launch freetype if appropriate
* Ignore impossible touchscreen touches
* Auto scroll fix
* Move linebreak after "from" for banners to maximize screen usage.
* Center "No messages to show" on Message frame
* Start consolidating buzzer behavior
* Fixed signed / unsigned warning
* Cast second parameter of max() to make some targets happy
* Cast kbchar to (char) to make arduino string happy
* Shorten the notice of "No messages"
* Add buzzer mode chooser
* Add regionPicker to Lora icon
* Reduce line spacing and reorder Position screen to resolve overlapping issues
* Update message titles, fix GPS icons, add Back options
* Leftover boops
* Remove chirp
* Make the region selection dismissable when a region is already set
* Add read-aloud functionality on messages w/ esp8266sam
* "Last Heard" is a better label
* tweak the beep
* 5 options
* properly tear down freetext upon cancel
* de-convelute canned messages just a bit
* Correct height of Mail icon in navigation bar
* Remove unused warning
* Consolidate time methods into TimeFormatters
* Oops
* Change LoRa Picker Cancel to Back
* Tweak selection characters on Banner
* Message render not scrolling on 5th line
* More fixes for message scrolling
* Remove the safety next on text overflow - we found that root cause
* Add pin definitions to fix compilation for obscure target
* Don't let the touchscreen send unitialized kbchar values
* Make virtual KB just a bit quicker
* No more double tap, swipe!
* Left is left, and Right is right
* Update horizontal lightning bolt design
* Move from solid to dashed separator for Message Frame
* Single emote feature fix
* Manually sort overlapping elements for now
* Freetext and clearer choices
* Fix ESP32 InkHUD builds on the unify-tft branch (#7087)
* Remove BaseUI branding
* Capitalization is fun
* Revert Meshtastic Boot Frame Changes
* Add ANZ_433 LoRa region to picker
* Update settings.json
---------
Co-authored-by: HarukiToreda <116696711+HarukiToreda@users.noreply.github.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Jason P <applewiz@mac.com>
Co-authored-by: todd-herbert <herbert.todd@gmail.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-21 06:36:04 -05:00
|
|
|
/**
|
|
|
|
|
* Based on buzzer mode, return true if we can buzz.
|
|
|
|
|
*/
|
|
|
|
|
bool ExternalNotificationModule::canBuzz()
|
|
|
|
|
{
|
|
|
|
|
if (config.device.buzzer_mode != meshtastic_Config_DeviceConfig_BuzzerMode_DISABLED &&
|
|
|
|
|
config.device.buzzer_mode != meshtastic_Config_DeviceConfig_BuzzerMode_SYSTEM_ONLY) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-19 07:46:34 -05:00
|
|
|
bool ExternalNotificationModule::wantPacket(const meshtastic_MeshPacket *p)
|
|
|
|
|
{
|
|
|
|
|
return MeshService::isTextPayload(p);
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-26 16:34:36 -07:00
|
|
|
/**
|
2024-10-29 21:41:21 +11:00
|
|
|
* Sets the external notification for the specified index.
|
2023-07-26 16:34:36 -07:00
|
|
|
*
|
2024-10-29 21:41:21 +11:00
|
|
|
* @param index The index of the external notification to change state.
|
|
|
|
|
* @param on Whether we are turning things on (true) or off (false).
|
2023-07-26 16:34:36 -07:00
|
|
|
*/
|
2024-10-29 21:41:21 +11:00
|
|
|
void ExternalNotificationModule::setExternalState(uint8_t index, bool on)
|
2021-01-27 20:06:39 -08:00
|
|
|
{
|
2024-10-29 21:41:21 +11:00
|
|
|
externalCurrentState[index] = on;
|
2022-12-08 16:27:56 +01:00
|
|
|
externalTurnedOn[index] = millis();
|
|
|
|
|
|
2023-01-18 14:51:48 -06:00
|
|
|
switch (index) {
|
|
|
|
|
case 1:
|
2024-04-18 09:22:31 +01:00
|
|
|
#ifdef UNPHONE
|
2024-10-29 21:41:21 +11:00
|
|
|
unphone.vibe(on); // the unPhone's vibration motor is on a i2c GPIO expander
|
2024-04-18 09:22:31 +01:00
|
|
|
#endif
|
2023-01-18 14:51:48 -06:00
|
|
|
if (moduleConfig.external_notification.output_vibra)
|
2024-10-29 21:41:21 +11:00
|
|
|
digitalWrite(moduleConfig.external_notification.output_vibra, on);
|
2023-01-18 14:51:48 -06:00
|
|
|
break;
|
|
|
|
|
case 2:
|
2025-07-21 06:49:08 +08:00
|
|
|
// Only control buzzer pin digitally if not using PWM mode
|
|
|
|
|
if (moduleConfig.external_notification.output_buzzer && !moduleConfig.external_notification.use_pwm)
|
2024-10-29 21:41:21 +11:00
|
|
|
digitalWrite(moduleConfig.external_notification.output_buzzer, on);
|
2023-01-18 14:51:48 -06:00
|
|
|
break;
|
|
|
|
|
default:
|
2023-07-22 09:26:54 -05:00
|
|
|
if (output > 0)
|
2024-10-29 21:41:21 +11:00
|
|
|
digitalWrite(output, (moduleConfig.external_notification.active ? on : !on));
|
2023-01-18 14:51:48 -06:00
|
|
|
break;
|
2022-12-08 16:27:56 +01:00
|
|
|
}
|
2023-12-12 08:36:37 -06:00
|
|
|
|
2025-04-01 22:39:40 +02:00
|
|
|
#if defined(HAS_RGB_LED)
|
2024-10-29 21:41:21 +11:00
|
|
|
if (!on) {
|
|
|
|
|
red = 0;
|
|
|
|
|
green = 0;
|
|
|
|
|
blue = 0;
|
2025-04-01 22:39:40 +02:00
|
|
|
white = 0;
|
2023-05-06 07:17:40 -05:00
|
|
|
}
|
|
|
|
|
#endif
|
2021-01-27 20:06:39 -08:00
|
|
|
|
2023-07-03 16:34:32 +02:00
|
|
|
#ifdef HAS_NCP5623
|
2023-05-06 07:17:40 -05:00
|
|
|
if (rgb_found.type == ScanI2C::NCP5623) {
|
|
|
|
|
rgb.setColor(red, green, blue);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
2025-04-01 22:39:40 +02:00
|
|
|
#ifdef HAS_LP5562
|
|
|
|
|
if (rgb_found.type == ScanI2C::LP5562) {
|
|
|
|
|
rgbw.setColor(red, green, blue, white);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
2024-04-21 08:24:51 +01:00
|
|
|
#ifdef RGBLED_CA
|
|
|
|
|
analogWrite(RGBLED_RED, 255 - red); // CA type needs reverse logic
|
2024-04-18 22:00:33 +01:00
|
|
|
analogWrite(RGBLED_GREEN, 255 - green);
|
|
|
|
|
analogWrite(RGBLED_BLUE, 255 - blue);
|
2024-04-22 14:42:52 +01:00
|
|
|
#elif defined(RGBLED_RED)
|
2024-04-18 22:00:33 +01:00
|
|
|
analogWrite(RGBLED_RED, red);
|
|
|
|
|
analogWrite(RGBLED_GREEN, green);
|
|
|
|
|
analogWrite(RGBLED_BLUE, blue);
|
|
|
|
|
#endif
|
2024-04-22 14:42:52 +01:00
|
|
|
#ifdef HAS_NEOPIXEL
|
|
|
|
|
pixels.fill(pixels.Color(red, green, blue), 0, NEOPIXEL_COUNT);
|
|
|
|
|
pixels.show();
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef UNPHONE
|
|
|
|
|
unphone.rgb(red, green, blue);
|
|
|
|
|
#endif
|
2023-07-22 09:26:54 -05:00
|
|
|
#ifdef T_WATCH_S3
|
2024-10-29 21:41:21 +11:00
|
|
|
if (on) {
|
|
|
|
|
drv.go();
|
|
|
|
|
} else {
|
|
|
|
|
drv.stop();
|
|
|
|
|
}
|
2023-07-22 09:26:54 -05:00
|
|
|
#endif
|
2022-12-08 16:27:56 +01:00
|
|
|
}
|
2021-01-27 21:20:18 -08:00
|
|
|
|
2022-12-08 16:27:56 +01:00
|
|
|
bool ExternalNotificationModule::getExternal(uint8_t index)
|
|
|
|
|
{
|
|
|
|
|
return externalCurrentState[index];
|
2021-01-27 20:06:39 -08:00
|
|
|
}
|
|
|
|
|
|
2025-06-16 23:09:55 +12:00
|
|
|
// Allow other firmware components to determine whether a notification is ongoing
|
|
|
|
|
bool ExternalNotificationModule::nagging()
|
|
|
|
|
{
|
|
|
|
|
return isNagging;
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-18 14:51:48 -06:00
|
|
|
void ExternalNotificationModule::stopNow()
|
|
|
|
|
{
|
2022-12-28 14:57:40 +01:00
|
|
|
rtttl::stop();
|
2023-12-12 08:36:37 -06:00
|
|
|
#ifdef HAS_I2S
|
2024-04-21 15:41:22 -04:00
|
|
|
if (audioThread->isPlaying())
|
|
|
|
|
audioThread->stop();
|
2023-12-12 08:36:37 -06:00
|
|
|
#endif
|
2022-12-28 14:57:40 +01:00
|
|
|
nagCycleCutoff = 1; // small value
|
2023-01-04 14:45:28 +01:00
|
|
|
isNagging = false;
|
2025-07-21 06:49:08 +08:00
|
|
|
// Turn off all outputs
|
|
|
|
|
for (int i = 0; i < 3; i++) {
|
|
|
|
|
setExternalState(i, false);
|
|
|
|
|
externalTurnedOn[i] = 0;
|
|
|
|
|
}
|
2022-12-28 14:57:40 +01:00
|
|
|
setIntervalFromNow(0);
|
2023-07-22 09:26:54 -05:00
|
|
|
#ifdef T_WATCH_S3
|
|
|
|
|
drv.stop();
|
|
|
|
|
#endif
|
2022-12-28 14:57:40 +01:00
|
|
|
}
|
2021-01-27 19:18:16 -08:00
|
|
|
|
2022-02-27 01:49:24 -08:00
|
|
|
ExternalNotificationModule::ExternalNotificationModule()
|
2023-08-19 07:46:34 -05:00
|
|
|
: SinglePortModule("ExternalNotificationModule", meshtastic_PortNum_TEXT_MESSAGE_APP),
|
2024-11-04 12:16:25 -06:00
|
|
|
concurrency::OSThread("ExternalNotification")
|
2021-03-13 13:32:23 +08:00
|
|
|
{
|
|
|
|
|
/*
|
2022-02-27 01:49:24 -08:00
|
|
|
Uncomment the preferences below if you want to use the module
|
2021-03-13 13:32:23 +08:00
|
|
|
without having to configure it from the PythonAPI or WebUI.
|
|
|
|
|
*/
|
|
|
|
|
|
2022-12-16 20:33:09 +01:00
|
|
|
// moduleConfig.external_notification.alert_message = true;
|
|
|
|
|
// moduleConfig.external_notification.alert_message_buzzer = true;
|
|
|
|
|
// moduleConfig.external_notification.alert_message_vibra = true;
|
2023-12-12 08:36:37 -06:00
|
|
|
// moduleConfig.external_notification.use_i2s_as_buzzer = true;
|
2021-03-13 13:32:23 +08:00
|
|
|
|
2022-12-16 20:33:09 +01:00
|
|
|
// moduleConfig.external_notification.active = true;
|
2022-05-22 13:27:56 +02:00
|
|
|
// moduleConfig.external_notification.alert_bell = 1;
|
|
|
|
|
// moduleConfig.external_notification.output_ms = 1000;
|
2022-12-16 20:33:09 +01:00
|
|
|
// moduleConfig.external_notification.output = 4; // RAK4631 IO4
|
|
|
|
|
// moduleConfig.external_notification.output_buzzer = 10; // RAK4631 IO6
|
|
|
|
|
// moduleConfig.external_notification.output_vibra = 28; // RAK4631 IO7
|
|
|
|
|
// moduleConfig.external_notification.nag_timeout = 300;
|
2023-01-18 14:51:48 -06:00
|
|
|
|
2023-12-12 08:36:37 -06:00
|
|
|
// T-Watch / T-Deck i2s audio as buzzer:
|
|
|
|
|
// moduleConfig.external_notification.enabled = true;
|
|
|
|
|
// moduleConfig.external_notification.nag_timeout = 300;
|
|
|
|
|
// moduleConfig.external_notification.output_ms = 1000;
|
|
|
|
|
// moduleConfig.external_notification.use_i2s_as_buzzer = true;
|
|
|
|
|
// moduleConfig.external_notification.alert_message_buzzer = true;
|
|
|
|
|
|
2022-05-22 13:27:56 +02:00
|
|
|
if (moduleConfig.external_notification.enabled) {
|
2025-09-02 13:08:57 +01:00
|
|
|
#if !defined(MESHTASTIC_EXCLUDE_INPUTBROKER)
|
Unify the native display config between legacy display and MUI (#6838)
* Add missed include
* Another Warning fix
* Add another HAS_SCREEN
* Namespace fixes
* Removed depricated destination types and re-factored destination screen
* Get rid of Arduino Strings
* Clean up after Copilot
* SixthLine Def, Screen Rename
Added Sixth Line Definition Screen Rename, and Automatic Line Adjustment
* Consistency is hard - fixed "Sixth"
* System Frame Updates
Adjusted line construction to ensure we fit maximum content per screen.
* Fix up notifications
* Add a couple more ifdef HAS_SCREEN lines
* Add screen->isOverlayBannerShowing()
* Don't forget the invert!
* Adjust Nodelist Center Divider
Adjust Nodelist Center Divider
* Fix variable casting
* Fix entryText variable as empty before update to fix validation
* Altitude is int32_t
* Update PowerTelemetry to have correct data type
* Fix cppcheck warnings (#6945)
* Fix cppcheck warnings
* Adjust logic in Power.cpp for power sensor
---------
Co-authored-by: Jason P <applewiz@mac.com>
* More pixel wrangling so things line up NodeList edition
* Adjust NodeList alignments and plumb some background padding for a possible title fix
* Better alignment for banner notifications
* Move title into drawCommonHeader; initial screen tested
* Fonts make spacing items difficult
* Improved beeping booping and other buzzer based feedback (#6947)
* Improved beeping booping and other buzzer based feedback
* audible button feedback (#6949)
* Refactor
---------
Co-authored-by: todd-herbert <herbert.todd@gmail.com>
* Sandpapered the corners of the notification popup
* Finalize drawCommonHeader migration
* Update Title of Favorite Node Screens
* Update node metric alignment on LoRa screen
* Update the border for popups to separate it from background
* Update PaxcounterModule.cpp with CommonHeader
* Update WiFi screen with CommonHeader and related data reflow
* It was not, in fact, pointing up
* Fix build on wismeshtap
* T-deck trackball debounce
* Fix uptime on Device Focused page to actually detail
* Update Sys screen for new uptime, add label to Freq/Chan on LoRa
* Don't display DOP any longer, make Uptime consistent
* Revert Uptime change on Favorites, Apply to Device Focused
* Label the satelite number to avoid confusion
* Boop boop boop boop
* Correct GPS positioning and string consistency across strings for GPS
* Fix GPS text alignment
* Enable canned messages by default
* Don't wake screen on new nodes
* Cannedmessage list emote support added
* Fn+e emote picker for freetext screen
* Actually block CannedInput actions while display is shown
* Add selection menu to bannerOverlay
* Off by one
* Move to unified text layouts and spacing
* Still my Fav without an "e"
* Fully remove EVENT_NODEDB_UPDATED
* Simply LoRa screen
* Make some char pointers const to fix compilation on native targets
* Update drawCompassNorth to include radius
* Fix warning
* button thread cleanup
* Pull OneButton handling from PowerFSM and add MUI switch (#6973)
* Trunk
* Onebutton Menu Support
* Add temporary clock icon
* Add gps location to fsi
* Banner message state reset
* Cast to char to satisfy compiler
* Better fast handling of input during banner
* Fix warning
* Derp
* oops
* Update ref
* Wire buzzer_mode
* remove legacy string->print()
* Only init screen if one found
* Unsigned Char
* More buttonThread cleaning
* screen.cpp button handling cleanup
* The Great Event Rename of 2025
* Fix the Radiomaster
* Missed trackball type change
* Remove unused function
* Make ButtonThread an InputBroker
* Coffee hadn't kicked in yet
* Add clock icon for Navigation Bar
* Restore clock screen definition code - whoops
* ExternalNotifications now observe inputBroker
* Clock rework (#6992)
* Move Clock bits into ClockRenderer space
* Rework clock into all device navigation
* T-Watch Actually Builds Different
* Compile fix
---------
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
* Add AM/PM to Digital Clock
* Flip Seconds and AM/PM on Clock Display
* Tik-tok pixels are hard
* Fix builds on Thinknode M1
* Check for GPS and don't crash
* Don't endif til the end
* Rework the OneButton thread to be much less of a mess. (#6997)
* Rework the OneButton thread to be much less of a mess. And break lots of targets temporarily
* Update src/input/ButtonThread.h
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix GPS toggle
* Send the shutdown event, not just the kbchar
* Honor the back button in a notificaiton popup
* Draw the right size box for popup with options
* Try to un-break all the things
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* 24-hour Clock Should have leading zero, but not 12-hour
* Fixup some compile errors
* Add intRoutine to ButtonThread init, to get more responsive user button back
* Add Timezone picker
* Fix Warning
* Optionally set the initial selection for the chooser popup
* Make back buttons work in canned messages
* Drop the wrapper classes
* LonPressTime now configurable
* Clock Frame can not longer be blank; just add valid time
* Back buttons everywhere!
* Key Verification confirm banner
* Make Elecrow M* top button a back button
* Add settings saves
* EInk responsiveness fixes
* Linux Input Fixes
* Add Native Trackball/Joystick support, and move UserButton to Input
* No Flight Stick Mode
* Send input event
* Add Channel Utilization to Device Focused frame
* Don't shift screens when we draw new ones
* Add showOverlayBanner arguments to no-op
* trunk
* Default Native trackball to NC
* Fix crash in simulator mode
* Add longLong button press
* Get the args right
* Adjust Bluetooth Pairing Screen to account for bottom navigation.
* Trackball everywhere, and unPhone buttons
* Remap visionmaster secondary button to TB_UP
* Kill ScanAndSelect
* trunk
* No longer need the canned messages input filter
* All Canned All the time
* Fix stm32 compile error regarding inputBroker
* Unify tft lineheights (#7033)
* Create variable line heights based upon SCREEN_HEIGHT
* Refactor textPositions into method -> getTextPositions
* Update SharedUIDisplay.h
---------
Co-authored-by: Jason P <applewiz@mac.com>
* Adjust top distance for larger displays
* Adjust icon sizes for larger displays
* Fix Paxcounter compile errors after code updates
* Pixel wrangling to make larger screens fit better
* Alert frame has precedence over banner -- for now
* Unify on ALT_BUTTON
* Align AM/PM to the digit, not the segment on larger displays
* Move some global pin defines into configuration.h
* Scaffolding for BMM150 9-axis gyro
* Alt button behavior
* Don't add the blank GPS frames without HAS_GPS
* EVENT_NODEDB_UPDATED has been retired
* Clean out LOG_WARN messages from debugging
* Add dismiss message function
* Minor buttonThread cleanup
* Add BMM150 support
* Clean up last warning from dev
* Simplify bmm150 init return logic
* Add option to reply to messages
* Add minimal menu upon selecting home screen
* Move Messages to slot 2, rename GPS to Position, move variables nearer functional usage in Screen.cpp
* Properly dismiss message
* T-Deck Trackball press is not user button
* Add select on favorite frame to launch cannedMessage DM
* Minor wording change
* Less capital letters
* Fix empty message check, time isn't reliable
* drop dead code
* Make UIRenderer a static class instead of namespace
* Fix the select on favorite
* Check if message is empty early and then 'return'
* Add kb_found, and show the option to launch freetype if appropriate
* Ignore impossible touchscreen touches
* Auto scroll fix
* Move linebreak after "from" for banners to maximize screen usage.
* Center "No messages to show" on Message frame
* Start consolidating buzzer behavior
* Fixed signed / unsigned warning
* Cast second parameter of max() to make some targets happy
* Cast kbchar to (char) to make arduino string happy
* Shorten the notice of "No messages"
* Add buzzer mode chooser
* Add regionPicker to Lora icon
* Reduce line spacing and reorder Position screen to resolve overlapping issues
* Update message titles, fix GPS icons, add Back options
* Leftover boops
* Remove chirp
* Make the region selection dismissable when a region is already set
* Add read-aloud functionality on messages w/ esp8266sam
* "Last Heard" is a better label
* tweak the beep
* 5 options
* properly tear down freetext upon cancel
* de-convelute canned messages just a bit
* Correct height of Mail icon in navigation bar
* Remove unused warning
* Consolidate time methods into TimeFormatters
* Oops
* Change LoRa Picker Cancel to Back
* Tweak selection characters on Banner
* Message render not scrolling on 5th line
* More fixes for message scrolling
* Remove the safety next on text overflow - we found that root cause
* Add pin definitions to fix compilation for obscure target
* Don't let the touchscreen send unitialized kbchar values
* Make virtual KB just a bit quicker
* No more double tap, swipe!
* Left is left, and Right is right
* Update horizontal lightning bolt design
* Move from solid to dashed separator for Message Frame
* Single emote feature fix
* Manually sort overlapping elements for now
* Freetext and clearer choices
* Fix ESP32 InkHUD builds on the unify-tft branch (#7087)
* Remove BaseUI branding
* Capitalization is fun
* Revert Meshtastic Boot Frame Changes
* Add ANZ_433 LoRa region to picker
* Update settings.json
---------
Co-authored-by: HarukiToreda <116696711+HarukiToreda@users.noreply.github.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Jason P <applewiz@mac.com>
Co-authored-by: todd-herbert <herbert.todd@gmail.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-21 06:36:04 -05:00
|
|
|
if (inputBroker) // put our callback in the inputObserver list
|
|
|
|
|
inputObserver.observe(inputBroker);
|
2025-09-02 13:08:57 +01:00
|
|
|
#endif
|
2024-04-15 07:22:05 -05:00
|
|
|
if (nodeDB->loadProto(rtttlConfigFile, meshtastic_RTTTLConfig_size, sizeof(meshtastic_RTTTLConfig),
|
2024-07-26 03:16:21 +02:00
|
|
|
&meshtastic_RTTTLConfig_msg, &rtttlConfig) != LoadFileResult::LOAD_SUCCESS) {
|
2022-12-29 16:53:36 +01:00
|
|
|
memset(rtttlConfig.ringtone, 0, sizeof(rtttlConfig.ringtone));
|
2025-07-11 09:09:46 -04:00
|
|
|
// The default ringtone is always loaded from userPrefs.jsonc
|
2025-07-12 17:26:25 -04:00
|
|
|
strncpy(rtttlConfig.ringtone, USERPREFS_RINGTONE_RTTTL, sizeof(rtttlConfig.ringtone));
|
2022-12-29 16:53:36 +01:00
|
|
|
}
|
2021-03-13 13:32:23 +08:00
|
|
|
|
2024-11-04 12:16:25 -06:00
|
|
|
LOG_INFO("Init External Notification Module");
|
2021-03-13 13:32:23 +08:00
|
|
|
|
2023-01-18 14:51:48 -06:00
|
|
|
output = moduleConfig.external_notification.output ? moduleConfig.external_notification.output
|
|
|
|
|
: EXT_NOTIFICATION_MODULE_OUTPUT;
|
2021-03-13 13:32:23 +08:00
|
|
|
|
2022-12-28 14:57:40 +01:00
|
|
|
// Set the direction of a pin
|
2023-07-22 09:26:54 -05:00
|
|
|
if (output > 0) {
|
2024-11-04 12:16:25 -06:00
|
|
|
LOG_INFO("Use Pin %i in digital mode", output);
|
2023-07-22 09:26:54 -05:00
|
|
|
pinMode(output, OUTPUT);
|
|
|
|
|
}
|
2024-10-29 21:41:21 +11:00
|
|
|
setExternalState(0, false);
|
2022-12-28 14:57:40 +01:00
|
|
|
externalTurnedOn[0] = 0;
|
2023-01-18 14:51:48 -06:00
|
|
|
if (moduleConfig.external_notification.output_vibra) {
|
2024-11-04 12:16:25 -06:00
|
|
|
LOG_INFO("Use Pin %i for vibra motor", moduleConfig.external_notification.output_vibra);
|
2022-12-28 14:57:40 +01:00
|
|
|
pinMode(moduleConfig.external_notification.output_vibra, OUTPUT);
|
2024-10-29 21:41:21 +11:00
|
|
|
setExternalState(1, false);
|
2022-12-28 14:57:40 +01:00
|
|
|
externalTurnedOn[1] = 0;
|
|
|
|
|
}
|
Unify the native display config between legacy display and MUI (#6838)
* Add missed include
* Another Warning fix
* Add another HAS_SCREEN
* Namespace fixes
* Removed depricated destination types and re-factored destination screen
* Get rid of Arduino Strings
* Clean up after Copilot
* SixthLine Def, Screen Rename
Added Sixth Line Definition Screen Rename, and Automatic Line Adjustment
* Consistency is hard - fixed "Sixth"
* System Frame Updates
Adjusted line construction to ensure we fit maximum content per screen.
* Fix up notifications
* Add a couple more ifdef HAS_SCREEN lines
* Add screen->isOverlayBannerShowing()
* Don't forget the invert!
* Adjust Nodelist Center Divider
Adjust Nodelist Center Divider
* Fix variable casting
* Fix entryText variable as empty before update to fix validation
* Altitude is int32_t
* Update PowerTelemetry to have correct data type
* Fix cppcheck warnings (#6945)
* Fix cppcheck warnings
* Adjust logic in Power.cpp for power sensor
---------
Co-authored-by: Jason P <applewiz@mac.com>
* More pixel wrangling so things line up NodeList edition
* Adjust NodeList alignments and plumb some background padding for a possible title fix
* Better alignment for banner notifications
* Move title into drawCommonHeader; initial screen tested
* Fonts make spacing items difficult
* Improved beeping booping and other buzzer based feedback (#6947)
* Improved beeping booping and other buzzer based feedback
* audible button feedback (#6949)
* Refactor
---------
Co-authored-by: todd-herbert <herbert.todd@gmail.com>
* Sandpapered the corners of the notification popup
* Finalize drawCommonHeader migration
* Update Title of Favorite Node Screens
* Update node metric alignment on LoRa screen
* Update the border for popups to separate it from background
* Update PaxcounterModule.cpp with CommonHeader
* Update WiFi screen with CommonHeader and related data reflow
* It was not, in fact, pointing up
* Fix build on wismeshtap
* T-deck trackball debounce
* Fix uptime on Device Focused page to actually detail
* Update Sys screen for new uptime, add label to Freq/Chan on LoRa
* Don't display DOP any longer, make Uptime consistent
* Revert Uptime change on Favorites, Apply to Device Focused
* Label the satelite number to avoid confusion
* Boop boop boop boop
* Correct GPS positioning and string consistency across strings for GPS
* Fix GPS text alignment
* Enable canned messages by default
* Don't wake screen on new nodes
* Cannedmessage list emote support added
* Fn+e emote picker for freetext screen
* Actually block CannedInput actions while display is shown
* Add selection menu to bannerOverlay
* Off by one
* Move to unified text layouts and spacing
* Still my Fav without an "e"
* Fully remove EVENT_NODEDB_UPDATED
* Simply LoRa screen
* Make some char pointers const to fix compilation on native targets
* Update drawCompassNorth to include radius
* Fix warning
* button thread cleanup
* Pull OneButton handling from PowerFSM and add MUI switch (#6973)
* Trunk
* Onebutton Menu Support
* Add temporary clock icon
* Add gps location to fsi
* Banner message state reset
* Cast to char to satisfy compiler
* Better fast handling of input during banner
* Fix warning
* Derp
* oops
* Update ref
* Wire buzzer_mode
* remove legacy string->print()
* Only init screen if one found
* Unsigned Char
* More buttonThread cleaning
* screen.cpp button handling cleanup
* The Great Event Rename of 2025
* Fix the Radiomaster
* Missed trackball type change
* Remove unused function
* Make ButtonThread an InputBroker
* Coffee hadn't kicked in yet
* Add clock icon for Navigation Bar
* Restore clock screen definition code - whoops
* ExternalNotifications now observe inputBroker
* Clock rework (#6992)
* Move Clock bits into ClockRenderer space
* Rework clock into all device navigation
* T-Watch Actually Builds Different
* Compile fix
---------
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
* Add AM/PM to Digital Clock
* Flip Seconds and AM/PM on Clock Display
* Tik-tok pixels are hard
* Fix builds on Thinknode M1
* Check for GPS and don't crash
* Don't endif til the end
* Rework the OneButton thread to be much less of a mess. (#6997)
* Rework the OneButton thread to be much less of a mess. And break lots of targets temporarily
* Update src/input/ButtonThread.h
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix GPS toggle
* Send the shutdown event, not just the kbchar
* Honor the back button in a notificaiton popup
* Draw the right size box for popup with options
* Try to un-break all the things
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* 24-hour Clock Should have leading zero, but not 12-hour
* Fixup some compile errors
* Add intRoutine to ButtonThread init, to get more responsive user button back
* Add Timezone picker
* Fix Warning
* Optionally set the initial selection for the chooser popup
* Make back buttons work in canned messages
* Drop the wrapper classes
* LonPressTime now configurable
* Clock Frame can not longer be blank; just add valid time
* Back buttons everywhere!
* Key Verification confirm banner
* Make Elecrow M* top button a back button
* Add settings saves
* EInk responsiveness fixes
* Linux Input Fixes
* Add Native Trackball/Joystick support, and move UserButton to Input
* No Flight Stick Mode
* Send input event
* Add Channel Utilization to Device Focused frame
* Don't shift screens when we draw new ones
* Add showOverlayBanner arguments to no-op
* trunk
* Default Native trackball to NC
* Fix crash in simulator mode
* Add longLong button press
* Get the args right
* Adjust Bluetooth Pairing Screen to account for bottom navigation.
* Trackball everywhere, and unPhone buttons
* Remap visionmaster secondary button to TB_UP
* Kill ScanAndSelect
* trunk
* No longer need the canned messages input filter
* All Canned All the time
* Fix stm32 compile error regarding inputBroker
* Unify tft lineheights (#7033)
* Create variable line heights based upon SCREEN_HEIGHT
* Refactor textPositions into method -> getTextPositions
* Update SharedUIDisplay.h
---------
Co-authored-by: Jason P <applewiz@mac.com>
* Adjust top distance for larger displays
* Adjust icon sizes for larger displays
* Fix Paxcounter compile errors after code updates
* Pixel wrangling to make larger screens fit better
* Alert frame has precedence over banner -- for now
* Unify on ALT_BUTTON
* Align AM/PM to the digit, not the segment on larger displays
* Move some global pin defines into configuration.h
* Scaffolding for BMM150 9-axis gyro
* Alt button behavior
* Don't add the blank GPS frames without HAS_GPS
* EVENT_NODEDB_UPDATED has been retired
* Clean out LOG_WARN messages from debugging
* Add dismiss message function
* Minor buttonThread cleanup
* Add BMM150 support
* Clean up last warning from dev
* Simplify bmm150 init return logic
* Add option to reply to messages
* Add minimal menu upon selecting home screen
* Move Messages to slot 2, rename GPS to Position, move variables nearer functional usage in Screen.cpp
* Properly dismiss message
* T-Deck Trackball press is not user button
* Add select on favorite frame to launch cannedMessage DM
* Minor wording change
* Less capital letters
* Fix empty message check, time isn't reliable
* drop dead code
* Make UIRenderer a static class instead of namespace
* Fix the select on favorite
* Check if message is empty early and then 'return'
* Add kb_found, and show the option to launch freetype if appropriate
* Ignore impossible touchscreen touches
* Auto scroll fix
* Move linebreak after "from" for banners to maximize screen usage.
* Center "No messages to show" on Message frame
* Start consolidating buzzer behavior
* Fixed signed / unsigned warning
* Cast second parameter of max() to make some targets happy
* Cast kbchar to (char) to make arduino string happy
* Shorten the notice of "No messages"
* Add buzzer mode chooser
* Add regionPicker to Lora icon
* Reduce line spacing and reorder Position screen to resolve overlapping issues
* Update message titles, fix GPS icons, add Back options
* Leftover boops
* Remove chirp
* Make the region selection dismissable when a region is already set
* Add read-aloud functionality on messages w/ esp8266sam
* "Last Heard" is a better label
* tweak the beep
* 5 options
* properly tear down freetext upon cancel
* de-convelute canned messages just a bit
* Correct height of Mail icon in navigation bar
* Remove unused warning
* Consolidate time methods into TimeFormatters
* Oops
* Change LoRa Picker Cancel to Back
* Tweak selection characters on Banner
* Message render not scrolling on 5th line
* More fixes for message scrolling
* Remove the safety next on text overflow - we found that root cause
* Add pin definitions to fix compilation for obscure target
* Don't let the touchscreen send unitialized kbchar values
* Make virtual KB just a bit quicker
* No more double tap, swipe!
* Left is left, and Right is right
* Update horizontal lightning bolt design
* Move from solid to dashed separator for Message Frame
* Single emote feature fix
* Manually sort overlapping elements for now
* Freetext and clearer choices
* Fix ESP32 InkHUD builds on the unify-tft branch (#7087)
* Remove BaseUI branding
* Capitalization is fun
* Revert Meshtastic Boot Frame Changes
* Add ANZ_433 LoRa region to picker
* Update settings.json
---------
Co-authored-by: HarukiToreda <116696711+HarukiToreda@users.noreply.github.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Jason P <applewiz@mac.com>
Co-authored-by: todd-herbert <herbert.todd@gmail.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-21 06:36:04 -05:00
|
|
|
if (moduleConfig.external_notification.output_buzzer && canBuzz()) {
|
2022-12-28 14:57:40 +01:00
|
|
|
if (!moduleConfig.external_notification.use_pwm) {
|
2024-11-04 12:16:25 -06:00
|
|
|
LOG_INFO("Use Pin %i for buzzer", moduleConfig.external_notification.output_buzzer);
|
2022-12-08 16:27:56 +01:00
|
|
|
pinMode(moduleConfig.external_notification.output_buzzer, OUTPUT);
|
2024-10-29 21:41:21 +11:00
|
|
|
setExternalState(2, false);
|
2022-12-08 16:27:56 +01:00
|
|
|
externalTurnedOn[2] = 0;
|
2022-12-28 14:57:40 +01:00
|
|
|
} else {
|
2023-01-18 14:51:48 -06:00
|
|
|
config.device.buzzer_gpio = config.device.buzzer_gpio ? config.device.buzzer_gpio : PIN_BUZZER;
|
2022-12-28 14:57:40 +01:00
|
|
|
// in PWM Mode we force the buzzer pin if it is set
|
2024-11-04 12:16:25 -06:00
|
|
|
LOG_INFO("Use Pin %i in PWM mode", config.device.buzzer_gpio);
|
2022-12-08 16:27:56 +01:00
|
|
|
}
|
2022-10-22 13:35:34 +02:00
|
|
|
}
|
2023-07-03 16:34:32 +02:00
|
|
|
#ifdef HAS_NCP5623
|
2023-05-06 07:17:40 -05:00
|
|
|
if (rgb_found.type == ScanI2C::NCP5623) {
|
|
|
|
|
rgb.begin();
|
|
|
|
|
rgb.setCurrent(10);
|
|
|
|
|
}
|
2024-04-21 08:24:51 +01:00
|
|
|
#endif
|
2025-04-01 22:39:40 +02:00
|
|
|
#ifdef HAS_LP5562
|
|
|
|
|
if (rgb_found.type == ScanI2C::LP5562) {
|
|
|
|
|
rgbw.begin();
|
|
|
|
|
rgbw.setCurrent(20);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
2024-04-21 08:24:51 +01:00
|
|
|
#ifdef RGBLED_RED
|
|
|
|
|
pinMode(RGBLED_RED, OUTPUT); // set up the RGB led pins
|
|
|
|
|
pinMode(RGBLED_GREEN, OUTPUT);
|
|
|
|
|
pinMode(RGBLED_BLUE, OUTPUT);
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef RGBLED_CA
|
|
|
|
|
analogWrite(RGBLED_RED, 255); // with a common anode type, logic is reversed
|
|
|
|
|
analogWrite(RGBLED_GREEN, 255); // so we want to initialise with lights off
|
|
|
|
|
analogWrite(RGBLED_BLUE, 255);
|
2024-04-22 14:42:52 +01:00
|
|
|
#endif
|
|
|
|
|
#ifdef HAS_NEOPIXEL
|
|
|
|
|
pixels.begin(); // Initialise the pixel(s)
|
|
|
|
|
pixels.clear(); // Set all pixel colors to 'off'
|
|
|
|
|
pixels.setBrightness(moduleConfig.ambient_lighting.current);
|
2023-05-06 07:17:40 -05:00
|
|
|
#endif
|
2021-03-13 13:32:23 +08:00
|
|
|
} else {
|
2024-10-14 06:11:43 +02:00
|
|
|
LOG_INFO("External Notification Module Disabled");
|
2022-12-29 16:26:25 -06:00
|
|
|
disable();
|
2021-03-13 13:32:23 +08:00
|
|
|
}
|
2021-03-13 13:14:27 +08:00
|
|
|
}
|
|
|
|
|
|
2023-01-21 18:22:19 +01:00
|
|
|
ProcessMessage ExternalNotificationModule::handleReceived(const meshtastic_MeshPacket &mp)
|
2021-01-27 19:18:16 -08:00
|
|
|
{
|
2025-09-12 14:12:55 +12:00
|
|
|
if (moduleConfig.external_notification.enabled && !isSilenced) {
|
2023-12-12 08:36:37 -06:00
|
|
|
#ifdef T_WATCH_S3
|
2023-07-22 09:26:54 -05:00
|
|
|
drv.setWaveform(0, 75);
|
|
|
|
|
drv.setWaveform(1, 56);
|
|
|
|
|
drv.setWaveform(2, 0);
|
|
|
|
|
drv.go();
|
|
|
|
|
#endif
|
2024-10-04 13:28:51 +02:00
|
|
|
if (!isFromUs(&mp)) {
|
2022-12-08 16:27:56 +01:00
|
|
|
// Check if the message contains a bell character. Don't do this loop for every pin, just once.
|
|
|
|
|
auto &p = mp.decoded;
|
|
|
|
|
bool containsBell = false;
|
2025-09-12 23:01:42 +12:00
|
|
|
for (size_t i = 0; i < p.payload.size; i++) {
|
2022-12-08 16:27:56 +01:00
|
|
|
if (p.payload.bytes[i] == ASCII_BELL) {
|
|
|
|
|
containsBell = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-28 13:17:57 +13:00
|
|
|
meshtastic_Channel ch = channels.getByIndex(mp.channel ? mp.channel : channels.getPrimaryIndex());
|
2025-09-12 23:01:42 +12:00
|
|
|
if (moduleConfig.external_notification.alert_bell) {
|
2022-12-08 16:27:56 +01:00
|
|
|
if (containsBell) {
|
2024-10-14 06:11:43 +02:00
|
|
|
LOG_INFO("externalNotificationModule - Notification Bell");
|
2023-01-04 14:45:28 +01:00
|
|
|
isNagging = true;
|
2024-10-29 21:41:21 +11:00
|
|
|
setExternalState(0, true);
|
2022-12-28 14:57:40 +01:00
|
|
|
if (moduleConfig.external_notification.nag_timeout) {
|
|
|
|
|
nagCycleCutoff = millis() + moduleConfig.external_notification.nag_timeout * 1000;
|
2022-12-08 16:27:56 +01:00
|
|
|
} else {
|
2022-12-28 14:57:40 +01:00
|
|
|
nagCycleCutoff = millis() + moduleConfig.external_notification.output_ms;
|
2022-12-08 16:27:56 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-12 23:01:42 +12:00
|
|
|
if (moduleConfig.external_notification.alert_bell_vibra) {
|
2022-12-28 14:57:40 +01:00
|
|
|
if (containsBell) {
|
2024-10-14 06:11:43 +02:00
|
|
|
LOG_INFO("externalNotificationModule - Notification Bell (Vibra)");
|
2023-01-04 14:45:28 +01:00
|
|
|
isNagging = true;
|
2024-10-29 21:41:21 +11:00
|
|
|
setExternalState(1, true);
|
2022-12-28 14:57:40 +01:00
|
|
|
if (moduleConfig.external_notification.nag_timeout) {
|
|
|
|
|
nagCycleCutoff = millis() + moduleConfig.external_notification.nag_timeout * 1000;
|
|
|
|
|
} else {
|
|
|
|
|
nagCycleCutoff = millis() + moduleConfig.external_notification.output_ms;
|
2022-12-08 16:27:56 +01:00
|
|
|
}
|
|
|
|
|
}
|
2022-12-28 14:57:40 +01:00
|
|
|
}
|
2022-12-08 16:27:56 +01:00
|
|
|
|
2025-09-12 23:01:42 +12:00
|
|
|
if (moduleConfig.external_notification.alert_bell_buzzer && canBuzz()) {
|
2022-12-28 14:57:40 +01:00
|
|
|
if (containsBell) {
|
2024-10-14 06:11:43 +02:00
|
|
|
LOG_INFO("externalNotificationModule - Notification Bell (Buzzer)");
|
2023-01-04 14:45:28 +01:00
|
|
|
isNagging = true;
|
2025-07-21 06:49:08 +08:00
|
|
|
if (!moduleConfig.external_notification.use_pwm && !moduleConfig.external_notification.use_i2s_as_buzzer) {
|
2024-10-29 21:41:21 +11:00
|
|
|
setExternalState(2, true);
|
2022-12-28 14:57:40 +01:00
|
|
|
} else {
|
2023-12-12 08:36:37 -06:00
|
|
|
#ifdef HAS_I2S
|
2025-07-21 06:49:08 +08:00
|
|
|
if (moduleConfig.external_notification.use_i2s_as_buzzer) {
|
|
|
|
|
audioThread->beginRttl(rtttlConfig.ringtone, strlen_P(rtttlConfig.ringtone));
|
|
|
|
|
} else
|
2023-12-12 08:36:37 -06:00
|
|
|
#endif
|
2025-07-21 06:49:08 +08:00
|
|
|
if (moduleConfig.external_notification.use_pwm) {
|
|
|
|
|
rtttl::begin(config.device.buzzer_gpio, rtttlConfig.ringtone);
|
|
|
|
|
}
|
2021-01-27 21:20:18 -08:00
|
|
|
}
|
2022-12-08 16:27:56 +01:00
|
|
|
if (moduleConfig.external_notification.nag_timeout) {
|
|
|
|
|
nagCycleCutoff = millis() + moduleConfig.external_notification.nag_timeout * 1000;
|
|
|
|
|
} else {
|
|
|
|
|
nagCycleCutoff = millis() + moduleConfig.external_notification.output_ms;
|
|
|
|
|
}
|
2022-12-28 14:57:40 +01:00
|
|
|
}
|
|
|
|
|
}
|
2025-09-12 14:12:55 +12:00
|
|
|
|
2025-10-12 07:39:23 -05:00
|
|
|
if (moduleConfig.external_notification.alert_message &&
|
|
|
|
|
(!ch.settings.has_module_settings || !ch.settings.module_settings.is_muted)) {
|
2024-10-14 06:11:43 +02:00
|
|
|
LOG_INFO("externalNotificationModule - Notification Module");
|
2023-01-04 14:45:28 +01:00
|
|
|
isNagging = true;
|
2024-10-29 21:41:21 +11:00
|
|
|
setExternalState(0, true);
|
2022-12-28 14:57:40 +01:00
|
|
|
if (moduleConfig.external_notification.nag_timeout) {
|
|
|
|
|
nagCycleCutoff = millis() + moduleConfig.external_notification.nag_timeout * 1000;
|
2022-10-22 13:35:34 +02:00
|
|
|
} else {
|
2022-12-28 14:57:40 +01:00
|
|
|
nagCycleCutoff = millis() + moduleConfig.external_notification.output_ms;
|
2022-10-22 13:35:34 +02:00
|
|
|
}
|
2021-01-27 21:20:18 -08:00
|
|
|
}
|
2022-12-08 16:27:56 +01:00
|
|
|
|
2025-10-12 07:39:23 -05:00
|
|
|
if (moduleConfig.external_notification.alert_message_vibra &&
|
|
|
|
|
(!ch.settings.has_module_settings || !ch.settings.module_settings.is_muted)) {
|
2024-10-14 06:11:43 +02:00
|
|
|
LOG_INFO("externalNotificationModule - Notification Module (Vibra)");
|
2023-01-04 14:45:28 +01:00
|
|
|
isNagging = true;
|
2024-10-29 21:41:21 +11:00
|
|
|
setExternalState(1, true);
|
2023-01-04 14:45:28 +01:00
|
|
|
if (moduleConfig.external_notification.nag_timeout) {
|
|
|
|
|
nagCycleCutoff = millis() + moduleConfig.external_notification.nag_timeout * 1000;
|
|
|
|
|
} else {
|
|
|
|
|
nagCycleCutoff = millis() + moduleConfig.external_notification.output_ms;
|
2022-12-08 16:27:56 +01:00
|
|
|
}
|
2023-01-04 14:45:28 +01:00
|
|
|
}
|
2022-12-08 16:27:56 +01:00
|
|
|
|
2025-10-12 07:39:23 -05:00
|
|
|
if (moduleConfig.external_notification.alert_message_buzzer &&
|
|
|
|
|
(!ch.settings.has_module_settings || !ch.settings.module_settings.is_muted)) {
|
2024-10-14 06:11:43 +02:00
|
|
|
LOG_INFO("externalNotificationModule - Notification Module (Buzzer)");
|
2025-10-02 02:36:17 +02:00
|
|
|
if (config.device.buzzer_mode != meshtastic_Config_DeviceConfig_BuzzerMode_DIRECT_MSG_ONLY ||
|
|
|
|
|
(!isBroadcast(mp.to) && isToUs(&mp))) {
|
|
|
|
|
// Buzz if buzzer mode is not in DIRECT_MSG_ONLY or is DM to us
|
|
|
|
|
isNagging = true;
|
|
|
|
|
if (!moduleConfig.external_notification.use_pwm && !moduleConfig.external_notification.use_i2s_as_buzzer) {
|
|
|
|
|
setExternalState(2, true);
|
|
|
|
|
} else {
|
2023-12-12 08:36:37 -06:00
|
|
|
#ifdef HAS_I2S
|
2025-10-02 02:36:17 +02:00
|
|
|
if (moduleConfig.external_notification.use_i2s_as_buzzer) {
|
|
|
|
|
audioThread->beginRttl(rtttlConfig.ringtone, strlen_P(rtttlConfig.ringtone));
|
|
|
|
|
} else
|
2023-12-12 08:36:37 -06:00
|
|
|
#endif
|
2025-10-02 02:36:17 +02:00
|
|
|
if (moduleConfig.external_notification.use_pwm) {
|
|
|
|
|
rtttl::begin(config.device.buzzer_gpio, rtttlConfig.ringtone);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (moduleConfig.external_notification.nag_timeout) {
|
|
|
|
|
nagCycleCutoff = millis() + moduleConfig.external_notification.nag_timeout * 1000;
|
|
|
|
|
} else {
|
|
|
|
|
nagCycleCutoff = millis() + moduleConfig.external_notification.output_ms;
|
2025-07-21 06:49:08 +08:00
|
|
|
}
|
2023-01-04 14:45:28 +01:00
|
|
|
} else {
|
2025-10-02 02:36:17 +02:00
|
|
|
// Don't beep if buzzer mode is "direct messages only" and it is no direct message
|
|
|
|
|
LOG_INFO("Message buzzer was suppressed because buzzer mode DIRECT_MSG_ONLY");
|
2022-12-08 16:27:56 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
setIntervalFromNow(0); // run once so we know if we should do something
|
2021-01-27 19:18:16 -08:00
|
|
|
}
|
|
|
|
|
} else {
|
2024-10-14 06:11:43 +02:00
|
|
|
LOG_INFO("External Notification Module Disabled or muted");
|
2021-01-27 19:18:16 -08:00
|
|
|
}
|
|
|
|
|
|
2021-09-23 04:42:09 +03:00
|
|
|
return ProcessMessage::CONTINUE; // Let others look at this message also if they want
|
2021-01-27 19:18:16 -08:00
|
|
|
}
|
2022-12-29 16:53:36 +01:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief An admin message arrived to AdminModule. We are asked whether we want to handle that.
|
|
|
|
|
*
|
|
|
|
|
* @param mp The mesh packet arrived.
|
|
|
|
|
* @param request The AdminMessage request extracted from the packet.
|
|
|
|
|
* @param response The prepared response
|
|
|
|
|
* @return AdminMessageHandleResult HANDLED if message was handled
|
|
|
|
|
* HANDLED_WITH_RESULT if a result is also prepared.
|
|
|
|
|
*/
|
2023-01-21 18:39:58 +01:00
|
|
|
AdminMessageHandleResult ExternalNotificationModule::handleAdminMessageForModule(const meshtastic_MeshPacket &mp,
|
|
|
|
|
meshtastic_AdminMessage *request,
|
2023-01-21 18:22:19 +01:00
|
|
|
meshtastic_AdminMessage *response)
|
2022-12-29 16:53:36 +01:00
|
|
|
{
|
|
|
|
|
AdminMessageHandleResult result;
|
|
|
|
|
|
|
|
|
|
switch (request->which_payload_variant) {
|
2023-01-21 18:22:19 +01:00
|
|
|
case meshtastic_AdminMessage_get_ringtone_request_tag:
|
2024-11-04 19:15:59 -06:00
|
|
|
LOG_INFO("Client getting ringtone");
|
2022-12-29 16:53:36 +01:00
|
|
|
this->handleGetRingtone(mp, response);
|
|
|
|
|
result = AdminMessageHandleResult::HANDLED_WITH_RESPONSE;
|
|
|
|
|
break;
|
|
|
|
|
|
2023-01-21 18:22:19 +01:00
|
|
|
case meshtastic_AdminMessage_set_ringtone_message_tag:
|
2024-11-04 19:15:59 -06:00
|
|
|
LOG_INFO("Client setting ringtone");
|
2022-12-29 16:53:36 +01:00
|
|
|
this->handleSetRingtone(request->set_canned_message_module_messages);
|
|
|
|
|
result = AdminMessageHandleResult::HANDLED;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
result = AdminMessageHandleResult::NOT_HANDLED;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-21 18:22:19 +01:00
|
|
|
void ExternalNotificationModule::handleGetRingtone(const meshtastic_MeshPacket &req, meshtastic_AdminMessage *response)
|
2022-12-29 16:53:36 +01:00
|
|
|
{
|
2024-10-14 06:11:43 +02:00
|
|
|
LOG_INFO("*** handleGetRingtone");
|
2023-01-18 14:51:48 -06:00
|
|
|
if (req.decoded.want_response) {
|
2023-01-21 18:22:19 +01:00
|
|
|
response->which_payload_variant = meshtastic_AdminMessage_get_ringtone_response_tag;
|
2023-01-16 10:55:40 +01:00
|
|
|
strncpy(response->get_ringtone_response, rtttlConfig.ringtone, sizeof(response->get_ringtone_response));
|
2023-01-07 15:24:46 +01:00
|
|
|
} // Don't send anything if not instructed to. Better than asserting.
|
2022-12-29 16:53:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ExternalNotificationModule::handleSetRingtone(const char *from_msg)
|
|
|
|
|
{
|
|
|
|
|
int changed = 0;
|
|
|
|
|
|
|
|
|
|
if (*from_msg) {
|
|
|
|
|
changed |= strcmp(rtttlConfig.ringtone, from_msg);
|
2023-01-16 10:55:40 +01:00
|
|
|
strncpy(rtttlConfig.ringtone, from_msg, sizeof(rtttlConfig.ringtone));
|
2024-10-14 06:11:43 +02:00
|
|
|
LOG_INFO("*** from_msg.text:%s", from_msg);
|
2022-12-29 16:53:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (changed) {
|
2024-03-21 09:06:37 -05:00
|
|
|
nodeDB->saveProto(rtttlConfigFile, meshtastic_RTTTLConfig_size, &meshtastic_RTTTLConfig_msg, &rtttlConfig);
|
2022-12-29 16:53:36 +01:00
|
|
|
}
|
Unify the native display config between legacy display and MUI (#6838)
* Add missed include
* Another Warning fix
* Add another HAS_SCREEN
* Namespace fixes
* Removed depricated destination types and re-factored destination screen
* Get rid of Arduino Strings
* Clean up after Copilot
* SixthLine Def, Screen Rename
Added Sixth Line Definition Screen Rename, and Automatic Line Adjustment
* Consistency is hard - fixed "Sixth"
* System Frame Updates
Adjusted line construction to ensure we fit maximum content per screen.
* Fix up notifications
* Add a couple more ifdef HAS_SCREEN lines
* Add screen->isOverlayBannerShowing()
* Don't forget the invert!
* Adjust Nodelist Center Divider
Adjust Nodelist Center Divider
* Fix variable casting
* Fix entryText variable as empty before update to fix validation
* Altitude is int32_t
* Update PowerTelemetry to have correct data type
* Fix cppcheck warnings (#6945)
* Fix cppcheck warnings
* Adjust logic in Power.cpp for power sensor
---------
Co-authored-by: Jason P <applewiz@mac.com>
* More pixel wrangling so things line up NodeList edition
* Adjust NodeList alignments and plumb some background padding for a possible title fix
* Better alignment for banner notifications
* Move title into drawCommonHeader; initial screen tested
* Fonts make spacing items difficult
* Improved beeping booping and other buzzer based feedback (#6947)
* Improved beeping booping and other buzzer based feedback
* audible button feedback (#6949)
* Refactor
---------
Co-authored-by: todd-herbert <herbert.todd@gmail.com>
* Sandpapered the corners of the notification popup
* Finalize drawCommonHeader migration
* Update Title of Favorite Node Screens
* Update node metric alignment on LoRa screen
* Update the border for popups to separate it from background
* Update PaxcounterModule.cpp with CommonHeader
* Update WiFi screen with CommonHeader and related data reflow
* It was not, in fact, pointing up
* Fix build on wismeshtap
* T-deck trackball debounce
* Fix uptime on Device Focused page to actually detail
* Update Sys screen for new uptime, add label to Freq/Chan on LoRa
* Don't display DOP any longer, make Uptime consistent
* Revert Uptime change on Favorites, Apply to Device Focused
* Label the satelite number to avoid confusion
* Boop boop boop boop
* Correct GPS positioning and string consistency across strings for GPS
* Fix GPS text alignment
* Enable canned messages by default
* Don't wake screen on new nodes
* Cannedmessage list emote support added
* Fn+e emote picker for freetext screen
* Actually block CannedInput actions while display is shown
* Add selection menu to bannerOverlay
* Off by one
* Move to unified text layouts and spacing
* Still my Fav without an "e"
* Fully remove EVENT_NODEDB_UPDATED
* Simply LoRa screen
* Make some char pointers const to fix compilation on native targets
* Update drawCompassNorth to include radius
* Fix warning
* button thread cleanup
* Pull OneButton handling from PowerFSM and add MUI switch (#6973)
* Trunk
* Onebutton Menu Support
* Add temporary clock icon
* Add gps location to fsi
* Banner message state reset
* Cast to char to satisfy compiler
* Better fast handling of input during banner
* Fix warning
* Derp
* oops
* Update ref
* Wire buzzer_mode
* remove legacy string->print()
* Only init screen if one found
* Unsigned Char
* More buttonThread cleaning
* screen.cpp button handling cleanup
* The Great Event Rename of 2025
* Fix the Radiomaster
* Missed trackball type change
* Remove unused function
* Make ButtonThread an InputBroker
* Coffee hadn't kicked in yet
* Add clock icon for Navigation Bar
* Restore clock screen definition code - whoops
* ExternalNotifications now observe inputBroker
* Clock rework (#6992)
* Move Clock bits into ClockRenderer space
* Rework clock into all device navigation
* T-Watch Actually Builds Different
* Compile fix
---------
Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
* Add AM/PM to Digital Clock
* Flip Seconds and AM/PM on Clock Display
* Tik-tok pixels are hard
* Fix builds on Thinknode M1
* Check for GPS and don't crash
* Don't endif til the end
* Rework the OneButton thread to be much less of a mess. (#6997)
* Rework the OneButton thread to be much less of a mess. And break lots of targets temporarily
* Update src/input/ButtonThread.h
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix GPS toggle
* Send the shutdown event, not just the kbchar
* Honor the back button in a notificaiton popup
* Draw the right size box for popup with options
* Try to un-break all the things
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* 24-hour Clock Should have leading zero, but not 12-hour
* Fixup some compile errors
* Add intRoutine to ButtonThread init, to get more responsive user button back
* Add Timezone picker
* Fix Warning
* Optionally set the initial selection for the chooser popup
* Make back buttons work in canned messages
* Drop the wrapper classes
* LonPressTime now configurable
* Clock Frame can not longer be blank; just add valid time
* Back buttons everywhere!
* Key Verification confirm banner
* Make Elecrow M* top button a back button
* Add settings saves
* EInk responsiveness fixes
* Linux Input Fixes
* Add Native Trackball/Joystick support, and move UserButton to Input
* No Flight Stick Mode
* Send input event
* Add Channel Utilization to Device Focused frame
* Don't shift screens when we draw new ones
* Add showOverlayBanner arguments to no-op
* trunk
* Default Native trackball to NC
* Fix crash in simulator mode
* Add longLong button press
* Get the args right
* Adjust Bluetooth Pairing Screen to account for bottom navigation.
* Trackball everywhere, and unPhone buttons
* Remap visionmaster secondary button to TB_UP
* Kill ScanAndSelect
* trunk
* No longer need the canned messages input filter
* All Canned All the time
* Fix stm32 compile error regarding inputBroker
* Unify tft lineheights (#7033)
* Create variable line heights based upon SCREEN_HEIGHT
* Refactor textPositions into method -> getTextPositions
* Update SharedUIDisplay.h
---------
Co-authored-by: Jason P <applewiz@mac.com>
* Adjust top distance for larger displays
* Adjust icon sizes for larger displays
* Fix Paxcounter compile errors after code updates
* Pixel wrangling to make larger screens fit better
* Alert frame has precedence over banner -- for now
* Unify on ALT_BUTTON
* Align AM/PM to the digit, not the segment on larger displays
* Move some global pin defines into configuration.h
* Scaffolding for BMM150 9-axis gyro
* Alt button behavior
* Don't add the blank GPS frames without HAS_GPS
* EVENT_NODEDB_UPDATED has been retired
* Clean out LOG_WARN messages from debugging
* Add dismiss message function
* Minor buttonThread cleanup
* Add BMM150 support
* Clean up last warning from dev
* Simplify bmm150 init return logic
* Add option to reply to messages
* Add minimal menu upon selecting home screen
* Move Messages to slot 2, rename GPS to Position, move variables nearer functional usage in Screen.cpp
* Properly dismiss message
* T-Deck Trackball press is not user button
* Add select on favorite frame to launch cannedMessage DM
* Minor wording change
* Less capital letters
* Fix empty message check, time isn't reliable
* drop dead code
* Make UIRenderer a static class instead of namespace
* Fix the select on favorite
* Check if message is empty early and then 'return'
* Add kb_found, and show the option to launch freetype if appropriate
* Ignore impossible touchscreen touches
* Auto scroll fix
* Move linebreak after "from" for banners to maximize screen usage.
* Center "No messages to show" on Message frame
* Start consolidating buzzer behavior
* Fixed signed / unsigned warning
* Cast second parameter of max() to make some targets happy
* Cast kbchar to (char) to make arduino string happy
* Shorten the notice of "No messages"
* Add buzzer mode chooser
* Add regionPicker to Lora icon
* Reduce line spacing and reorder Position screen to resolve overlapping issues
* Update message titles, fix GPS icons, add Back options
* Leftover boops
* Remove chirp
* Make the region selection dismissable when a region is already set
* Add read-aloud functionality on messages w/ esp8266sam
* "Last Heard" is a better label
* tweak the beep
* 5 options
* properly tear down freetext upon cancel
* de-convelute canned messages just a bit
* Correct height of Mail icon in navigation bar
* Remove unused warning
* Consolidate time methods into TimeFormatters
* Oops
* Change LoRa Picker Cancel to Back
* Tweak selection characters on Banner
* Message render not scrolling on 5th line
* More fixes for message scrolling
* Remove the safety next on text overflow - we found that root cause
* Add pin definitions to fix compilation for obscure target
* Don't let the touchscreen send unitialized kbchar values
* Make virtual KB just a bit quicker
* No more double tap, swipe!
* Left is left, and Right is right
* Update horizontal lightning bolt design
* Move from solid to dashed separator for Message Frame
* Single emote feature fix
* Manually sort overlapping elements for now
* Freetext and clearer choices
* Fix ESP32 InkHUD builds on the unify-tft branch (#7087)
* Remove BaseUI branding
* Capitalization is fun
* Revert Meshtastic Boot Frame Changes
* Add ANZ_433 LoRa region to picker
* Update settings.json
---------
Co-authored-by: HarukiToreda <116696711+HarukiToreda@users.noreply.github.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Jason P <applewiz@mac.com>
Co-authored-by: todd-herbert <herbert.todd@gmail.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-21 06:36:04 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int ExternalNotificationModule::handleInputEvent(const InputEvent *event)
|
|
|
|
|
{
|
|
|
|
|
if (nagCycleCutoff != UINT32_MAX) {
|
|
|
|
|
stopNow();
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
2024-10-04 13:28:51 +02:00
|
|
|
}
|