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

Handle repeat arguments in steps #1

Closed
camargo opened this issue Feb 2, 2023 · 2 comments · Fixed by #4
Closed

Handle repeat arguments in steps #1

camargo opened this issue Feb 2, 2023 · 2 comments · Fixed by #4
Assignees
Labels
breaking change A change that will require updating downstream code feature A new feature or feature request

Comments

@camargo
Copy link
Member

camargo commented Feb 2, 2023

This is to add arrays to the args to handle repeat arguments. For example for a command step this would look something like:

{
  "stem": "FAKE_COMMAND1",
  "args": [
    { "hex": "0xFFFFFFFF" },
    [
      [0, 1],
      [0, 1]
    ]
  ],
  "time": { "type": "COMMAND_COMPLETE" },
  "type": "command"
}

Where the second argument is a repeat arg with two repeating arguments, each consisting of two number arguments. The first argument is not a repeat arg.

@camargo camargo added feature A new feature or feature request breaking change A change that will require updating downstream code labels Feb 2, 2023
@camargo camargo changed the title Handle repeat arguments in step args Handle repeat arguments in steps Feb 2, 2023
@cohansen
Copy link
Collaborator

cohansen commented Feb 3, 2023

Due to the changes in #3 would this actually become:

{
  "stem": "FAKE_COMMAND1",
  "args": [
    { "hex": "0xFFFFFFFF" },
    [
      [{ "number": 0 }, { "number": 1 }],
      [{ "number": 0 }, { "number": 1 }]
    ]
  ],
  "time": { "type": "COMMAND_COMPLETE" },
  "type": "command"
}

Or are we handling repeat args differently?

@camargo
Copy link
Member Author

camargo commented Feb 3, 2023

@cohansen Yeah I think that's correct. Or maybe:

{
  "stem": "FAKE_COMMAND1",
  "args": [
    { "hex": "0xFFFFFFFF" },
    {
      "repeat": [
        [{ "number": 0 }, { "number": 1 }],
        [{ "number": 0 }, { "number": 1 }]
      ]
    }
  ],
  "time": { "type": "COMMAND_COMPLETE" },
  "type": "command"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change A change that will require updating downstream code feature A new feature or feature request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants