Skip to content

Commit

Permalink
format source code with clang (no functional changes)
Browse files Browse the repository at this point in the history
  • Loading branch information
barry-ha committed Dec 14, 2023
1 parent da33807 commit 34a0c84
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions examples/Volume_Control/Volume_Control.ino
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,13 @@
#include <TouchScreen.h> // Touchscreen built in to 3.2" Adafruit TFT display

// ------- TFT 4-Wire Resistive Touch Screen configuration parameters
// For touch point precision, we need to know the resistance
// between X+ and X- Use any multimeter to read it
#define XP_XM_OHMS 295 // Resistance in ohms between X+ and X- to calibrate touch pressure
// measure this with an ohmmeter while Griduino turned off

#define START_TOUCH_PRESSURE 200 // Minimum pressure threshold considered start of "press"
#define END_TOUCH_PRESSURE 50 // Maximum pressure threshold required before end of "press"
#define XP_XM_OHMS 295 // Resistance in ohms between X+ and X- to calibrate pressure
// measure this with an ohmmeter while Griduino turned off

// ------- Identity for splash screen and console --------
#define PROGRAM_TITLE "Volume Control Demo"
Expand Down Expand Up @@ -346,6 +349,7 @@ void mapTouchToScreen(TSPoint touch, Point *screen) {
touch.x, touch.y, touch.z, screen->x, screen->y);
Serial.println(msg);

// keep all touches within boundaries of the screen
screen->x = constrain(screen->x, 0, tft.width());
screen->y = constrain(screen->y, 0, tft.height());
return;
Expand Down

0 comments on commit 34a0c84

Please sign in to comment.