From 227a0e12ee262dbabdd8d988fec194273cf90029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C5=ABnas=20Ma=C5=BEeikis?= Date: Wed, 29 May 2019 14:33:16 +0300 Subject: Tweaked function declarations and build files to make it build. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ramūnas Mažeikis --- src/device/screen.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/device/screen.cpp') diff --git a/src/device/screen.cpp b/src/device/screen.cpp index c923b99..2857161 100644 --- a/src/device/screen.cpp +++ b/src/device/screen.cpp @@ -5,16 +5,17 @@ #include #include "screen.h" -void draw_lines(struct display_status *status); +void draw_lines(OLEDDisplay *screen, struct display_status *status); void update_lines(struct display_status *status); void init_msg(char *msg, size_t size); /* Effectively const. For type safety reasons. */ static char NOTHING[] = {'\0'}; -void display_status_init(struct display_status *status, char *msg) +void display_status_init(OLEDDisplay *screen, struct display_status *status, char *msg) { status->delta = 2; /* Currently default */ + status->screen = screen; init_msg(msg, strlen(msg)); status->message = msg; status->line_cursor = 0; @@ -55,7 +56,7 @@ int display_update_scroll(struct display_status *status) status->last_scroll_time += status->delta; status->line_cursor++; update_lines(status); - draw_lines(status); + draw_lines(status->screen, status); } if (status->first_line == NOTHING && status->second_line == NOTHING) { return END_OF_MESSAGE; @@ -79,4 +80,4 @@ void update_lines(struct display_status *status) status->second_line = (status->line_cursor * SCREEN_MAX_CHARS < status->message_len) ? status->message + (status->line_cursor + 1) * SCREEN_MAX_CHARS : NOTHING; -} \ No newline at end of file +} -- cgit v1.2.3