1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-29 05:21:37 +03:00

Migrate from astyle to clang-format (#8464)

This commit is contained in:
Maxim Prokhorov
2022-02-20 19:23:33 +03:00
committed by Max Prokhorov
parent 46190b61f1
commit 19b7a29720
241 changed files with 15925 additions and 16197 deletions

View File

@ -5,29 +5,27 @@
#include <SPI.h>
int ColorPaletteHigh = 30;
int color = WHITE; //Paint brush color
unsigned int colors[8] = {BLACK, RED, GREEN, BLUE, CYAN, YELLOW, WHITE, GRAY1};
int color = WHITE; // Paint brush color
unsigned int colors[8] = { BLACK, RED, GREEN, BLUE, CYAN, YELLOW, WHITE, GRAY1 };
// For better pressure precision, we need to know the resistance
// between X+ and X- Use any multimeter to read it
// The 2.8" TFT Touch shield has 300 ohms across the X plate
TouchScreen ts = TouchScreen(XP, YP, XM, YM); //init TouchScreen port pins
TouchScreen ts = TouchScreen(XP, YP, XM, YM); // init TouchScreen port pins
void setup() {
Tft.TFTinit(); //init TFT library
Tft.TFTinit(); // init TFT library
Serial.begin(115200);
//Draw the pallet
for (int i = 0; i < 8; i++) {
Tft.fillRectangle(i * 30, 0, 30, ColorPaletteHigh, colors[i]);
}
// Draw the pallet
for (int i = 0; i < 8; i++) { Tft.fillRectangle(i * 30, 0, 30, ColorPaletteHigh, colors[i]); }
}
void loop() {
// a point object holds x y and z coordinates.
Point p = ts.getPoint();
//map the ADC value read to into pixel coordinates
// map the ADC value read to into pixel coordinates
p.x = map(p.x, TS_MINX, TS_MAXX, 0, 240);
p.y = map(p.y, TS_MINY, TS_MAXY, 0, 320);