✨ feat: add vibration feedback support for UI events
- Add genericVibration class with 5-second cooldown and 1-second pulse - Integrate vibration triggers for new messages and contact discoveries - Add conditional compilation support with PIN_VIBRATION guard - Implement abstract interface for vibration in UITask system
This commit is contained in:
@@ -11,6 +11,9 @@
|
||||
#ifdef PIN_BUZZER
|
||||
#include <helpers/ui/buzzer.h>
|
||||
#endif
|
||||
#ifdef PIN_VIBRATION
|
||||
#include <helpers/ui/vibration.h>
|
||||
#endif
|
||||
|
||||
#include "../AbstractUITask.h"
|
||||
#include "../NodePrefs.h"
|
||||
@@ -20,6 +23,9 @@ class UITask : public AbstractUITask {
|
||||
SensorManager* _sensors;
|
||||
#ifdef PIN_BUZZER
|
||||
genericBuzzer buzzer;
|
||||
#endif
|
||||
#ifdef PIN_VIBRATION
|
||||
genericVibration vibration;
|
||||
#endif
|
||||
unsigned long _next_refresh, _auto_off;
|
||||
NodePrefs* _node_prefs;
|
||||
@@ -72,6 +78,9 @@ public:
|
||||
void msgRead(int msgcount) override;
|
||||
void newMsg(uint8_t path_len, const char* from_name, const char* text, int msgcount) override;
|
||||
void soundBuzzer(UIEventType bet = UIEventType::none) override;
|
||||
#ifdef PIN_VIBRATION
|
||||
void triggerVibration() override;
|
||||
#endif
|
||||
void loop() override;
|
||||
|
||||
void shutdown(bool restart = false);
|
||||
|
||||
Reference in New Issue
Block a user