From b6d46325f759db911db9b8a255d70bec3d2488e0 Mon Sep 17 00:00:00 2001 From: philmoz Date: Wed, 1 Jan 2025 12:33:32 +1100 Subject: [PATCH] chore: cleanup compiler warnings, disable "unaligned pointer value" warning (#5743) --- cmake/toolchain/native.cmake | 2 + radio/src/CMakeLists.txt | 6 +- radio/src/edgetx_helpers.h | 5 - radio/src/functions.cpp | 1 + .../gui/colorlcd/model/special_functions.cpp | 2 +- radio/src/gui/common/stdlcd/radio_tools.cpp | 2 +- .../src/gui/common/stdlcd/view_telemetry.cpp | 2 +- radio/src/lua/lua_widget.cpp | 9 +- radio/src/strhelpers.cpp | 17 +- radio/src/targets/simu/module_drivers.cpp | 2 + radio/src/targets/simu/simpgmspace.cpp | 2 + radio/src/thirdparty/Lua/src/liolib.c | 302 +++++++++--------- radio/src/trainer.cpp | 1 - 13 files changed, 180 insertions(+), 173 deletions(-) diff --git a/cmake/toolchain/native.cmake b/cmake/toolchain/native.cmake index ff8fd7230..b27045a25 100644 --- a/cmake/toolchain/native.cmake +++ b/cmake/toolchain/native.cmake @@ -8,6 +8,8 @@ if(APPLE) set(CMAKE_CXX_FLAGS_DEBUG "-Wno-deprecated-declarations") endif() +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-address-of-packed-member") + if(MINGW OR WIN32) set(CMAKE_OBJECT_PATH_MAX 200) endif() diff --git a/radio/src/CMakeLists.txt b/radio/src/CMakeLists.txt index 5f33c1dbb..56ccdc437 100644 --- a/radio/src/CMakeLists.txt +++ b/radio/src/CMakeLists.txt @@ -496,7 +496,7 @@ find_program(BASH bash DOC "bash shell for firmware size report (eg. c:/cygwin/bin/bash.exe on Windows)." ) -set(OPT "s" CACHE STRING "Optimization mode (0/1/2/s") +set(OPT "s" CACHE STRING "Optimization mode (0/1/2/s)") set(COMMON_FLAGS "-mcpu=${MCU} -mthumb -fomit-frame-pointer -fverbose-asm -Wa,-ahlms=firmware.lst") set(COMMON_FLAGS "${COMMON_FLAGS} -gdwarf-2 -fno-exceptions -fdata-sections -ffunction-sections") @@ -505,7 +505,9 @@ set(COMMON_FLAGS "${COMMON_FLAGS} -O${OPT} ${FPU_FLAGS}") set(COMMON_FLAGS "${COMMON_FLAGS} ${WARNING_FLAGS}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMMON_FLAGS} -Wimplicit") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_FLAGS} -fno-rtti") + +# "-Wno-register" because ${THIRDPARTY_DIR}/STM32F2xx_HAL_Driver uses invalid C++17 storage class specifier +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_FLAGS} -fno-rtti -Wno-register") if(SDRAM) # Target with SDRAM do not need a custom allocator for now diff --git a/radio/src/edgetx_helpers.h b/radio/src/edgetx_helpers.h index b5104c246..afe5033c4 100644 --- a/radio/src/edgetx_helpers.h +++ b/radio/src/edgetx_helpers.h @@ -63,11 +63,6 @@ inline unsigned align32(unsigned n) return rest ? n + 4u - rest : n; } -inline std::string TEXT_AT_INDEX(const char *const *val, uint8_t idx) -{ - return std::string(val[idx]); -} - template inline void SWAP(T & a, T & b) { diff --git a/radio/src/functions.cpp b/radio/src/functions.cpp index 93e7572db..f72134589 100644 --- a/radio/src/functions.cpp +++ b/radio/src/functions.cpp @@ -163,6 +163,7 @@ void evalFunctions(CustomFunctionData * functions, CustomFunctionsContext & func #if defined(VIDEO_SWITCH) bool videoEnabled = false; #endif + for (uint8_t i=0; isetAvailableHandler(isSourceAvailableInResetSpecialFunction); choice->setTextHandler([=](int32_t value) { if (value < FUNC_RESET_PARAM_FIRST_TELEM) - return TEXT_AT_INDEX(STR_VFSWRESET, value); + return std::string(STR_VFSWRESET[value]); else return std::string( g_model.telemetrySensors[value - FUNC_RESET_PARAM_FIRST_TELEM] diff --git a/radio/src/gui/common/stdlcd/radio_tools.cpp b/radio/src/gui/common/stdlcd/radio_tools.cpp index 27e63d2ea..223ec3875 100644 --- a/radio/src/gui/common/stdlcd/radio_tools.cpp +++ b/radio/src/gui/common/stdlcd/radio_tools.cpp @@ -54,7 +54,7 @@ void displayRadioTool(uint8_t index) g_moduleIdx = reusableBuffer.radioTools.script[index].module; pushMenu(reusableBuffer.radioTools.script[index].tool); } - else if (reusableBuffer.radioTools.script[index].path != nullptr) { + else if (reusableBuffer.radioTools.script[index].path[0]) { char toolName[RADIO_TOOL_NAME_MAXLEN + 1]; if (!readToolName(toolName, reusableBuffer.radioTools.script[index].path)) { strAppendFilename(toolName, getBasename(reusableBuffer.radioTools.script[index].path), RADIO_TOOL_NAME_MAXLEN); diff --git a/radio/src/gui/common/stdlcd/view_telemetry.cpp b/radio/src/gui/common/stdlcd/view_telemetry.cpp index 45abc5ff8..e29039902 100644 --- a/radio/src/gui/common/stdlcd/view_telemetry.cpp +++ b/radio/src/gui/common/stdlcd/view_telemetry.cpp @@ -102,7 +102,7 @@ void showTelemScreen(uint8_t index) chainMenu(menuMainView); } else { index -= 1; - if ((index >= 0 && index <= TELEMETRY_SCREEN_TYPE_MAX) && (TELEMETRY_SCREEN_TYPE(index) != TELEMETRY_SCREEN_TYPE_NONE)) { + if ((index <= TELEMETRY_SCREEN_TYPE_MAX) && (TELEMETRY_SCREEN_TYPE(index) != TELEMETRY_SCREEN_TYPE_NONE)) { selectedTelemView = index; chainMenu(menuViewTelemetry); } diff --git a/radio/src/lua/lua_widget.cpp b/radio/src/lua/lua_widget.cpp index 54e44759d..44ad9d90b 100644 --- a/radio/src/lua/lua_widget.cpp +++ b/radio/src/lua/lua_widget.cpp @@ -92,7 +92,8 @@ void LuaEventHandler::event_cb(lv_event_t* e) // If we already have a SLIDE going, then accumulate slide values instead // of allocating an empty slot - if (LuaEventData* const es = luaGetEventSlot(EVT_TOUCH_SLIDE); es) { + LuaEventData* const es = luaGetEventSlot(EVT_TOUCH_SLIDE); + if (es) { es->event = EVT_TOUCH_SLIDE; es->touchX = rel_pos.x; es->touchY = rel_pos.y; @@ -103,7 +104,8 @@ void LuaEventHandler::event_cb(lv_event_t* e) TRACE("EVT_TOUCH_SLIDE [%d,%d]", rel_pos.x, rel_pos.y); } } else { - if (LuaEventData* const es = luaGetEventSlot(); es) { + LuaEventData* const es = luaGetEventSlot(); + if (es) { es->event = EVT_TOUCH_FIRST; es->touchX = rel_pos.x; es->touchY = rel_pos.y; @@ -116,7 +118,8 @@ void LuaEventHandler::event_cb(lv_event_t* e) downTime = RTOS_GET_MS(); } } else if (code == LV_EVENT_RELEASED) { - if (LuaEventData* const es = luaGetEventSlot(); es) { + LuaEventData* const es = luaGetEventSlot(); + if (es) { es->event = EVT_TOUCH_BREAK; TRACE("EVT_TOUCH_BREAK"); } diff --git a/radio/src/strhelpers.cpp b/radio/src/strhelpers.cpp index ea0c71544..0edaf629a 100644 --- a/radio/src/strhelpers.cpp +++ b/radio/src/strhelpers.cpp @@ -697,19 +697,16 @@ char *getSourceString(char (&destRef)[L], mixsrc_t idx) if (g_model.scriptsData[qr.quot].name[0] != '\0') { // instance Name is not empty : dest = InstanceName/OutputName - snprintf(pos, dest_len, "%.*s/%.*s", - (int)sizeof(g_model.scriptsData[qr.quot].name), - g_model.scriptsData[qr.quot].name, - (int)sizeof(scriptInputsOutputs[qr.quot].outputs[qr.rem].name), - scriptInputsOutputs[qr.quot].outputs[qr.rem].name); + pos = strAppend(pos, g_model.scriptsData[qr.quot].name, LEN_SCRIPT_NAME); } else { // instance Name is empty : dest = n-ScriptFileName/OutputName - snprintf(pos, dest_len, "%d-%.*s/%.*s", qr.quot + 1, - (int)sizeof(g_model.scriptsData[qr.quot].file), - g_model.scriptsData[qr.quot].file, - (int)sizeof(scriptInputsOutputs[qr.quot].outputs[qr.rem].name), - scriptInputsOutputs[qr.quot].outputs[qr.rem].name); + pos = strAppendUnsigned(pos, qr.quot + 1); + pos = strAppend(pos, "-"); + pos = strAppend(pos, g_model.scriptsData[qr.quot].file, LEN_SCRIPT_FILENAME); } + pos = strAppend(pos, "/"); + dest_len = L - (pos - dest); + strAppend(pos, scriptInputsOutputs[qr.quot].outputs[qr.rem].name, dest_len); } #else strncpy(dest, "N/A", dest_len-1); diff --git a/radio/src/targets/simu/module_drivers.cpp b/radio/src/targets/simu/module_drivers.cpp index 38de66c59..d990f1410 100644 --- a/radio/src/targets/simu/module_drivers.cpp +++ b/radio/src/targets/simu/module_drivers.cpp @@ -111,6 +111,7 @@ const etx_serial_driver_t _fakeSerialDriver = { .setBaudrateCb = nullptr, }; +#if defined(HARDWARE_EXTERNAL_MODULE) static void* module_timer_init(void* hw_def, const etx_timer_config_t* cfg) { return (void*)1; } @@ -125,6 +126,7 @@ const etx_timer_driver_t _fakeTimerDriver = { .deinit = module_timer_deinit, .send = module_timer_send, }; +#endif #if defined(HARDWARE_INTERNAL_MODULE) const etx_module_port_t _internal_ports[] = { diff --git a/radio/src/targets/simu/simpgmspace.cpp b/radio/src/targets/simu/simpgmspace.cpp index 7de944b5d..2229cc04a 100644 --- a/radio/src/targets/simu/simpgmspace.cpp +++ b/radio/src/targets/simu/simpgmspace.cpp @@ -627,8 +627,10 @@ const etx_serial_driver_t null_drv = { .setBaudrateCb = nullptr, }; +#if defined(AUX_SERIAL_PWR_GPIO) static void null_pwr_aux(uint8_t) {} #endif +#endif #if defined(AUX_SERIAL) #if defined(AUX_SERIAL_PWR_GPIO) diff --git a/radio/src/thirdparty/Lua/src/liolib.c b/radio/src/thirdparty/Lua/src/liolib.c index 018990cf6..6bda2f932 100644 --- a/radio/src/thirdparty/Lua/src/liolib.c +++ b/radio/src/thirdparty/Lua/src/liolib.c @@ -24,15 +24,15 @@ #include "FatFs/ff.h" -#define l_getc(f) fatfs_getc(f) -#define l_lockfile(f) ((void)0) -#define l_unlockfile(f) ((void)0) +// #define l_getc(f) fatfs_getc(f) +// #define l_lockfile(f) ((void)0) +// #define l_unlockfile(f) ((void)0) -static int fatfs_getc(FIL* f) { - char c; UINT result; - if (f_read(f, &c, 1, &result) == FR_OK && result == 1) return c; - return -1; -} +// static int fatfs_getc(FIL* f) { +// char c; UINT result; +// if (f_read(f, &c, 1, &result) == FR_OK && result == 1) return c; +// return -1; +// } /* ** Change this macro to accept other modes for 'fopen' besides @@ -61,48 +61,50 @@ static int l_checkmode (const char *mode) { ** ======================================================= */ -// #if !defined(l_popen) /* { */ +#if 0 +#if !defined(l_popen) /* { */ -// #if defined(LUA_USE_POSIX) /* { */ +#if defined(LUA_USE_POSIX) /* { */ -// #define l_popen(L,c,m) (fflush(NULL), popen(c,m)) -// #define l_pclose(L,file) (pclose(file)) +#define l_popen(L,c,m) (fflush(NULL), popen(c,m)) +#define l_pclose(L,file) (pclose(file)) -// #elif defined(LUA_USE_WINDOWS) /* }{ */ +#elif defined(LUA_USE_WINDOWS) /* }{ */ -// #define l_popen(L,c,m) (_popen(c,m)) -// #define l_pclose(L,file) (_pclose(file)) +#define l_popen(L,c,m) (_popen(c,m)) +#define l_pclose(L,file) (_pclose(file)) -// #else /* }{ */ +#else /* }{ */ -// /* ISO C definitions */ -// #define l_popen(L,c,m) \ -// ((void)((void)c, m), \ -// luaL_error(L, "'popen' not supported"), \ -// (FILE*)0) -// #define l_pclose(L,file) ((void)L, (void)file, -1) +/* ISO C definitions */ +#define l_popen(L,c,m) \ + ((void)((void)c, m), \ + luaL_error(L, "'popen' not supported"), \ + (FILE*)0) +#define l_pclose(L,file) ((void)L, (void)file, -1) -// #endif /* } */ +#endif /* } */ -// #endif /* } */ +#endif /* } */ +#endif /* }====================================================== */ +#if 0 +#if !defined(l_getc) /* { */ -// #if !defined(l_getc) /* { */ - -// #if defined(LUA_USE_POSIX) -// #define l_getc(f) getc_unlocked(f) -// #define l_lockfile(f) flockfile(f) -// #define l_unlockfile(f) funlockfile(f) -// #else -// #define l_getc(f) getc(f) -// #define l_lockfile(f) ((void)0) -// #define l_unlockfile(f) ((void)0) -// #endif - -// #endif /* } */ +#if defined(LUA_USE_POSIX) +#define l_getc(f) getc_unlocked(f) +#define l_lockfile(f) flockfile(f) +#define l_unlockfile(f) funlockfile(f) +#else +#define l_getc(f) getc(f) +#define l_lockfile(f) ((void)0) +#define l_unlockfile(f) ((void)0) +#endif +#endif /* } */ +#endif /* ** {====================================================== @@ -110,34 +112,36 @@ static int l_checkmode (const char *mode) { ** ======================================================= */ -// #if !defined(l_fseek) /* { */ +#if 0 +#if !defined(l_fseek) /* { */ -// #if defined(LUA_USE_POSIX) /* { */ +#if defined(LUA_USE_POSIX) /* { */ -// #include +#include -// #define l_fseek(f,o,w) fseeko(f,o,w) -// #define l_ftell(f) ftello(f) -// #define l_seeknum off_t +#define l_fseek(f,o,w) fseeko(f,o,w) +#define l_ftell(f) ftello(f) +#define l_seeknum off_t -// #elif defined(LUA_USE_WINDOWS) && !defined(_CRTIMP_TYPEINFO) \ -// && defined(_MSC_VER) && (_MSC_VER >= 1400) /* }{ */ +#elif defined(LUA_USE_WINDOWS) && !defined(_CRTIMP_TYPEINFO) \ + && defined(_MSC_VER) && (_MSC_VER >= 1400) /* }{ */ -// /* Windows (but not DDK) and Visual C++ 2005 or higher */ -// #define l_fseek(f,o,w) _fseeki64(f,o,w) -// #define l_ftell(f) _ftelli64(f) -// #define l_seeknum __int64 +/* Windows (but not DDK) and Visual C++ 2005 or higher */ +#define l_fseek(f,o,w) _fseeki64(f,o,w) +#define l_ftell(f) _ftelli64(f) +#define l_seeknum __int64 -// #else /* }{ */ +#else /* }{ */ -// /* ISO C definitions */ -// #define l_fseek(f,o,w) fseek(f,o,w) -// #define l_ftell(f) ftell(f) -// #define l_seeknum long +/* ISO C definitions */ +#define l_fseek(f,o,w) fseek(f,o,w) +#define l_ftell(f) ftell(f) +#define l_seeknum long -// #endif /* } */ +#endif /* } */ -// #endif /* } */ +#endif /* } */ +#endif /* }====================================================== */ @@ -206,12 +210,12 @@ static LStream *newprefile (lua_State *L) { ** a bug in some versions of the Clang compiler (e.g., clang 3.0 for ** 32 bits). */ -static int aux_close (lua_State *L) { - LStream *p = tolstream(L); - volatile lua_CFunction cf = p->closef; - p->closef = NULL; /* mark stream as closed */ - return (*cf)(L); /* close it */ -} +// static int aux_close (lua_State *L) { +// LStream *p = tolstream(L); +// volatile lua_CFunction cf = p->closef; +// p->closef = NULL; /* mark stream as closed */ +// return (*cf)(L); /* close it */ +// } // static int file_close (lua_State *L) { @@ -285,14 +289,14 @@ static int io_open (lua_State *L) { ? luaL_fileresult(L, 0, filename) : 1; } -static FIL *getiofile (lua_State *L, const char *findex) { - LStream *p; - lua_getfield(L, LUA_REGISTRYINDEX, findex); - p = (LStream *)lua_touserdata(L, -1); - if (isclosed(p)) - luaL_error(L, "standard %s file is closed", findex + IOPREF_LEN); - return &p->f; -} +// static FIL *getiofile (lua_State *L, const char *findex) { +// LStream *p; +// lua_getfield(L, LUA_REGISTRYINDEX, findex); +// p = (LStream *)lua_touserdata(L, -1); +// if (isclosed(p)) +// luaL_error(L, "standard %s file is closed", findex + IOPREF_LEN); +// return &p->f; +// } // static int g_iofile (lua_State *L, const char *f, const char *mode) { @@ -375,44 +379,44 @@ static FIL *getiofile (lua_State *L, const char *findex) { */ -static int test_eof (lua_State *L, FIL *f) { - lua_pushliteral(L, ""); - return !f_eof(f); -} +// static int test_eof (lua_State *L, FIL *f) { +// lua_pushliteral(L, ""); +// return !f_eof(f); +// } -static int read_line (lua_State *L, FIL *f, int chop) { - luaL_Buffer b; - int c = '\0'; - luaL_buffinit(L, &b); - while (c != EOF && c != '\n') { /* repeat until end of line */ - char *buff = luaL_prepbuffer(&b); /* preallocate buffer */ - int i = 0; - l_lockfile(f); /* no memory errors can happen inside the lock */ - while (i < LUAL_BUFFERSIZE && (c = l_getc(f)) != EOF && c != '\n') - buff[i++] = c; - l_unlockfile(f); - luaL_addsize(&b, i); - } - if (!chop && c == '\n') /* want a newline and have one? */ - luaL_addchar(&b, c); /* add ending newline to result */ - luaL_pushresult(&b); /* close buffer */ - /* return ok if read something (either a newline or something else) */ - return (c == '\n' || lua_rawlen(L, -1) > 0); -} +// static int read_line (lua_State *L, FIL *f, int chop) { +// luaL_Buffer b; +// int c = '\0'; +// luaL_buffinit(L, &b); +// while (c != EOF && c != '\n') { /* repeat until end of line */ +// char *buff = luaL_prepbuffer(&b); /* preallocate buffer */ +// int i = 0; +// l_lockfile(f); /* no memory errors can happen inside the lock */ +// while (i < LUAL_BUFFERSIZE && (c = l_getc(f)) != EOF && c != '\n') +// buff[i++] = c; +// l_unlockfile(f); +// luaL_addsize(&b, i); +// } +// if (!chop && c == '\n') /* want a newline and have one? */ +// luaL_addchar(&b, c); /* add ending newline to result */ +// luaL_pushresult(&b); /* close buffer */ +// /* return ok if read something (either a newline or something else) */ +// return (c == '\n' || lua_rawlen(L, -1) > 0); +// } -static void read_all (lua_State *L, FIL *f) { - UINT nr; - luaL_Buffer b; - luaL_buffinit(L, &b); - do { /* read file in chunks of LUAL_BUFFERSIZE bytes */ - char *p = luaL_prepbuffer(&b); - if (f_read(f, p, LUAL_BUFFERSIZE, &nr) != FR_OK) nr = 0; - luaL_addsize(&b, nr); - } while (nr == LUAL_BUFFERSIZE); - luaL_pushresult(&b); /* close buffer */ -} +// static void read_all (lua_State *L, FIL *f) { +// UINT nr; +// luaL_Buffer b; +// luaL_buffinit(L, &b); +// do { /* read file in chunks of LUAL_BUFFERSIZE bytes */ +// char *p = luaL_prepbuffer(&b); +// if (f_read(f, p, LUAL_BUFFERSIZE, &nr) != FR_OK) nr = 0; +// luaL_addsize(&b, nr); +// } while (nr == LUAL_BUFFERSIZE); +// luaL_pushresult(&b); /* close buffer */ +// } static int read_chars (lua_State *L, FIL *f, size_t n) { @@ -428,51 +432,51 @@ static int read_chars (lua_State *L, FIL *f, size_t n) { } -static int g_read (lua_State *L, FIL *f, int first) { - int nargs = lua_gettop(L) - 1; - int success; - int n; - f_error(f) = 0; - if (nargs == 0) { /* no arguments? */ - success = read_line(L, f, 1); - n = first+1; /* to return 1 result */ - } - else { /* ensure stack space for all results and for auxlib's buffer */ - luaL_checkstack(L, nargs+LUA_MINSTACK, "too many arguments"); - success = 1; - for (n = first; nargs-- && success; n++) { - if (lua_type(L, n) == LUA_TNUMBER) { - size_t l = (size_t)luaL_checkinteger(L, n); - success = (l == 0) ? test_eof(L, f) : read_chars(L, f, l); - } - else { - const char *p = luaL_checkstring(L, n); - if (*p == '*') p++; /* skip optional '*' (for compatibility) */ - switch (*p) { - case 'l': /* line */ - success = read_line(L, f, 1); - break; - case 'L': /* line with end-of-line */ - success = read_line(L, f, 0); - break; - case 'a': /* file */ - read_all(L, f); /* read entire file */ - success = 1; /* always success */ - break; - default: - return luaL_argerror(L, n, "invalid format"); - } - } - } - } - if (f_error(f)) - return luaL_fileresult(L, 0, NULL); - if (!success) { - lua_pop(L, 1); /* remove last result */ - lua_pushnil(L); /* push nil instead */ - } - return n - first; -} +// static int g_read (lua_State *L, FIL *f, int first) { +// int nargs = lua_gettop(L) - 1; +// int success; +// int n; +// f_error(f) = 0; +// if (nargs == 0) { /* no arguments? */ +// success = read_line(L, f, 1); +// n = first+1; /* to return 1 result */ +// } +// else { /* ensure stack space for all results and for auxlib's buffer */ +// luaL_checkstack(L, nargs+LUA_MINSTACK, "too many arguments"); +// success = 1; +// for (n = first; nargs-- && success; n++) { +// if (lua_type(L, n) == LUA_TNUMBER) { +// size_t l = (size_t)luaL_checkinteger(L, n); +// success = (l == 0) ? test_eof(L, f) : read_chars(L, f, l); +// } +// else { +// const char *p = luaL_checkstring(L, n); +// if (*p == '*') p++; /* skip optional '*' (for compatibility) */ +// switch (*p) { +// case 'l': /* line */ +// success = read_line(L, f, 1); +// break; +// case 'L': /* line with end-of-line */ +// success = read_line(L, f, 0); +// break; +// case 'a': /* file */ +// read_all(L, f); /* read entire file */ +// success = 1; /* always success */ +// break; +// default: +// return luaL_argerror(L, n, "invalid format"); +// } +// } +// } +// } +// if (f_error(f)) +// return luaL_fileresult(L, 0, NULL); +// if (!success) { +// lua_pop(L, 1); /* remove last result */ +// lua_pushnil(L); /* push nil instead */ +// } +// return n - first; +// } // static int io_read (lua_State *L) { diff --git a/radio/src/trainer.cpp b/radio/src/trainer.cpp index d4865263c..fc77431bc 100644 --- a/radio/src/trainer.cpp +++ b/radio/src/trainer.cpp @@ -92,7 +92,6 @@ void checkTrainerSignalWarning() static void trainer_init_module_sbus(); static void trainer_stop_module_sbus(); -static int sbus_trainer_get_byte(uint8_t* data); void stopTrainer() {