Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
esp8266-oled-ssd1306
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
c3pb
esp8266-oled-ssd1306
Commits
a5ced35e
Commit
a5ced35e
authored
7 years ago
by
Matthew M. Burke
Browse files
Options
Downloads
Patches
Plain Diff
added getColor function
parent
7262836a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
OLEDDisplay.cpp
+4
-0
4 additions, 0 deletions
OLEDDisplay.cpp
OLEDDisplay.h
+3
-0
3 additions, 0 deletions
OLEDDisplay.h
with
7 additions
and
0 deletions
OLEDDisplay.cpp
+
4
−
0
View file @
a5ced35e
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
OLEDDisplay.h
+
3
−
0
View file @
a5ced35e
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment