Closed dlackner closed 2 years ago
I think you mean this: https://ballaerospace.github.io/cosmos-website/docs/v5/screens#example-file
BUTTON 'Start Collect' "api.cmd('INST COLLECT with TYPE '+screen.get_named_widget('COLLECT_TYPE').text()+', DURATION '+screen.get_named_widget('DURATION').text())"
If we break it apart to just the command we get:
"api.cmd('INST COLLECT with TYPE '+screen.get_named_widget('COLLECT_TYPE').text()+', DURATION '+screen.get_named_widget('DURATION').text())"
If we remove the variables we get:
"api.cmd('INST COLLECT with TYPE '+type+', DURATION '+duration)"
The reason the quotes don't seem to match up is we're making a method call in Javascript. So ultimately we're just building up a string which we pass to api.cmd(). It effectively looks like this:
"api.cmd('INST COLLECT with TYPE NORMAL, DURATION 10')"
This is rather messy and confusing but we're at the mercy of Javascript here.
Describe the bug In the COSMOS documentation, telemetry_screens/example_file there is an unmatched parentheses (missing a single end quote). I have tried closing the unmatched parentheses and get the error attached in the screenshot. It appears that an unmatched parentheses is the intention? This may not necessarily be a bug, but looking for some clarification.
eg: BUTTON 'Start Collect' "api.cmd('INST COLLECT with TYPE '+screen.get_named_widget('COLLECT_TYPE').text()+', DURATION '+screen.get_named_widget('DURATION').text())"
To Reproduce Steps to reproduce the behavior:
Expected behavior Unmatched number of parentheses works Matched number of parentheses does not work
Screenshots
Environment (please complete the following information):