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
이 커밋은 다음에 포함됨:
csrutil
2025-09-17 08:56:18 +08:00
부모 d86851b881
커밋 2da50882c0
6개의 변경된 파일112개의 추가작업 그리고 0개의 파일을 삭제
+9
파일 보기
@@ -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);