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

Blur LedWidgets when stale #1849

Merged
merged 2 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<v-tooltip location="top">
<template v-slot:activator="{ props }">
<div
class="ledwidget mt-1"
:class="getClass"
:style="[cssProps, computedStyle]"
v-bind="props"
></div>
Expand Down Expand Up @@ -71,6 +71,13 @@ export default {
this.parameters[0] + ' ' + this.parameters[1] + ' ' + this.parameters[2]
)
},
getClass() {
let result = 'ledwidget mt-2'
if (this.screenValues[this.valueId][1] === 'STALE') {
result += ' stale'
}
return result
},
},
// Note Vuejs still treats this synchronously, but this allows us to dispatch
// the store mutation and return the array index.
Expand Down Expand Up @@ -105,4 +112,7 @@ export default {
background-color: var(--color);
border-radius: 50%;
}
.stale {
filter: blur(2px) brightness(0.6);
}
</style>
5 changes: 4 additions & 1 deletion openc3/data/config/widgets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ Telemetry Widgets:
FORMATVALUE INST LATEST TEMP1 %.2f CONVERTED 20
LABELLED:
summary: Displays a LABEL followed by a LED
description: See the LED widget for more information
parameters:
- name: Target name
required: true
Expand Down Expand Up @@ -688,6 +689,7 @@ Telemetry Widgets:
Additional values can be added by using the LED_COLOR setting. For example
LED INST PARAMS VALUE3 RAW can be followed by SETTING LED_COLOR 0 GREEN,
SETTING LED_COLOR 1 RED, and SETTING LED_COLOR ANY ORANGE.
See LIMITSCOLOR for a widget that displays a circle depicting the limits color of an item.
parameters:
- name: Target name
required: true
Expand Down Expand Up @@ -791,7 +793,8 @@ Telemetry Widgets:
LIMITSCOLUMN INST HEALTH_STATUS TEMP1 CONVERTED 50 200
LIMITSCOLUMN INST HEALTH_STATUS TEMP1
LIMITSCOLOR:
summary: Displays a circle depicting the limits color of an item
summary: Displays a circle depicting the limits color of an item.
See LED for a widget that displays a circle which changes to an arbitrary color based on telemetry values.
parameters:
- name: Target name
required: true
Expand Down
Loading