aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorConfuSomu2021-04-14 13:02:22 -0400
committerConfuSomu2021-04-14 13:02:22 -0400
commit9796a48268e362be918116e9e5104be4af3a7aa2 (patch)
tree42fe13bdb72f93161653f486a9c496c926b443c0
parenta713df0e42481d66513e42d85a88ea8dcf4f0619 (diff)
downloadpico-watch-9796a48268e362be918116e9e5104be4af3a7aa2.tar
pico-watch-9796a48268e362be918116e9e5104be4af3a7aa2.tar.gz
pico-watch-9796a48268e362be918116e9e5104be4af3a7aa2.zip
Use const char* as arg for Api::display_write_string
-rw-r--r--api.cpp2
-rw-r--r--api.hpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/api.cpp b/api.cpp
index efb4bdb..acf0fba 100644
--- a/api.cpp
+++ b/api.cpp
@@ -27,7 +27,7 @@ void Api::display_power(bool mode) {
oledPower(&m_oled, mode);
}
-int Api::display_write_string(int iScrollX, int x, int y, char *szMsg, int iSize, int bInvert, int bRender) {
+int Api::display_write_string(int iScrollX, int x, int y, const char *szMsg, int iSize, int bInvert, int bRender) {
oledWriteString(&m_oled, iScrollX, x, y, szMsg, iSize, bInvert, 0);
m_writebb_needed = true;
}
diff --git a/api.hpp b/api.hpp
index 1a6d33f..0327f4f 100644
--- a/api.hpp
+++ b/api.hpp
@@ -38,7 +38,7 @@ class Api {
void init();
// Control the display's power (on or off)
void display_power(bool mode);
- int display_write_string(int iScrollX, int x, int y, char *szMsg, int iSize, int bInvert, int bRender);
+ int display_write_string(int iScrollX, int x, int y, const char *szMsg, int iSize, int bInvert, int bRender);
void display_fill(unsigned char ucData, int bRender);
void display_draw_line(int x1, int y1, int x2, int y2, int bRender);
void display_draw_rectange(int x1, int y1, int x2, int y2, uint8_t ucColor, uint8_t bFilled);