BallAerospace / COSMOS

Ball Aerospace COSMOS
https://ballaerospace.github.io/cosmos-website/
Other
360 stars 129 forks source link

Sending newline character in cosmos 5 #1710

Closed jmbell1989 closed 2 years ago

jmbell1989 commented 2 years ago

The arrow function cmd no longer works in the telemetry screens.

You can do this from ScriptRunner, with the following: text = "TEST\n" cmd("TARGETNAME", "PACKETNAME", "COMMAND" => text)

Originally posted by @ryanatball in https://github.com/BallAerospace/COSMOS/issues/1489#issuecomment-1064266643

jmthomas commented 2 years ago

The syntax has changed due to this all being Javascript now. Try something like this:

text = "TEST\n"; api.cmd("TARGETNAME", "PACKETNAME", { COMMAND: text })

Note that the parameters are surrounded by {}.