Closed kstruyven closed 5 years ago
I have committed a change such that you can now also issue a command by passing arguments in a dictionary. For example:
Yamcs.issueCommand('/some/command', { arg1: "a , comma", arg2: 1234})
Will you need a new v1.0.x release? v1.0.2 is very old btw.
The change is included as of yamcs-studio v1.0.6.
I would recommend to use this new way of issuing commands whenever possible. Sending via a single string remains functional as before, but its implementation is indeed a bit simplistic. I'm not sure yet that I want to work on a fancier string parser, because i think the new way is a better approach. So.. closed for now.
When sending a command with a display, we use the issueCommand() function that has the complete command as argument (string). When that command has an argument whichs value is a string, that string is not allowed to contain a comma since it will interpret it as a new argument and thus returning a ArrayIndexOutofBoundsException. Adding quotes around the argument is also producing the same error.