Skip to content

Commit 5bd4e29

Browse files
renamed class
1 parent 8319fee commit 5bd4e29

File tree

4 files changed

+30
-30
lines changed

4 files changed

+30
-30
lines changed

FastDisplayPrototyping.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include "src/FastDisplayPrototyping.h"
55

66
TFT_eSPI display = TFT_eSPI();
7-
fastSerialDisplay sDisplay(&display,"display");
7+
FastSerialDisplay sDisplay(&display,"display");
88

99
//------------------------------------------------------------------------------------------
1010

examples/GFX/GFX.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Documentation : https://github.com/thelastoutpostworkshop/FastDisplayPrototyping
1818
Adafruit_TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);
1919

2020
// Initialize the display prototyping library
21-
fastSerialDisplay sDisplay(&tft,"tft");
21+
FastSerialDisplay sDisplay(&tft,"tft");
2222

2323
void setup() {
2424
Serial.begin(9600); // This line mandatory for using the display prototyping library, change the baud rate if needed

examples/TFTeSPI/TFTeSPI.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Documentation : https://github.com/thelastoutpostworkshop/FastDisplayPrototyping
1717
TFT_eSPI tft = TFT_eSPI();
1818

1919
// Initialize the display prototyping library
20-
fastSerialDisplay tft(&tft,"tft");
20+
FastSerialDisplay tft(&tft,"tft");
2121

2222
void setup() {
2323
Serial.begin(115200); // This line mandatory for using the display prototyping library, change the baud rate if needed

src/FastDisplayPrototyping.h

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#define COLOR_BLACK 0x0000
1616
#define DEBOUNCE_READ_SERIAL 300
1717

18-
class fastSerialDisplay
18+
class FastSerialDisplay
1919
{
2020
private:
2121
struct Capture
@@ -95,7 +95,7 @@ class fastSerialDisplay
9595
boolean isCommand(const char *);
9696
void serialPrintFormatted(const char *formatStr, ...);
9797
bool containsOnlyDigits(const char *);
98-
inline void serialPrintFormattedMacro(fastSerialDisplay *disp, const char *fmt, ...)
98+
inline void serialPrintFormattedMacro(FastSerialDisplay *disp, const char *fmt, ...)
9999
{
100100
#ifdef OUTPUT_CODE_ON_SERIAL
101101
va_list args;
@@ -107,14 +107,14 @@ class fastSerialDisplay
107107
}
108108

109109
public:
110-
fastSerialDisplay(DISP *d, const char *dName = nullptr);
111-
~fastSerialDisplay();
110+
FastSerialDisplay(DISP *d, const char *dName = nullptr);
111+
~FastSerialDisplay();
112112
void readCommandsFromSerial(void);
113113
void runCommands(char *);
114114
void runCommands(const __FlashStringHelper *ifsh);
115115
};
116116

117-
fastSerialDisplay::fastSerialDisplay(DISP *d, const char *dName)
117+
FastSerialDisplay::FastSerialDisplay(DISP *d, const char *dName)
118118
{
119119
if (dName != nullptr)
120120
{
@@ -134,18 +134,18 @@ fastSerialDisplay::fastSerialDisplay(DISP *d, const char *dName)
134134
lastSerialRead = millis();
135135
}
136136

137-
fastSerialDisplay::~fastSerialDisplay()
137+
FastSerialDisplay::~FastSerialDisplay()
138138
{
139139
}
140140

141-
void fastSerialDisplay::runCommands(char *commands)
141+
void FastSerialDisplay::runCommands(char *commands)
142142
{
143143
for (int i = 0; i < strlen(commands); i++)
144144
{
145145
decodeInput(*(commands + i));
146146
}
147147
}
148-
void fastSerialDisplay::runCommands(const __FlashStringHelper *ifsh)
148+
void FastSerialDisplay::runCommands(const __FlashStringHelper *ifsh)
149149
{
150150
PGM_P p = reinterpret_cast<PGM_P>(ifsh);
151151
while (1)
@@ -157,7 +157,7 @@ void fastSerialDisplay::runCommands(const __FlashStringHelper *ifsh)
157157
}
158158
}
159159

160-
bool fastSerialDisplay::containsOnlyDigits(const char *str)
160+
bool FastSerialDisplay::containsOnlyDigits(const char *str)
161161
{
162162
for (int i = 0; str[i] != '\0'; i++)
163163
{
@@ -169,7 +169,7 @@ bool fastSerialDisplay::containsOnlyDigits(const char *str)
169169
return true;
170170
}
171171

172-
float fastSerialDisplay::getFloatFromCapture(char *capture)
172+
float FastSerialDisplay::getFloatFromCapture(char *capture)
173173
{
174174
if (containsOnlyDigits(capture))
175175
{
@@ -181,11 +181,11 @@ float fastSerialDisplay::getFloatFromCapture(char *capture)
181181
}
182182
}
183183

184-
uint32_t fastSerialDisplay::getColorFromCapture(char *capture)
184+
uint32_t FastSerialDisplay::getColorFromCapture(char *capture)
185185
{
186186
return strtoul(capture, NULL, 16);
187187
}
188-
int32_t *fastSerialDisplay::getColorFromCapture(Capture *capture, int start, int end)
188+
int32_t *FastSerialDisplay::getColorFromCapture(Capture *capture, int start, int end)
189189
{
190190
static int32_t res[MAX_ARG_CAPTURE];
191191
for (int i = start; i <= end && i <= MAX_ARG_CAPTURE; i++)
@@ -195,12 +195,12 @@ int32_t *fastSerialDisplay::getColorFromCapture(Capture *capture, int start, int
195195
return res;
196196
}
197197

198-
int32_t *fastSerialDisplay::getIntFromCapture(Capture *capture, int count)
198+
int32_t *FastSerialDisplay::getIntFromCapture(Capture *capture, int count)
199199
{
200200
return getIntFromCapture(capture, 0, count - 1);
201201
}
202202

203-
int32_t *fastSerialDisplay::getIntFromCapture(Capture *capture, int start, int end)
203+
int32_t *FastSerialDisplay::getIntFromCapture(Capture *capture, int start, int end)
204204
{
205205
static int32_t res[MAX_ARG_CAPTURE];
206206
for (int i = start; i <= end && i <= MAX_ARG_CAPTURE; i++)
@@ -210,7 +210,7 @@ int32_t *fastSerialDisplay::getIntFromCapture(Capture *capture, int start, int e
210210
return res;
211211
}
212212

213-
int32_t fastSerialDisplay::getIntFromCapture(char *capture)
213+
int32_t FastSerialDisplay::getIntFromCapture(char *capture)
214214
{
215215
if (containsOnlyDigits(capture))
216216
{
@@ -222,7 +222,7 @@ int32_t fastSerialDisplay::getIntFromCapture(char *capture)
222222
}
223223
}
224224

225-
bool *fastSerialDisplay::getBoolFromCapture(Capture *capture, int start, int end)
225+
bool *FastSerialDisplay::getBoolFromCapture(Capture *capture, int start, int end)
226226
{
227227
static bool res[MAX_ARG_CAPTURE];
228228
for (int i = start; i <= end && i <= MAX_ARG_CAPTURE; i++)
@@ -232,7 +232,7 @@ bool *fastSerialDisplay::getBoolFromCapture(Capture *capture, int start, int end
232232
return res;
233233
}
234234

235-
bool fastSerialDisplay::getBoolFromCapture(char *capture)
235+
bool FastSerialDisplay::getBoolFromCapture(char *capture)
236236
{
237237
if (capture[0] == '1')
238238
{
@@ -241,7 +241,7 @@ bool fastSerialDisplay::getBoolFromCapture(char *capture)
241241
return false;
242242
}
243243

244-
int fastSerialDisplay::getValueFromKeyword(char c)
244+
int FastSerialDisplay::getValueFromKeyword(char c)
245245
{
246246
if (strchr(displaySizeKeywords, c))
247247
{
@@ -261,7 +261,7 @@ int fastSerialDisplay::getValueFromKeyword(char c)
261261
return 0;
262262
}
263263

264-
void fastSerialDisplay::captureInput(Capture *capture, char input)
264+
void FastSerialDisplay::captureInput(Capture *capture, char input)
265265
{
266266
if (capture->index[capture->argIndex] == MAX_DATA_CAPTURE)
267267
{
@@ -272,15 +272,15 @@ void fastSerialDisplay::captureInput(Capture *capture, char input)
272272
capture->index[capture->argIndex]++;
273273
}
274274

275-
void fastSerialDisplay::closeCapture(Capture *capture)
275+
void FastSerialDisplay::closeCapture(Capture *capture)
276276
{
277277
capture->argIndex = 0;
278278
for (int i = 0; i < capture->maxArg; i++)
279279
{
280280
capture->capture[i][capture->index[i]] = 0;
281281
}
282282
}
283-
void fastSerialDisplay::openCapture(Capture *capture, int maxArg)
283+
void FastSerialDisplay::openCapture(Capture *capture, int maxArg)
284284
{
285285
capture->argIndex = 0;
286286
capture->maxArg = maxArg;
@@ -290,7 +290,7 @@ void fastSerialDisplay::openCapture(Capture *capture, int maxArg)
290290
}
291291
}
292292

293-
void fastSerialDisplay::nextArgCapture(Capture *capture)
293+
void FastSerialDisplay::nextArgCapture(Capture *capture)
294294
{
295295
if (capture->argIndex >= capture->maxArg)
296296
{
@@ -303,7 +303,7 @@ void fastSerialDisplay::nextArgCapture(Capture *capture)
303303
}
304304
}
305305

306-
void fastSerialDisplay::captureCommand(char input)
306+
void FastSerialDisplay::captureCommand(char input)
307307
{
308308
captureInput(&captureData, input);
309309
closeCapture(&captureData);
@@ -436,12 +436,12 @@ void fastSerialDisplay::captureCommand(char input)
436436
}
437437
}
438438

439-
boolean fastSerialDisplay::isCommand(const char *command)
439+
boolean FastSerialDisplay::isCommand(const char *command)
440440
{
441441
return strcmp(captureData.capture[0], command) == 0;
442442
}
443443

444-
void fastSerialDisplay::decodeInput(char input)
444+
void FastSerialDisplay::decodeInput(char input)
445445
{
446446
if (input == ';')
447447
{
@@ -549,7 +549,7 @@ void fastSerialDisplay::decodeInput(char input)
549549
}
550550
}
551551

552-
void fastSerialDisplay::readCommandsFromSerial(void)
552+
void FastSerialDisplay::readCommandsFromSerial(void)
553553
{
554554
char input;
555555
if (Serial.available())
@@ -569,7 +569,7 @@ void fastSerialDisplay::readCommandsFromSerial(void)
569569
delay(10);
570570
}
571571

572-
void fastSerialDisplay::executeCommand(void)
572+
void FastSerialDisplay::executeCommand(void)
573573
{
574574
int16_t x, y, x1, y1;
575575
uint16_t w, h;

0 commit comments

Comments
 (0)