chore: use settings from radio JSON files instead of hal.h (#7411)

Co-authored-by: 3djc <3djc@gh.com>
This commit is contained in:
philmoz
2026-07-13 10:15:50 +10:00
committed by GitHub
co-authored by 3djc
parent 445c09f662
commit f3cabd42f7
100 changed files with 3290 additions and 2193 deletions
+2 -11
View File
@@ -40,17 +40,6 @@ set(SIMU_DRIVERS
abnormal_reboot.cpp
)
set(HW_DESC_JSON ${FLAVOUR}.json)
AddHWGenTarget(${HW_DESC_JSON} simu_keys simu_keys.inc)
AddHWGenTarget(${HW_DESC_JSON} simu_switches simu_switches.inc)
AddHWGenTarget(${HW_DESC_JSON} hal_adc_inputs hal_adc_inputs.inc)
set(SIMU_DRIVERS ${SIMU_DRIVERS}
${CMAKE_CURRENT_BINARY_DIR}/simu_keys.inc
${CMAKE_CURRENT_BINARY_DIR}/simu_switches.inc
${CMAKE_CURRENT_BINARY_DIR}/hal_adc_inputs.inc
)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
# Pack all simu driver sources into an object lib
@@ -58,6 +47,8 @@ add_library(simu_drivers OBJECT EXCLUDE_FROM_ALL
${SIMU_DRIVERS}
)
add_dependencies(simu_drivers simu_keys simu_switches hal_settings hal_keys hal_adc_inputs lua_inputs lua_mixsrc lua_keys yaml_inputs)
get_property(SIMU_SRC_OPTIONS
TARGET radiolib_native
PROPERTY INTERFACE_COMPILE_OPTIONS
+3 -3
View File
@@ -53,7 +53,7 @@ void lcdRefresh()
#include <lvgl/lvgl.h>
#if defined(LCD_VERTICAL_INVERT)
#if LCD_VERTICAL_INVERT
static pixel_t _LCD_BUF1[DISPLAY_BUFFER_SIZE] __SDRAM;
static pixel_t _LCD_BUF2[DISPLAY_BUFFER_SIZE] __SDRAM;
@@ -98,7 +98,7 @@ pixel_t* simuLcdBuf = nullptr;
static void simuRefreshLcd(lv_disp_drv_t * disp_drv, uint16_t *buffer, const rect_t& copy_area)
{
#if !defined(LCD_VERTICAL_INVERT) // rename into "Use direct mode" ???
#if !LCD_VERTICAL_INVERT // rename into "Use direct mode" ???
// Direct mode: driver flush is called on final LVGL flush
// simply set LVGL's buffer as our current frame buffer
@@ -162,7 +162,7 @@ void lcdSetInitalFrameBuffer(void*) {}
void lcdInit()
{
#if defined(LCD_VERTICAL_INVERT)
#if LCD_VERTICAL_INVERT
memset(_LCD_BUF1, 0, sizeof(_LCD_BUF1));
memset(_LCD_BUF2, 0, sizeof(_LCD_BUF2));
#endif