mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-13 15:11:20 +10:00
* Add Lilygo T-Impulse-Plus
* Enable small screen layout 64x32
* trunk'd
* Haptic Feedback (short and long press)
* enable Charging Indicator
* enable nrfutil uploads
* trunk fmt
* Add Lilygo T-Impulse-Plus
* Enable small screen layout 64x32
* trunk'd
* Haptic Feedback (short and long press)
* enable Charging Indicator
* enable nrfutil uploads
* trunk fmt
* enable proper device model
* Dim the haptic duration a bit.
* Fix GPS pins and speed. Module enable is active low, speed is 38400
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* set correct geometry.
* Add custom_meshtastic_* metadata to t-impulse-plus platformio.ini
---------
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
(cherry picked from commit cb867cc6c8)
36 lines
855 B
C++
36 lines
855 B
C++
#pragma once
|
|
|
|
#include "configuration.h"
|
|
|
|
#ifdef HAPTIC_FEEDBACK_PIN
|
|
|
|
#include "concurrency/OSThread.h"
|
|
#include <stdint.h>
|
|
|
|
// Non-blocking pulses on a GPIO vibration motor. HAPTIC_FEEDBACK_ACTIVE_LOW inverts polarity.
|
|
class HapticFeedback : public concurrency::OSThread
|
|
{
|
|
public:
|
|
HapticFeedback();
|
|
void pulse(uint16_t durationMs = 30);
|
|
void armDelayedPulse(uint16_t delayMs, uint16_t durationMs = 30);
|
|
void cancelDelayedPulse();
|
|
|
|
protected:
|
|
int32_t runOnce() override;
|
|
|
|
private:
|
|
uint32_t pulseOffAt = 0;
|
|
uint32_t delayedPulseAt = 0;
|
|
uint16_t delayedPulseDuration = 0;
|
|
|
|
void motorWrite(bool on);
|
|
// Reschedule to the soonest pending event so later arms don't clobber earlier wakes.
|
|
void scheduleNext();
|
|
};
|
|
|
|
extern HapticFeedback *hapticFeedback;
|
|
void initHapticFeedback();
|
|
|
|
#endif // HAPTIC_FEEDBACK_PIN
|