diff --git a/radio/src/cli.cpp b/radio/src/cli.cpp index f6d2f67f5f6..c31a329b256 100644 --- a/radio/src/cli.cpp +++ b/radio/src/cli.cpp @@ -46,6 +46,7 @@ #include #include +#include "lua/lua_states.h" #define CLI_COMMAND_MAX_ARGS 8 #define CLI_COMMAND_MAX_LEN 256 diff --git a/radio/src/gui/colorlcd/libui/bitmapbuffer_draw_extra.cpp b/radio/src/gui/colorlcd/libui/bitmapbuffer_draw_extra.cpp index 666a60228f9..9b761678544 100644 --- a/radio/src/gui/colorlcd/libui/bitmapbuffer_draw_extra.cpp +++ b/radio/src/gui/colorlcd/libui/bitmapbuffer_draw_extra.cpp @@ -27,6 +27,8 @@ #include "telemetry/telemetry_sensors.h" #include "translations.h" +#include + // Drawing functions used by Lua API void BitmapBuffer::invertRect(coord_t x, coord_t y, coord_t w, coord_t h, diff --git a/radio/src/gui/colorlcd/mainview/view_statistics.cpp b/radio/src/gui/colorlcd/mainview/view_statistics.cpp index d6e27efd419..72a077fa936 100644 --- a/radio/src/gui/colorlcd/mainview/view_statistics.cpp +++ b/radio/src/gui/colorlcd/mainview/view_statistics.cpp @@ -25,6 +25,7 @@ #include "tasks.h" #include "tasks/mixer_task.h" #include "mixer_scheduler.h" +#include "lua/lua_states.h" class StatisticsViewPage : public PageTab { diff --git a/radio/src/lua/api_colorlcd.cpp b/radio/src/lua/api_colorlcd.cpp index 07977e681b0..cbaa2e2de55 100644 --- a/radio/src/lua/api_colorlcd.cpp +++ b/radio/src/lua/api_colorlcd.cpp @@ -478,7 +478,7 @@ static int luaLcdDrawSwitch(lua_State *L) int s = luaL_checkinteger(L, 3); LcdFlags flags = luaL_optinteger(L, 4, 0); flags = colorToRGB(flags); - drawSwitch(luaLcdBuffer, x, y, s, flags); + luaLcdBuffer->drawSwitch(x, y, s, flags); return 0; } @@ -506,7 +506,7 @@ static int luaLcdDrawSource(lua_State *L) int s = luaL_checkinteger(L, 3); LcdFlags flags = luaL_optinteger(L, 4, 0); flags = colorToRGB(flags); - drawSource(luaLcdBuffer, x, y, s, flags); + luaLcdBuffer->drawSource(x, y, s, flags); return 0; } @@ -760,7 +760,7 @@ static int luaLcdDrawBitmapPattern(lua_State *L) auto y = luaL_checkinteger(L, 3); auto flags = (LcdFlags)luaL_optinteger(L, 4, 0); flags = colorToRGB(flags); - luaLcdBuffer->drawBitmapPattern(x, y, reinterpret_cast(m), flags); + luaLcdBuffer->drawBitmapPattern(x, y, reinterpret_cast(m), flags); } return 0; @@ -799,8 +799,7 @@ static int luaLcdDrawBitmapPatternPie(lua_State *L) int endAngle = luaL_checkinteger(L, 5); LcdFlags flags = luaL_optinteger(L, 6, 0); flags = colorToRGB(flags); - luaLcdBuffer->drawBitmapPatternPie(x, y, reinterpret_cast(m), - flags, startAngle, endAngle); + luaLcdBuffer->drawBitmapPatternPie(x, y, reinterpret_cast(m), flags, startAngle, endAngle); } return 0; diff --git a/radio/src/lua/api_filesystem.cpp b/radio/src/lua/api_filesystem.cpp index 6d139a3b73b..da232b5352a 100644 --- a/radio/src/lua/api_filesystem.cpp +++ b/radio/src/lua/api_filesystem.cpp @@ -21,11 +21,10 @@ #define LUA_LIB +#include "edgetx.h" #include "lua_api.h" #include "api_filesystem.h" -#include "FatFs/ff.h" - // garbage collector for luaDir static int dir_gc(lua_State* L) { diff --git a/radio/src/lua/lua_widget.cpp b/radio/src/lua/lua_widget.cpp index 52f78f311e5..4e438454023 100644 --- a/radio/src/lua/lua_widget.cpp +++ b/radio/src/lua/lua_widget.cpp @@ -23,6 +23,7 @@ #include "lua_api.h" #include "lua_event.h" +#include "lua_widget_factory.h" #include "lua_states.h" #include "touch.h" diff --git a/radio/src/lua/lua_widget.h b/radio/src/lua/lua_widget.h index 410e75abef5..179050fb99a 100644 --- a/radio/src/lua/lua_widget.h +++ b/radio/src/lua/lua_widget.h @@ -25,6 +25,7 @@ #include "window.h" #include "widget.h" +#include "lua_states.h" #include "lua_api.h" #include "lua_lvgl_widget.h" diff --git a/radio/src/lua/lua_widget_factory.cpp b/radio/src/lua/lua_widget_factory.cpp index 1df56993bc0..c82882cd962 100644 --- a/radio/src/lua/lua_widget_factory.cpp +++ b/radio/src/lua/lua_widget_factory.cpp @@ -25,7 +25,6 @@ #include "lua_api.h" #include "lua_states.h" - #define MAX_INSTRUCTIONS (20000/100) static void l_pushtableint(const char * key, int value) diff --git a/radio/src/main.cpp b/radio/src/main.cpp index 18edb69d62c..cd81d62e0b5 100644 --- a/radio/src/main.cpp +++ b/radio/src/main.cpp @@ -24,6 +24,7 @@ #include "hal/abnormal_reboot.h" #include "hal/usb_driver.h" #include "edgetx.h" +#include "lua/lua_states.h" #if defined(LIBOPENUI) #include "libopenui.h"