Skip to content

Commit 0f37f5e

Browse files
Justin HylandJustin Hyland
Justin Hyland
authored and
Justin Hyland
committed
fixing some errors, running into others
1 parent 062c449 commit 0f37f5e

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

SimpleUI.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include <Adafruit_GFX.h>
33
#include <Adafruit_SSD1351.h>
44
#include <SPI.h>
5-
//#include "TextAnchor.hpp"
5+
#include "TextAnchor.hpp"
66
//#include <ArduinoSTL.h>
77
//#include <cstddef>
88
//#include <MemoryUsage.h>

TextAnchor.cpp

+31
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,37 @@ TextAnchor * TextAnchor::print( char *charValue ) {
4444
return this;
4545
}
4646

47+
TextAnchor * TextAnchor::print(int intValue){
48+
_printInt(intValue);
49+
return this;
50+
}
51+
52+
TextAnchor * TextAnchor::print(unsigned int intValue){
53+
_printInt(intValue);
54+
return this;
55+
}
56+
57+
TextAnchor * TextAnchor::print(long intValue){
58+
_printLong(intValue);
59+
return this;
60+
}
61+
62+
TextAnchor * TextAnchor::print(unsigned long intValue){
63+
_printLong(intValue);
64+
return this;
65+
}
66+
67+
TextAnchor * TextAnchor::print(float intValue){
68+
_printFloat(intValue);
69+
return this;
70+
}
71+
72+
TextAnchor * TextAnchor::print(unsigned float intValue){
73+
_printFloat(intValue);
74+
return this;
75+
}
76+
77+
4778
TextAnchor::~TextAnchor(void) {
4879

4980
}

TextAnchor.hpp

+6
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ class TextAnchor {
123123
124124
*/
125125

126+
TextAnchor * print(int intValue);
127+
TextAnchor * print(unsigned int intValue);
128+
TextAnchor * print(long intValue);
129+
TextAnchor * print(unsigned long intValue);
130+
//TextAnchor * print(float intValue);
131+
//TextAnchor * print(unsigned float intValue);
126132

127133
// Set/update the print containers display value to a string, then display it
128134
TextAnchor * print(char *charValue);

0 commit comments

Comments
 (0)