Skip to content

Commit 0ff73cc

Browse files
pfeerickraphaelcoeffic
authored andcommitted
feat(color): enable LUA_MIXER, hidden by default (#3973)
1 parent 160dd71 commit 0ff73cc

File tree

6 files changed

+15
-8
lines changed

6 files changed

+15
-8
lines changed

radio/src/CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ if(SDL2_FOUND)
3636
option(SIMU_AUDIO "Enable simulator audio." ON)
3737
endif()
3838
option(LUA "Enable LUA support" ON)
39-
option(LUA_MIXER "Enable LUA mixer/model scripts support" OFF)
4039
option(SIMU_DISKIO "Enable disk IO simulation in simulator. Simulator will use FatFs module and simulated IO layer that uses \"./sdcard.image\" file as image of SD card. This file must contain whole SD card from first to last sector" OFF)
4140
option(SIMU_LUA_COMPILER "Pre-compile and save Lua scripts in simulator." ON)
4241
option(FAS_PROTOTYPE "Support of old FAS prototypes (different resistors)" OFF)
@@ -188,14 +187,16 @@ if(RTC_BACKUP_RAM)
188187
add_custom_target(datacopy DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/datacopy.cpp)
189188
endif()
190189

191-
if(LUA)
192-
include(lua/CMakeLists.txt)
193-
endif()
190+
option(LUA_MIXER "Enable LUA mixer/model scripts support" OFF)
194191

195192
if (LUA_MIXER AND NOT LUA)
196193
message(FATAL_ERROR "LUA_MIXER requires LUA!!")
197194
endif()
198195

196+
if(LUA)
197+
include(lua/CMakeLists.txt)
198+
endif()
199+
199200
if(HELI)
200201
add_definitions(-DHELI)
201202
endif()

radio/src/model_init.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,8 @@ void applyDefaultTemplate()
137137
g_model.switchWarningState |= (1 << (3*i));
138138
}
139139
#endif
140-
141-
// TODO: what about switch warnings in non-color LCD radios?
142140
}
143141

144-
145142
void setModelDefaults(uint8_t id)
146143
{
147144
memset(&g_model, 0, sizeof(g_model));
@@ -155,7 +152,7 @@ void setModelDefaults(uint8_t id)
155152
#endif
156153
strAppendUnsigned(strAppend(g_model.header.name, STR_MODEL), id, 2);
157154

158-
#if defined(LUA) && defined(PCBTARANIS) // Horus uses menuModelWizard() for wizard
155+
#if defined(LUA) && defined(PCBTARANIS)
159156
if (isFileAvailable(WIZARD_PATH "/" WIZARD_NAME)) {
160157
f_chdir(WIZARD_PATH);
161158
luaExec(WIZARD_NAME);

radio/src/opentx.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,9 @@ void generalDefault()
439439
g_eeGeneral.audioMuteEnable = 1;
440440
#endif
441441

442+
// disable Custom Script
443+
g_eeGeneral.modelCustomScriptsDisabled = true;
444+
442445
g_eeGeneral.chkSum = 0xFFFF;
443446
}
444447

radio/src/storage/sdcard_common.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,10 @@ void storageReadAll()
180180
modelslist.clear();
181181
#endif
182182

183+
// Some radio defaults overriden by config loading:
184+
// - screens disabled by default:
185+
g_eeGeneral.modelCustomScriptsDisabled = true;
186+
183187
if (loadRadioSettings() != nullptr) {
184188
storageEraseAll(true);
185189
}

radio/src/targets/horus/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ option(AFHDS3 "AFHDS3 TX Module" ON)
77
option(MULTIMODULE "DIY Multiprotocol TX Module (https://github.com/pascallanger/DIY-Multiprotocol-TX-Module)" ON)
88
option(GHOST "Ghost TX Module" ON)
99
option(SPACEMOUSE "Support for SpaceMouse" OFF)
10+
option(LUA_MIXER "Enable LUA mixer/model scripts support" ON)
1011

1112
set(PWR_BUTTON "PRESS" CACHE STRING "Pwr button type (PRESS/SWITCH)")
1213
set(CPU_TYPE STM32F4)

radio/src/targets/nv14/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ option(AFHDS2 "Support for AFHDS2" ON)
66
option(GHOST "Ghost TX Module" ON)
77
option(PXX1 "PXX1 protocol support" ON)
88
option(PXX2 "PXX2 protocol support" OFF)
9+
option(LUA_MIXER "Enable LUA mixer/model scripts support" ON)
910

1011
set(PWR_BUTTON "PRESS" CACHE STRING "Pwr button type (PRESS/SWITCH)")
1112
set(CPU_TYPE STM32F4)

0 commit comments

Comments
 (0)