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 boolean parameter values #365

Open
akhenry opened this issue Aug 15, 2023 · 0 comments
Open

Handle boolean parameter values #365

akhenry opened this issue Aug 15, 2023 · 0 comments
Labels

Comments

@akhenry
Copy link
Owner

akhenry commented Aug 15, 2023

Is your feature request related to a problem? Please describe.
Currently we have no special handling of boolean values, and the default behavior in Open MCT is to treat values as JavaScript Numbers. In plots and condition sets this is leading to true and false being handled as 1 and 0 respectively. In LAD Tables, Telemetry Tables, Display Layout alphanumerics they are being displayed as true and false.

Describe the solution you'd like

  • A new BooleanFormatter in the Open MCT telemetry API which will apply to values with a boolean formatter. It will have the following behavior:
    • parse() will return a JavaScript native boolean
    • format() will return a JavaScript string with a value of either true or false.
  • A modification to the openmct-yamcs adapter to apply a boolean formatter to boolean parameters.

Describe alternatives you've considered

  • We could just leverage the existing enum handling and treat all booleans as enums with possible values of true and false. I think it makes sense to make booleans a first-class data type in Open MCT though.
@akhenry akhenry added the type:enhancement New feature or request label Aug 15, 2023
@akhenry akhenry added this to the Target:3.1.0 milestone Aug 15, 2023
@unlikelyzero unlikelyzero removed this from the Target:3.1.0 milestone Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants