From 90832fd2f474dfdccfefb03e58cf97b64d2a0f94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Sat, 8 Apr 2023 21:15:49 +0200 Subject: [PATCH] move GUI safety check to gui loop (not blit) --- Core/Src/app_gui.c | 2 ++ Core/Src/app_oled.c | 8 -------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Core/Src/app_gui.c b/Core/Src/app_gui.c index ed38be5..79f22d6 100644 --- a/Core/Src/app_gui.c +++ b/Core/Src/app_gui.c @@ -14,6 +14,7 @@ #include "ufb/framebuffer.h" #include "ufb/fb_text.h" #include "ufb/fb_7seg.h" +#include "app_safety.h" #define MAX_TEMP 400 @@ -182,6 +183,7 @@ void app_task_gui(void *argument) s_app.screen(message); } + app_safety_pass_display_updating(); if (s_app.paint_needed) { s_app.paint_needed = false; fb_clear(); diff --git a/Core/Src/app_oled.c b/Core/Src/app_oled.c index 71d0c17..029aa1b 100644 --- a/Core/Src/app_oled.c +++ b/Core/Src/app_oled.c @@ -2,14 +2,8 @@ // Created by MightyPork on 2022/12/28. // -#include -#include - #include "ufb/framebuffer.h" #include "gpio.h" -#include "spi.h" -#include "FreeRTOS.h" -#include "app_safety.h" #define SSD1309_HEIGHT 64 @@ -237,8 +231,6 @@ void oled_data(uint8_t *data, int len) void fb_blit() { - app_safety_pass_display_updating(); - #if 0 oled_data(fb, FB_LEN); #else