15#define TOUCH_X_MIN 300
17#define TOUCH_X_MAX 3700
19#define TOUCH_Y_MIN 300
21#define TOUCH_Y_MAX 3650
24#define TOUCH_X_SPLIT 2060
29#define TOUCH_Y_LED1_LED2 1285
31#define TOUCH_Y_LED2_LED3 2075
33#define TOUCH_Y_LED3_BEEP 2900
37 return TOUCH_ZONE_NONE;
41 return TOUCH_ZONE_BEEP;
47 return right ? TOUCH_ZONE_LED1_ON : TOUCH_ZONE_LED1_OFF;
50 return right ? TOUCH_ZONE_LED2_ON : TOUCH_ZONE_LED2_OFF;
52 return right ? TOUCH_ZONE_LED3_ON : TOUCH_ZONE_LED3_OFF;
57 case TOUCH_ZONE_LED1_OFF:
return "LED 1 OFF";
58 case TOUCH_ZONE_LED1_ON:
return "LED 1 ON";
59 case TOUCH_ZONE_LED2_OFF:
return "LED 2 OFF";
60 case TOUCH_ZONE_LED2_ON:
return "LED 2 ON";
61 case TOUCH_ZONE_LED3_OFF:
return "LED 3 OFF";
62 case TOUCH_ZONE_LED3_ON:
return "LED 3 ON";
63 case TOUCH_ZONE_BEEP:
return "BEEP";
64 default:
return "none";
#define TOUCH_Y_MAX
Highest accepted raw Y.
#define TOUCH_X_MAX
Highest accepted raw X.
#define TOUCH_X_SPLIT
Raw X that separates the OFF (left) half from the ON (right) half, from measured button centers.
#define TOUCH_Y_LED3_BEEP
Raw Y boundary between the LED 3 row and the BEEP row.
#define TOUCH_Y_LED2_LED3
Raw Y boundary between the LED 2 row and the LED 3 row.
const char * touchZoneName(touchZone_t zone)
Gives a short printable name for a zone.
#define TOUCH_Y_LED1_LED2
Raw Y boundary between the LED 1 row and the LED 2 row.
touchZone_t touchZoneFromPoint(int16_t x, int16_t y)
Classifies a raw touch position into a button zone.
Maps raw TSC2046 X/Y readings to the printed button zones on the panel overlay.
touchZone_t
The button zones on the printed panel, or TOUCH_ZONE_NONE for a point outside them.