Skip to content

Commit

Permalink
fix(wizard): Multicoptor AIL and RUD mix sources swapped
Browse files Browse the repository at this point in the history
Fixes #128
  • Loading branch information
pfeerick authored Feb 6, 2024
1 parent 4ca86de commit 6a6358b
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions sdcard/c480x272/TEMPLATES/1.Wizard/5.Multirotor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ local pages = {}
local fields = {}
local switches = {"SA", "SB", "SC", "SD", "SE", "SF", "SG"}

local STICK_NUMBER_AIL = 3
local STICK_NUMBER_ELE = 1
local STICK_NUMBER_THR = 2
local STICK_NUMBER_RUD = 0

chdir("/TEMPLATES/1.Wizard")
-- load common Bitmaps
local ImgMarkBg = Bitmap.open("img/mark_bg.png")
Expand Down Expand Up @@ -139,7 +144,7 @@ end


local ThrottleFields = {
{50, 50, COMBO, 1, defaultChannel(2), { "CH1", "CH2", "CH3", "CH4", "CH5", "CH6", "CH7", "CH8" } },
{50, 50, COMBO, 1, defaultChannel(STICK_NUMBER_THR), { "CH1", "CH2", "CH3", "CH4", "CH5", "CH6", "CH7", "CH8" } },
}

local ThrottleBackground
Expand All @@ -160,7 +165,7 @@ local function runThrottleConfig(event)
end

local RollFields = {
{50, 50, COMBO, 1, defaultChannel(3), { "CH1", "CH2", "CH3", "CH4", "CH5", "CH6", "CH7", "CH8" } },
{50, 50, COMBO, 1, defaultChannel(STICK_NUMBER_AIL), { "CH1", "CH2", "CH3", "CH4", "CH5", "CH6", "CH7", "CH8" } },
}

local RollBackground
Expand All @@ -182,7 +187,7 @@ local function runRollConfig(event)
end

local PitchFields = {
{50, 50, COMBO, 1, defaultChannel(1), { "CH1", "CH2", "CH3", "CH4", "CH5", "CH6", "CH7", "CH8" } },
{50, 50, COMBO, 1, defaultChannel(STICK_NUMBER_ELE), { "CH1", "CH2", "CH3", "CH4", "CH5", "CH6", "CH7", "CH8" } },
}

local PitchBackground
Expand All @@ -204,7 +209,7 @@ local function runPitchConfig(event)
end

local YawFields = {
{50, 50, COMBO, 1, defaultChannel(0), { "CH1", "CH2", "CH3", "CH4", "CH5", "CH6", "CH7", "CH8" } },
{50, 50, COMBO, 1, defaultChannel(STICK_NUMBER_RUD), { "CH1", "CH2", "CH3", "CH4", "CH5", "CH6", "CH7", "CH8" } },
}

local YawBackground
Expand Down Expand Up @@ -361,13 +366,13 @@ local function createModel(event)
model.defaultInputs()
model.deleteMixes()
-- throttle
addMix(ThrottleFields[1][5], MIXSRC_FIRST_INPUT+defaultChannel(2), "Thr")
addMix(ThrottleFields[1][5], MIXSRC_FIRST_INPUT+defaultChannel(STICK_NUMBER_THR), "Thr")
-- roll
addMix(RollFields[1][5], MIXSRC_FIRST_INPUT+defaultChannel(0), "Roll")
addMix(RollFields[1][5], MIXSRC_FIRST_INPUT+defaultChannel(STICK_NUMBER_AIL), "Roll")
-- pitch
addMix(PitchFields[1][5], MIXSRC_FIRST_INPUT+defaultChannel(1), "Pitch")
addMix(PitchFields[1][5], MIXSRC_FIRST_INPUT+defaultChannel(STICK_NUMBER_ELE), "Pitch")
-- yaw
addMix(YawFields[1][5], MIXSRC_FIRST_INPUT+defaultChannel(3), "Yaw")
addMix(YawFields[1][5], MIXSRC_FIRST_INPUT+defaultChannel(STICK_NUMBER_RUD), "Yaw")
addMix(4, MIXSRC_SA + ArmFields[1][5], "Arm")
addMix(5, MIXSRC_SA + BeeperFields[1][5], "Beeper")
addMix(6, MIXSRC_SA + ModeFields[1][5], "Mode")
Expand Down

0 comments on commit 6a6358b

Please sign in to comment.