diff --git a/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/components/EditScreenDialog.vue b/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/components/EditScreenDialog.vue index f48aa042ad..0a157b97d2 100644 --- a/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/components/EditScreenDialog.vue +++ b/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/components/EditScreenDialog.vue @@ -52,7 +52,7 @@ - + Upload a screen file. - - + + +
+ +
- + Ctrl-space brings up autocomplete. Right click keywords for documentation. a.lineNumber - b.lineNumber) for (const error of this.errors) { - if (messages.has(error.message)) { - continue - } let msg = `At ${error.lineNumber}: (${error.line}) ${error.message}.` if (error.usage) { msg += ` Usage: ${error.usage}` @@ -322,7 +323,7 @@ export default { diff --git a/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/widgets/BarColumn.js b/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/widgets/BarColumn.js index 53641b9b55..b7f709b3af 100644 --- a/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/widgets/BarColumn.js +++ b/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/widgets/BarColumn.js @@ -101,6 +101,9 @@ export default { }, methods: { modifyLimits(limitsSettings) { + if (!limitsSettings) { + return + } // By default the red bars take 10% of the display this.redLow = 10 this.redHigh = 10 diff --git a/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/widgets/LabelvaluelimitsbarWidget.vue b/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/widgets/LabelvaluelimitsbarWidget.vue index 0b7765c0b2..65f8558753 100644 --- a/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/widgets/LabelvaluelimitsbarWidget.vue +++ b/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/widgets/LabelvaluelimitsbarWidget.vue @@ -35,6 +35,8 @@ :settings="[...appliedSettings]" :screen-values="screenValues" :widget-index="2" + :line="line" + :lineNumber="lineNumber" /> diff --git a/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/widgets/LabelvaluelimitscolumnWidget.vue b/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/widgets/LabelvaluelimitscolumnWidget.vue index c004c6021e..295b4baa79 100644 --- a/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/widgets/LabelvaluelimitscolumnWidget.vue +++ b/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/widgets/LabelvaluelimitscolumnWidget.vue @@ -34,6 +34,8 @@ :settings="[...appliedSettings]" :screen-values="screenValues" :widget-index="2" + :line="line" + :lineNumber="lineNumber" /> ', + ) + }, } diff --git a/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/widgets/LimitscolumnWidget.vue b/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/widgets/LimitscolumnWidget.vue index ab1fb488f8..6c72519a9e 100644 --- a/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/widgets/LimitscolumnWidget.vue +++ b/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/widgets/LimitscolumnWidget.vue @@ -52,22 +52,42 @@ export default { let limits = this.modifyLimits( this.limitsSettings[this.selectedLimitsSet], ) - this.calcLimits(limits) - return { - '--height': this.height + 'px', - '--width': this.width + 'px', - '--container-width': this.width - 5 + 'px', - '--position': this.calcPosition(value, limits) + '%', - '--redlow-height': this.redLow + '%', - '--redhigh-height': this.redHigh + '%', - '--yellowlow-height': this.yellowLow + '%', - '--yellowhigh-height': this.yellowHigh + '%', - '--greenlow-height': this.greenLow + '%', - '--greenhigh-height': this.greenHigh + '%', - '--blue-height': this.blue + '%', + if (limits) { + this.calcLimits(limits) + return { + '--height': this.height + 'px', + '--width': this.width + 'px', + '--container-width': this.width - 5 + 'px', + '--position': this.calcPosition(value, limits) + '%', + '--redlow-height': this.redLow + '%', + '--redhigh-height': this.redHigh + '%', + '--yellowlow-height': this.yellowLow + '%', + '--yellowhigh-height': this.yellowHigh + '%', + '--greenlow-height': this.greenLow + '%', + '--greenhigh-height': this.greenHigh + '%', + '--blue-height': this.blue + '%', + } + } else { + // See errorCaptured in Openc3Screen.vue for how this is parsed + throw { + line: this.line, + lineNumber: this.lineNumber, + keyword: 'LIMITSCOLUMN', + parameters: this.parameters, + message: 'Item has no limits settings', + usage: 'Only items with limits', + } } }, }, + created() { + this.verifyNumParams( + 'LIMITSCOLUMN', + 3, + 6, + 'LIMITSCOLUMN ', + ) + }, } diff --git a/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/widgets/ValuelimitsbarWidget.vue b/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/widgets/ValuelimitsbarWidget.vue index a711be9b92..888c71ec18 100644 --- a/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/widgets/ValuelimitsbarWidget.vue +++ b/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/widgets/ValuelimitsbarWidget.vue @@ -36,6 +36,8 @@ :settings="[...appliedSettings]" :screen-values="screenValues" :widget-index="1" + :line="line" + :lineNumber="lineNumber" /> diff --git a/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/widgets/ValuelimitscolumnWidget.vue b/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/widgets/ValuelimitscolumnWidget.vue index 8eb5396b92..024207fadc 100644 --- a/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/widgets/ValuelimitscolumnWidget.vue +++ b/openc3-cosmos-init/plugins/packages/openc3-vue-common/src/widgets/ValuelimitscolumnWidget.vue @@ -29,6 +29,8 @@ :settings="[...appliedSettings]" :screen-values="screenValues" :widget-index="1" + :line="line" + :lineNumber="lineNumber" />