Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(radio): Lua insertMix function not working #4129

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

philmoz
Copy link
Collaborator

@philmoz philmoz commented Sep 28, 2023

Fixes #4128

Needs to be applied to 2.9 as well as main. Broken in PR #4008/#3999

@pfeerick pfeerick added the bug/regression ↩️ A new version of EdgeTX broke something label Sep 28, 2023
@pfeerick pfeerick added this to the 2.9.1 milestone Sep 28, 2023
@pfeerick
Copy link
Member

pfeerick commented Sep 29, 2023

LGTM... Lua is now correctly inserting and manual insert is still working (2.9 does not need the mixes.cpp change).

local function init()
  model.insertMix(8,0, {name="Gain9M", switch=19, source=118, weight=80, multiplex=0, speedDown=0, speedUp=0, delayDown=0, delayUp=0, carryTrim=true, offset=0, flightModes=0, curveValue=0, curveType=0})
  model.insertMix(8,1, {name="Gain9+", switch=20, source=110, weight=30, multiplex=0, speedDown=0, speedUp=0, delayDown=0, delayUp=0, carryTrim=true, offset=0, flightModes=0, curveValue=0, curveType=0})
  model.insertMix(8,2, {name="Gain9", switch=21, source=110, weight=25, multiplex=0, speedDown=0, speedUp=0, delayDown=0, delayUp=0, carryTrim=true, offset=0, flightModes=0, curveValue=0, curveType=0})
end

local function run(event, touchState)
  return 1
end

return { run=run, init=init }

@pfeerick pfeerick changed the title fix(radio): Fix insertMix function (broken in PR 4008). fix(radio): Lua insertMix function not working Sep 29, 2023
@pfeerick pfeerick merged commit a60cf67 into EdgeTX:main Sep 29, 2023
37 checks passed
@philmoz philmoz deleted the fix-insert-mixes branch January 9, 2024 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/regression ↩️ A new version of EdgeTX broke something
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mixers can no longer be inserted correctly via lua
2 participants