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 parsing Macros Change String Value command #505

Merged

Conversation

martonmiklos
Copy link
Contributor

@martonmiklos martonmiklos commented Nov 11, 2024

Fixes Open-Agriculture/AgIsoVirtualTerminal#39

Describe your changes

Most of the commands supported by the macros are 8 byte long. there are 3 exceptions so far:

  • Change String Value command (handled by the changes in this PR)
  • Change Child Position (already handled in the code)
  • Graphics Context command (this is a deeper rabbit hole, marked with FIXME, will be handled in a future PR)

I did a regexps search for Data length:\n\s*^[8V9] in the ISO 11783-6:2018(E) and did not found any other commands with different lengths.

I also optimized a bit of the macro command supported check logic.

How has this been tested?

Loaded an IOP with containing a macro with Change String commands.

@ad3154 ad3154 self-assigned this Nov 14, 2024
@ad3154 ad3154 added the iso: virtual terminal Related to the ISO-11783:7 standard label Nov 14, 2024
@ad3154 ad3154 merged commit 6aa462f into Open-Agriculture:main Nov 14, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iso: virtual terminal Related to the ISO-11783:7 standard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handling variable length commands in macros are broken
2 participants