From dbcce40d6c72c78b43a0091723d4e33c6ef2899b Mon Sep 17 00:00:00 2001 From: Gary Bisaga Date: Thu, 18 Jul 2024 07:02:50 -0400 Subject: [PATCH] fix: use configured DR switch in plane wizard (#158) --- .../c480x272/TEMPLATES/1.Wizard/1.Plane.lua | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/sdcard/c480x272/TEMPLATES/1.Wizard/1.Plane.lua b/sdcard/c480x272/TEMPLATES/1.Wizard/1.Plane.lua index d95dab4..27f9cf7 100644 --- a/sdcard/c480x272/TEMPLATES/1.Wizard/1.Plane.lua +++ b/sdcard/c480x272/TEMPLATES/1.Wizard/1.Plane.lua @@ -606,8 +606,13 @@ local function runConfigSummary(event) drawNextLine("Gear Channel", nil, "None") end - -- expo - drawNextLine("Dual Rate", nil, AdditionalSettingsFields.is_dual_rate.avail_values[1 + AdditionalSettingsFields.is_dual_rate.value]) + -- expo0 + drawNextLine("Dual Rate", nil, + AdditionalSettingsFields.is_dual_rate.avail_values[1 + AdditionalSettingsFields.is_dual_rate.value] .. + (AdditionalSettingsFields.is_dual_rate.value == 1 and + " (" .. AdditionalSettingsFields.dr_switch.avail_values[1 + AdditionalSettingsFields.dr_switch.value] .. ")" or + "") + ) drawNextLine("Expo", nil, AdditionalSettingsFields.expo.value) -- arm switch @@ -676,14 +681,15 @@ local function createModel(event) -- input lines local expoVal = AdditionalSettingsFields.expo.value local is_dual_rate = (AdditionalSettingsFields.is_dual_rate.value == 1) + local dr_switch = AdditionalSettingsFields.dr_switch.avail_values[1 + AdditionalSettingsFields.dr_switch.value] if (is_dual_rate) then - updateInputLine(defaultChannel_0_AIL, 0, expoVal, 100, "SC" .. CHAR_UP) - updateInputLine(defaultChannel_0_AIL, 1, expoVal, 75 , "SC-") - updateInputLine(defaultChannel_0_AIL, 2, expoVal, 50 , "SC" .. CHAR_DOWN) + updateInputLine(defaultChannel_0_AIL, 0, expoVal, 100, dr_switch .. CHAR_UP) + updateInputLine(defaultChannel_0_AIL, 1, expoVal, 75 , dr_switch .. "-") + updateInputLine(defaultChannel_0_AIL, 2, expoVal, 50 , dr_switch .. CHAR_DOWN) - updateInputLine(defaultChannel_0_ELE, 0, expoVal, 100, "SC" .. CHAR_UP) - updateInputLine(defaultChannel_0_ELE, 1, expoVal, 75 , "SC-") - updateInputLine(defaultChannel_0_ELE, 2, expoVal, 50 , "SC" .. CHAR_DOWN) + updateInputLine(defaultChannel_0_ELE, 0, expoVal, 100, dr_switch .. CHAR_UP) + updateInputLine(defaultChannel_0_ELE, 1, expoVal, 75 , dr_switch .. "-") + updateInputLine(defaultChannel_0_ELE, 2, expoVal, 50 , dr_switch .. CHAR_DOWN) updateInputLine(defaultChannel_0_RUD, 0, expoVal, 100, nil) else