You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
andfalse
being handled as1
and0
respectively. In LAD Tables, Telemetry Tables, Display Layout alphanumerics they are being displayed astrue
andfalse
.Describe the solution you'd like
BooleanFormatter
in the Open MCT telemetry API which will apply to values with aboolean
formatter. It will have the following behavior:parse()
will return a JavaScript nativeboolean
format()
will return a JavaScriptstring
with a value of eithertrue
orfalse
.openmct-yamcs
adapter to apply aboolean
formatter to boolean parameters.Describe alternatives you've considered
enum
handling and treat all booleans as enums with possible values oftrue
andfalse
. I think it makes sense to make booleans a first-class data type in Open MCT though.The text was updated successfully, but these errors were encountered: