mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-09 06:32:06 +00:00
removed debug lines, disabled bluetooth for now because of stack smashing protect failure
This commit is contained in:
parent
c11e1809db
commit
a5ef03bc7e
@ -35,10 +35,10 @@ void TouchScreenCST226SE::init()
|
|||||||
TOUCH_IRQ, []() { isPressed = true; }, FALLING);
|
TOUCH_IRQ, []() { isPressed = true; }, FALLING);
|
||||||
}
|
}
|
||||||
LOG_DEBUG("CST226SE init OK at address 0x%02X", addr);
|
LOG_DEBUG("CST226SE init OK at address 0x%02X", addr);
|
||||||
|
inputBroker->registerSource(this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_ERROR("CST226SE init failed at all known addresses");
|
LOG_ERROR("CST226SE init failed at all known addresses");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,23 +49,17 @@ bool TouchScreenCST226SE::getTouch(int16_t &x, int16_t &y)
|
|||||||
if (touched > 0) {
|
if (touched > 0) {
|
||||||
y = x_array[0];
|
y = x_array[0];
|
||||||
x = (TFT_WIDTH - y_array[0]);
|
x = (TFT_WIDTH - y_array[0]);
|
||||||
LOG_DEBUG("TouchScreen touch %dx %dy", x, y);
|
|
||||||
|
|
||||||
// Check bounds
|
// Check bounds
|
||||||
if (x < 0 || x >= TFT_WIDTH || y < 0 || y >= TFT_HEIGHT) {
|
if (x < 0 || x >= TFT_WIDTH || y < 0 || y >= TFT_HEIGHT) {
|
||||||
LOG_DEBUG("Touch ignored - Out of bounds");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true; // Valid touch detected
|
return true; // Valid touch detected
|
||||||
}
|
}
|
||||||
|
|
||||||
return false; // No valid touch data
|
return false; // No valid touch data
|
||||||
}
|
}
|
||||||
|
|
||||||
void TouchScreenCST226SE::onEvent(const TouchEvent &event)
|
void TouchScreenCST226SE::onEvent(const TouchEvent &event)
|
||||||
{
|
{
|
||||||
LOG_DEBUG("Event triggerd");
|
|
||||||
InputEvent e;
|
InputEvent e;
|
||||||
e.source = event.source;
|
e.source = event.source;
|
||||||
|
|
||||||
@ -98,7 +92,6 @@ void TouchScreenCST226SE::onEvent(const TouchEvent &event)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TOUCH_ACTION_TAP: {
|
case TOUCH_ACTION_TAP: {
|
||||||
LOG_DEBUG("tipie tap");
|
|
||||||
if (moduleConfig.external_notification.enabled && (externalNotificationModule->nagCycleCutoff != UINT32_MAX)) {
|
if (moduleConfig.external_notification.enabled && (externalNotificationModule->nagCycleCutoff != UINT32_MAX)) {
|
||||||
externalNotificationModule->stopNow();
|
externalNotificationModule->stopNow();
|
||||||
} else {
|
} else {
|
||||||
|
@ -57,6 +57,8 @@
|
|||||||
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
#define CANNED_MESSAGE_MODULE_ENABLE 1
|
||||||
#define USE_VIRTUAL_KEYBOARD 1
|
#define USE_VIRTUAL_KEYBOARD 1
|
||||||
|
|
||||||
|
#define MESHTASTIC_EXCLUDE_BLUETOOTH 1
|
||||||
|
|
||||||
#define ST7796_NSS 25
|
#define ST7796_NSS 25
|
||||||
#define ST7796_RS 13 // DC
|
#define ST7796_RS 13 // DC
|
||||||
#define ST7796_SDA 14 // MOSI
|
#define ST7796_SDA 14 // MOSI
|
||||||
|
Loading…
Reference in New Issue
Block a user