mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-16 00:21:35 +10:00
T deck: support keyboard, trackball and touchscreen (#2665)
* add hwid for auto-detection * fix: heltec-wireless-tracker USB serial * T-Deck support * trunk fmt * set FRAMERATE to 1 * fix some defines * trunk fmt * corrected vendor link * T-Deck: support keyboard, trackball & touch screen * T-Watch add touchscreen defs, remove getTouch * fix warnings * getTouch uint16 -> int16 * fix touch x,y * fix I2C port * CannedMsgModule: use entire display height * trunk fmt * fix I2C issue for T-Watch * allow dest selection in canned mode * fix: allow dest selection in canned mode * use tft.setBrightness() to poweroff display * Increased t-watch framerate and added back haptic feedback * add da ref * Move to touched * improved sensitivity and accuracy of touch events * use double tap to send canned message * fix warning * trunk fmt * Remove extra hapticFeedback() --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
+1
-16
@@ -101,23 +101,8 @@ class ButtonThread : public concurrency::OSThread
|
||||
#endif
|
||||
// if (!canSleep) LOG_DEBUG("Suppressing sleep!\n");
|
||||
// else LOG_DEBUG("sleep ok\n");
|
||||
#if defined(ST7735_CS) || defined(ILI9341_DRIVER) || defined(ST7789_CS)
|
||||
int x, y = 0;
|
||||
screen->getTouch(&x, &y);
|
||||
if (x > 0 && y > 0) {
|
||||
#ifdef T_WATCH_S3
|
||||
drv.setWaveform(0, 75);
|
||||
drv.setWaveform(1, 0); // end waveform
|
||||
drv.go();
|
||||
#endif
|
||||
LOG_DEBUG("touch %d %d\n", x, y);
|
||||
powerFSM.trigger(EVENT_PRESS);
|
||||
return 150; // Check for next touch every in 150ms
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return 5;
|
||||
return 50;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user