School project.
Dependencies: Timezone NTPClient BSP_DISCO_F746NG Grove_temperature
Diff: lcd_functions.h
- Revision:
- 17:01ebfd8ab87a
- Parent:
- 16:296d68305630
--- a/lcd_functions.h Wed Jan 20 08:11:46 2021 +0000 +++ b/lcd_functions.h Wed Jan 20 14:22:46 2021 +0000 @@ -8,8 +8,6 @@ Available font sizes are Font8, Font12, Font16, Font20 or Font24 */ -#include "stm32746g_discovery_lcd.h" - /** This function will initialize the LCD display for use 1/13/2021 @@ -68,12 +66,15 @@ Update the content of the upper left part of display. 1/18/2021 */ -void lcd_update_upper_left() +void lcd_update_upper_left(char current_time[]) { BSP_LCD_SetBackColor(LCD_COLOR_ORANGE); BSP_LCD_SetTextColor(LCD_COLOR_BLUE); BSP_LCD_SetFont(&Font24); - BSP_LCD_DisplayStringAt(50, 55, (uint8_t *)"TIME HERE", LEFT_MODE); + BSP_LCD_DisplayStringAt(50, 55, (uint8_t *)current_time, LEFT_MODE); + BSP_LCD_SetTextColor(LCD_COLOR_ORANGE); + /// Used to hide some weird artifacts in time string + BSP_LCD_FillRect(185, 52, 30, 30); } /** @@ -152,6 +153,7 @@ BSP_LCD_SetTextColor(LCD_COLOR_ORANGE); BSP_LCD_SetFont(&Font20); BSP_LCD_DisplayStringAt(5, 160, (uint8_t *)"Temperature", RIGHT_MODE); + BSP_LCD_SetFont(&Font16); } /** Update the content of the lower right part of display. @@ -176,6 +178,7 @@ BSP_LCD_SetFont(&Font24); BSP_LCD_DisplayStringAt(35, 210, (uint8_t *)temp_text, RIGHT_MODE); BSP_LCD_DrawCircle(421, 214, 3); + BSP_LCD_SetFont(&Font16); } /** @@ -186,9 +189,9 @@ { BSP_LCD_Clear(LCD_COLOR_DARKBLUE); // Clear with color lcd_upper_left(); - lcd_lower_left(); + lcd_lower_left(); + lcd_lower_right(); lcd_upper_right(); - lcd_lower_right(); } /**