-
Notifications
You must be signed in to change notification settings - Fork 22
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
Introducing the VeryGenericIndicator
#474
Changes from all commits
47a36c7
8f65978
3152a77
52e52e4
00f0ec8
5239448
8cde9d3
0dd448f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
/** | ||
* Variables that define generic indicator | ||
*/ | ||
export interface GenericIndicatorTemplate { | ||
export interface VeryGenericIndicatorTemplate { | ||
/** | ||
* Name to be displayed on the widget | ||
*/ | ||
displayName: string | ||
/** | ||
* Name of the variable to be fetched | ||
*/ | ||
|
@@ -14,59 +18,79 @@ export interface GenericIndicatorTemplate { | |
* Symbols representing the unit system of the variable | ||
*/ | ||
variableUnit: string | ||
/** | ||
* Number of digits to be displayed after the decimal separator (usually dot) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a setting somewhere that allows people to change the decimal separator, or does it automatically use the separator for the locale of the browser device or something? Would be nice if europeans can use their comma decimal separators, even though they hurt my eyeballs 😂 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤣 There isn't, and I actually think we shouldn't add it. We Brazilians also use commas as decimal separators, but this was clearly a big mistake, and softwares like Excel suffer a lot for adding the possibility of changing it, as it causes huge confusions when receiving a spreadsheet. |
||
*/ | ||
fractionalDigits: number | ||
/** | ||
* Value that multiplies the original value to bring it to a representative unit system | ||
*/ | ||
variableMultiplier: number | ||
} | ||
|
||
export const genericIndicatorTemplates: GenericIndicatorTemplate[] = [ | ||
export const veryGenericIndicatorTemplates: VeryGenericIndicatorTemplate[] = [ | ||
{ | ||
displayName: 'Cam Tilt', | ||
variableName: 'CamTilt', | ||
iconName: 'mdi-camera-retake', | ||
variableUnit: '%', | ||
fractionalDigits: 0, | ||
variableMultiplier: 100, | ||
}, | ||
{ | ||
displayName: 'Cam Pan', | ||
variableName: 'CamPan', | ||
iconName: 'mdi-camera-retake', | ||
variableUnit: '%', | ||
fractionalDigits: 0, | ||
variableMultiplier: 100, | ||
}, | ||
{ | ||
displayName: 'Tether Turns', | ||
variableName: 'TetherTrn', | ||
iconName: 'mdi-horizontal-rotate-clockwise', | ||
variableUnit: 'x', | ||
fractionalDigits: 0, | ||
variableMultiplier: 100, | ||
}, | ||
{ | ||
displayName: 'Lights (1)', | ||
variableName: 'Lights1', | ||
iconName: 'mdi-flashlight', | ||
variableUnit: '%', | ||
fractionalDigits: 0, | ||
variableMultiplier: 100, | ||
}, | ||
{ | ||
displayName: 'Lights (2)', | ||
variableName: 'Lights2', | ||
iconName: 'mdi-flashlight', | ||
variableUnit: '%', | ||
fractionalDigits: 0, | ||
variableMultiplier: 100, | ||
}, | ||
{ | ||
displayName: 'Pilot Gain', | ||
variableName: 'PilotGain', | ||
iconName: 'mdi-account-hard-hat', | ||
variableUnit: '%', | ||
fractionalDigits: 0, | ||
variableMultiplier: 100, | ||
}, | ||
{ | ||
displayName: 'Input Hold', | ||
variableName: 'InputHold', | ||
iconName: 'mdi-gesture-tap-hold', | ||
variableUnit: '', | ||
fractionalDigits: 0, | ||
variableMultiplier: 1, | ||
}, | ||
{ | ||
displayName: 'Roll Pitch', | ||
variableName: 'RollPitch', | ||
iconName: 'mdi-controller', | ||
variableUnit: '', | ||
fractionalDigits: 0, | ||
variableMultiplier: 1, | ||
}, | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there should be a comment here explaining what this method is for. Maybe something like
It may also be worth noting that
NAMED_VALUE_*
messages are split out via a different function.