diff options
-rw-r--r-- | api.cpp | 6 | ||||
-rw-r--r-- | api.hpp | 6 | ||||
-rw-r--r-- | apps/home_menu.cpp | 8 | ||||
-rw-r--r-- | apps/main_clock.cpp | 10 | ||||
-rw-r--r-- | pico-watch.cpp | 2 |
5 files changed, 16 insertions, 16 deletions
@@ -23,14 +23,14 @@ void Api::init_display() { //oledSetTextWrap(&oled, true); } -int Api::dispWriteString(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, char *szMsg, int iSize, int bInvert, int bRender) { return oledWriteString(&m_oled, iScrollX, x, y, szMsg, iSize, bInvert, bRender); } -void Api::dispFill(unsigned char ucData, int bRender) { +void Api::display_fill(unsigned char ucData, int bRender) { oledFill(&m_oled, ucData, bRender); } -bool Api::getDatetime(datetime_t *t) { +bool Api::datetime_get(datetime_t *t) { return rtc_get_datetime(t); } @@ -11,9 +11,9 @@ class Api { void init_display(); public: void init(); - int dispWriteString(int iScrollX, int x, int y, char *szMsg, int iSize, int bInvert, int bRender); - void dispFill(unsigned char ucData, int bRender); - bool getDatetime(datetime_t *t); + int display_write_string(int iScrollX, int x, int y, char *szMsg, int iSize, int bInvert, int bRender); + void display_fill(unsigned char ucData, int bRender); + bool datetime_get(datetime_t *t); }; #endif
\ No newline at end of file diff --git a/apps/home_menu.cpp b/apps/home_menu.cpp index 97d4423..a3a0691 100644 --- a/apps/home_menu.cpp +++ b/apps/home_menu.cpp @@ -28,18 +28,18 @@ namespace app_home_menu { char datetime_buf[256]; char *datetime_str = &datetime_buf[0]; datetime_t t; - app_api->getDatetime(&t); + app_api->datetime_get(&t); // title with time title_str(datetime_str, sizeof(datetime_buf), &t); - app_api->dispWriteString(0,0,0, datetime_str, FONT_8x8, 0, 1); + app_api->display_write_string(0,0,0, datetime_str, FONT_8x8, 0, 1); } // Rendering of app int render(Api *app_api) { show_title(app_api); - app_api->dispWriteString(0,0,2, pressed_button, FONT_6x8, 0, 1); - app_api->dispWriteString(0,5,3, APPS_NAME[*selected_app], FONT_12x16, 0, 1); + app_api->display_write_string(0,0,2, pressed_button, FONT_6x8, 0, 1); + app_api->display_write_string(0,5,3, APPS_NAME[*selected_app], FONT_12x16, 0, 1); return 0; } diff --git a/apps/main_clock.cpp b/apps/main_clock.cpp index 298fed0..9933775 100644 --- a/apps/main_clock.cpp +++ b/apps/main_clock.cpp @@ -39,22 +39,22 @@ namespace app_main_clock { char datetime_buf[256]; char *datetime_str = &datetime_buf[0]; datetime_t t; - app_api->getDatetime(&t); + app_api->datetime_get(&t); // time time_as_str(datetime_str, sizeof(datetime_buf), &t); - app_api->dispWriteString(0,10,3, datetime_str, FONT_12x16, 0, 1); + app_api->display_write_string(0,10,3, datetime_str, FONT_12x16, 0, 1); // date date_as_str(datetime_str, sizeof(datetime_buf), &t); - app_api->dispWriteString(0,0,7, datetime_str, FONT_8x8, 0, 1); + app_api->display_write_string(0,0,7, datetime_str, FONT_8x8, 0, 1); } // Rendering of the app int render(Api *app_api) { - app_api->dispWriteString(0,15,0, (char *)"Test clock", FONT_8x8, 0, 1); + app_api->display_write_string(0,15,0, (char *)"Test clock", FONT_8x8, 0, 1); show_datetime(app_api); - //app_api->dispWriteString(0,0,0, &data[0], FONT_6x8, 0, 1); + //app_api->display_write_string(0,0,0, &data[0], FONT_6x8, 0, 1); return 0; } diff --git a/pico-watch.cpp b/pico-watch.cpp index 181d708..ebc3f12 100644 --- a/pico-watch.cpp +++ b/pico-watch.cpp @@ -24,7 +24,7 @@ int APPS_DESTROY_ON_EXIT[NUMBER_OF_APPS] = {0, 1}; int APPS_IS_INIT[NUMBER_OF_APPS] = {0, 0}; // Only run in background if init int app_init(int app_id) { - app_api.dispFill(0,1); // Clear OLED + app_api.display_fill(0,1); // Clear OLED if (!APPS_IS_INIT[app_id]) { APPS_IS_INIT[app_id] = 1; return (*APPS_FUNC_INIT[app_id])(&app_api); |