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): Custom mix script as SOURCE not parsed correctly #4231

Merged
merged 1 commit into from
Nov 5, 2023

Conversation

philmoz
Copy link
Collaborator

@philmoz philmoz commented Oct 22, 2023

Fixes #4230

When a custom mix script is used as a source input the value is stored as 'lua(x,y)' in the YAML file.
The ',' inside the brackets confuses the YAML parser and the value is not read back correctly.

This PR fixes the YAML parser to handle this case.

@philmoz
Copy link
Collaborator Author

philmoz commented Oct 22, 2023

This should probably be added to 2.9.2 as well as 2.10.

@pfeerick pfeerick added bug 🪲 Something isn't working storage Related to loading, saving, converting labels Oct 23, 2023
@pfeerick pfeerick added this to the 2.9.2 milestone Oct 23, 2023
@boomerwing
Copy link

Thank you for the very quick action on this issue.

@pfeerick
Copy link
Member

pfeerick commented Nov 4, 2023

@raphaelcoeffic For a unit test for this, this is an example of code that was failing to be read back after a power cycle.

logicalSw: 
   0:
      func: FUNC_VEQUAL
      def: "lua(0,0),1"
      andsw: "NONE"
      delay: 0
      duration: 0
customFn: 
  0:
     swtch: "L2"
     func: PLAY_VALUE
     def: "lua(0,0),1x"

This at least visually would be retained unlike the other two...

mixData: 
 -
   weight: 100
   destCh: 0
   srcRaw: lua(0,0)
   carryTrim: 0
   mixWarn: 0
   mltpx: ADD
   offset: 0
   swtch: "NONE"
   flightModes: 000000000
   delayUp: 0
   delayDown: 0
   speedUp: 0
   speedDown: 0
   name: ""

@pfeerick pfeerick changed the title fix(radio): Custom mix script as source not parsed correctly. fix(radio): Custom mix script as SOURCE not parsed correctly Nov 5, 2023
@pfeerick pfeerick merged commit 3051f70 into EdgeTX:main Nov 5, 2023
37 checks passed
@pfeerick pfeerick added the needs: unit tests Unit tests are needed to for continuous validation label Nov 5, 2023
pfeerick added a commit that referenced this pull request Nov 12, 2023
@pfeerick pfeerick modified the milestones: 2.9.2, 2.9.x Nov 23, 2023
pfeerick added a commit that referenced this pull request Nov 27, 2023
pfeerick added a commit that referenced this pull request Dec 3, 2023
@philmoz philmoz deleted the fix-yaml-custom-mix branch January 24, 2024 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working needs: unit tests Unit tests are needed to for continuous validation storage Related to loading, saving, converting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lua output as a Logical Switch input is not permanent in EdgeTX 2.9.1
3 participants