From 4656921dea0dcf543abbd5d41c4e78c5e648da9e Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Fri, 23 Apr 2021 23:15:18 +0200 Subject: [PATCH] New the BLINK fields do blink --- radio/src/gui/colorlcd/standalone_lua.cpp | 2 +- radio/src/lua/api_colorlcd.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/radio/src/gui/colorlcd/standalone_lua.cpp b/radio/src/gui/colorlcd/standalone_lua.cpp index 07fc3b8f3..8d0ebffcd 100644 --- a/radio/src/gui/colorlcd/standalone_lua.cpp +++ b/radio/src/gui/colorlcd/standalone_lua.cpp @@ -22,7 +22,7 @@ #include "view_main.h" #include "lua/lua_api.h" -constexpr uint32_t STANDALONE_LUA_REFRESH = 1000 / 1; // 1Hz +constexpr uint32_t STANDALONE_LUA_REFRESH = 1000 / 5; // 5Hz uint16_t* lcdGetBackupBuffer(); diff --git a/radio/src/lua/api_colorlcd.cpp b/radio/src/lua/api_colorlcd.cpp index 3e5397fc1..f1d173a84 100644 --- a/radio/src/lua/api_colorlcd.cpp +++ b/radio/src/lua/api_colorlcd.cpp @@ -203,9 +203,9 @@ static int luaLcdDrawText(lua_State *L) const char * s = luaL_checkstring(L, 3); unsigned int att = luaL_optunsigned(L, 4, 0); - bool invers = (att & INVERS) && !(); - bool blink = att & INVERS; bool shadowed = att & SHADOWED; + bool invers = (att & INVERS); + if (att & BLINK) invers = invers && !(BLINK_ON_PHASE); // from here on, we need only the color att = (att & 0xFFFF) | COLOR(COLOR_VAL(att));