yamcs / yamcs-studio

Desktop TM/TC Client for Yamcs
https://docs.yamcs.org/yamcs-studio/
Eclipse Public License 2.0
27 stars 14 forks source link

Yamcs.issueCommand with arguments not working #116

Closed PilotWave closed 2 years ago

PilotWave commented 2 years ago

I am trying to issue commands with arguments in scripts using the Yamcs.issueCommand function and it will not pass the parameters. I created the simplest command possible receiving a single uint8 parameter to test this further and it still doesn't work.

Yamcs.issueCommand('/FP_CM_MDB/fp_cm_cmd_Noop_Param', {testparam: 2});

I tried different syntaxes but I always get the same result. Same result if I try in the command stack of the display runner. I can confirm nothing was sent in the command history and I cannot see any error message. I can get the command to work properly if I send it from the Yamcs web client.

If I pass the same command without arguments it goes through (must have defaults defined). For example, this will work if testparam has a default value:

Yamcs.issueCommand('/FP_CM_MDB/fp_cm_cmd_Noop_Param()');

fqqb commented 2 years ago

Assuming this is the latest version of studio, are you able to upgrade your Yamcs server to latest 5.5.5? Latest studio uses a newer mechanism to pass command args (and I should have wait a bit before using it in studio).

PilotWave commented 2 years ago

I am running from the quickstart repo and it looks like I am up to date with master. I am not sure what version of the server that is using though.

fqqb commented 2 years ago

In your local pom.xml you can verify this line: https://github.com/yamcs/quickstart/blob/master/pom.xml#L19

PilotWave commented 2 years ago

I have: 5.5.1

fqqb commented 2 years ago

Should be fine then to update that line to 5.5.5, and try again.

PilotWave commented 2 years ago

yep that works, thanks!