Skip to content

Commit 68ab766

Browse files
committed
Justify Telemetry Viewer widgets
1 parent 7f48c24 commit 68ab766

File tree

6 files changed

+14
-7
lines changed

6 files changed

+14
-7
lines changed

openc3-cosmos-init/plugins/packages/openc3-cosmos-demo/targets/INST/screens/hs.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ VERTICAL
1212

1313
VERTICALBOX "General Telemetry"
1414
BUTTON 'Start Collect' 'api.cmd("<%= target_name %> COLLECT with TYPE NORMAL, DURATION 5")'
15-
FORMATVALUE <%= target_name %> HEALTH_STATUS COLLECTS "0x%08X" CONVERTED 14
15+
FORMATVALUE <%= target_name %> HEALTH_STATUS COLLECTS "0x%08X" CONVERTED 16
1616
LABELVALUE <%= target_name %> HEALTH_STATUS COLLECT_TYPE
1717
LABELVALUE <%= target_name %> HEALTH_STATUS DURATION
18-
LABELVALUE <%= target_name %> HEALTH_STATUS ASCIICMD WITH_UNITS 30
18+
LABELVALUE <%= target_name %> HEALTH_STATUS ASCIICMD WITH_UNITS 40
1919
END
2020
SETTING BACKCOLOR 163 185 163
2121

openc3-cosmos-init/plugins/packages/openc3-cosmos-demo/targets/INST/screens/limits.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ HORIZONTAL
3636
LABELVALUERANGEBAR <%= target_name %> HEALTH_STATUS TEMP2 0 100
3737
END
3838
VERTICALBOX "Limits Colors"
39-
LIMITSCOLOR <%= target_name %> HEALTH_STATUS TEMP1 CONVERTED 5 NIL # No label
39+
LIMITSCOLOR <%= target_name %> HEALTH_STATUS TEMP1 CONVERTED 10 NIL # No label
4040
LIMITSCOLOR <%= target_name %> HEALTH_STATUS TEMP2 # Default is label with just item name
41-
LIMITSCOLOR <%= target_name %> HEALTH_STATUS GROUND1STATUS CONVERTED 5 TRUE # Full TGT/PKT/ITEM label
41+
LIMITSCOLOR <%= target_name %> HEALTH_STATUS GROUND1STATUS CONVERTED 20 TRUE # Full TGT/PKT/ITEM label
4242
END
4343
END
4444
END

openc3-cosmos-init/plugins/packages/openc3-tool-common/src/components/widgets/LabelWidget.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# All changes Copyright 2022, OpenC3, Inc.
1717
# All Rights Reserved
1818
#
19-
# This file may also be used under the terms of a commercial license
19+
# This file may also be used under the terms of a commercial license
2020
# if purchased from OpenC3, Inc.
2121
-->
2222

openc3-cosmos-init/plugins/packages/openc3-tool-common/src/components/widgets/LedWidget.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
-->
2222

2323
<template>
24-
<div class="led mt-2" :style="[cssProps, computedStyle]"></div>
24+
<div class="led mt-1" :style="cssProps"></div>
2525
</template>
2626

2727
<script>

openc3-cosmos-init/plugins/packages/openc3-tool-common/src/components/widgets/LimitscolorWidget.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
<template>
2424
<div ref="container" class="d-flex flex-row" :style="computedStyle">
25-
<div class="led align-self-center" :style="[cssProps, computedStyle]"></div>
25+
<div class="led align-self-center" :style="cssProps"></div>
2626
<label-widget
2727
:parameters="labelName"
2828
:settings="settings"

openc3-cosmos-init/plugins/packages/openc3-tool-common/src/components/widgets/Widget.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ export default {
6464
}
6565
this.applySetting(style, setting)
6666
})
67+
// If they haven't defined a width then we add flex to the style
68+
if (style['width'] === undefined) {
69+
// This flex allows for alignment in our widgets
70+
// The value of '0 10 100%' was achieved through trial and error
71+
// The larger flex-shrink value was critical for success
72+
style['flex'] = '0 10 100%' // flex-grow, flex-shrink, flex-basis
73+
}
6774
return style
6875
},
6976
},

0 commit comments

Comments
 (0)