Skip to content
Snippets Groups Projects
Commit a5ced35e authored by Matthew M. Burke's avatar Matthew M. Burke
Browse files

added getColor function

parent 7262836a
No related branches found
No related tags found
No related merge requests found
...@@ -72,6 +72,10 @@ void OLEDDisplay::setColor(OLEDDISPLAY_COLOR color) { ...@@ -72,6 +72,10 @@ void OLEDDisplay::setColor(OLEDDISPLAY_COLOR color) {
this->color = color; this->color = color;
} }
OLEDDISPLAY_COLOR OLEDDisplay:getColor() {
return this->color;
}
void OLEDDisplay::setPixel(int16_t x, int16_t y) { void OLEDDisplay::setPixel(int16_t x, int16_t y) {
if (x >= 0 && x < 128 && y >= 0 && y < 64) { if (x >= 0 && x < 128 && y >= 0 && y < 64) {
switch (color) { switch (color) {
......
...@@ -123,6 +123,9 @@ class OLEDDisplay : public Print { ...@@ -123,6 +123,9 @@ class OLEDDisplay : public Print {
// Sets the color of all pixel operations // Sets the color of all pixel operations
void setColor(OLEDDISPLAY_COLOR color); void setColor(OLEDDISPLAY_COLOR color);
// Returns the current color.
OLEDDISPLAY_COLOR getColor();
// Draw a pixel at given position // Draw a pixel at given position
void setPixel(int16_t x, int16_t y); void setPixel(int16_t x, int16_t y);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment