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:
csrutil 2025-09-07 15:16:15 +08:00
parent d86851b881
commit 2da50882c0
6 changed files with 112 additions and 0 deletions

View file

@ -244,6 +244,11 @@ void MyMesh::onDiscoveredContact(ContactInfo &contact, bool is_new, uint8_t path
} else {
#ifdef DISPLAY_CLASS
if (_ui) _ui->soundBuzzer(UIEventType::newContactMessage);
if (_ui) {
#ifdef PIN_VIBRATION
if (is_new) _ui->triggerVibration();
#endif
}
#endif
}