Command
diff --git a/love/src/components/MainTel/M2/Summary/Summary.module.css b/love/src/components/MainTel/M2/Summary/Summary.module.css
index c9034eeb5..b8da94a41 100644
--- a/love/src/components/MainTel/M2/Summary/Summary.module.css
+++ b/love/src/components/MainTel/M2/Summary/Summary.module.css
@@ -70,4 +70,4 @@
.summaryPanelControls > .controls > div {
margin-right: 1em;
-}
\ No newline at end of file
+}
diff --git a/love/src/components/MainTel/MTDome/MTDome.jsx b/love/src/components/MainTel/MTDome/MTDome.jsx
index 4a635a509..8dafe12c7 100644
--- a/love/src/components/MainTel/MTDome/MTDome.jsx
+++ b/love/src/components/MainTel/MTDome/MTDome.jsx
@@ -5,6 +5,8 @@ import MTDomeLouvers from './MTDomeLouvers';
import MTDomePointing from './MTDomePointing';
import SimpleTable from 'components/GeneralPurpose/SimpleTable/SimpleTable';
import PlotContainer from 'components/GeneralPurpose/Plot/Plot.container';
+import Azimuth from 'components/GeneralPurpose/Azimuth/Azimuth';
+import Elevation from 'components/GeneralPurpose/Elevation/Elevation';
import WindRose from '../../icons/WindRose/WindRose';
import MTDomeSummaryTable from './MTDomeSummaryTable/MTDomeSummaryTable';
import styles from './MTDome.module.css';
@@ -535,9 +537,31 @@ export default class MTDome extends Component {
+
+
+
+
-
0;
+ const negCurrentValue = currentValue < 0;
+
+ const radiusBack = radius * 0.58;
+
+ {
+ /* Check if current or target value is within danger or warning zone */
+ }
+ const isInWarningZone = currentValue > maxL1 || currentValue < minL1;
+ const isInDangerZone = currentValue > maxL2 || currentValue < minL2;
+ const isTargetWarningZone = targetValue > maxL1 || targetValue < minL1;
+ const isTargetDangerZone = targetValue > maxL2 || targetValue < minL2;
+
+ return (
+
+ );
+ }
+}
diff --git a/love/src/components/MainTel/TMA/Azimuth/Azimuth.module.css b/love/src/components/MainTel/TMA/Azimuth/Azimuth.module.css
new file mode 100644
index 000000000..0da44506c
--- /dev/null
+++ b/love/src/components/MainTel/TMA/Azimuth/Azimuth.module.css
@@ -0,0 +1,119 @@
+.container svg text {
+ padding: 4px;
+}
+
+.clipPathPos {
+ clip-path: path(
+ 'M344.4,520.9c-97.32,0-176.5-79.18-176.5-176.5h6c0,94.01,76.49,170.5,170.5,170.5s170.5-76.49,170.5-170.5-76.49-170.5-170.5-170.5v-6c97.32,0,176.5,79.18,176.5,176.5s-79.18,176.5-176.5,176.5Z'
+ );
+}
+.clipPathNeg {
+ clip-path: path(
+ 'M344.4,533.9c-103.66,0-188-84.34-188-188,0-49.65,19.58-95.11,55.15-128.02,34.83-32.23,82.01-49.98,132.85-49.98v6c-49.32,0-95.06,17.18-128.78,48.39-34.32,31.76-53.22,75.66-53.22,123.61,0,100.36,81.64,182,182,182s182-81.64,182-182h6c0,103.66-84.34,188-188,188Z'
+ );
+}
+
+.currentValue {
+ fill: white;
+ transition: x 0.5s linear;
+}
+
+.originText {
+ fill: var(--secondary-font-color);
+ font-size: 1em;
+ text-anchor: start;
+}
+
+.targetText {
+ fill: var(--base-font-color);
+ font-size: 1em;
+ transition: transform 0.5s linear 0s;
+}
+
+.textQ1 {
+ text-anchor: start;
+}
+.textQ2 {
+ text-anchor: end;
+}
+.textQ3 {
+ alignment-baseline: text-before-edge;
+ text-anchor: end;
+}
+.textQ4 {
+ alignment-baseline: text-before-edge;
+ text-anchor: start;
+}
+
+.cutOut {
+ fill: rgb(17, 31, 39);
+}
+
+.bg {
+ fill: #182e39;
+}
+.bgTarget {
+ fill: transparent;
+ stroke: #3a525f;
+ opacity: 0.25;
+ transition: stroke-dasharray linear 0.5s;
+ transition: transform linear 0.5s;
+}
+.bgCurrent {
+ fill: transparent;
+ stroke: #3a525f;
+ transition: stroke-dasharray linear 0.5s;
+}
+.gaugeL1 {
+ fill: transparent;
+ stroke: #2e6261;
+ transition: stroke-dasharray linear 0.5s;
+}
+.gaugeL2 {
+ transform-origin: 50% 50%;
+ fill: transparent;
+ stroke: #3f4720;
+ transition: stroke-dasharray linear 0.5s;
+}
+.gaugeL3 {
+ transform-origin: 50% 50%;
+ fill: #3c2b20;
+}
+.fillL1 {
+ fill: transparent;
+ stroke: #00a26d;
+ transition: stroke-dasharray linear 0.5s;
+}
+.fillL2 {
+ fill: transparent;
+ stroke: #eee203;
+ transition: stroke-dasharray linear 0.5s;
+}
+.fillL3 {
+ fill: transparent;
+ stroke: #db5826;
+ transition: stroke-dasharray linear 0.5s;
+}
+.targetValue {
+ stroke: #c1ced2;
+ fill: transparent;
+ stroke-width: 0.2em;
+ stroke-dasharray: 0.4em 0.4em;
+ transition: transform linear 0.5s;
+}
+
+.targetValueWarning {
+ stroke: #eee203;
+ fill: transparent;
+ stroke-width: 0.2em;
+ stroke-dasharray: 0.4em 0.4em;
+ transition: transform linear 0.5s;
+}
+
+.targetValueDanger {
+ stroke: #db5826;
+ fill: transparent;
+ stroke-width: 0.2em;
+ stroke-dasharray: 0.4em 0.4em;
+ transition: transform linear 0.5s;
+}
diff --git a/love/src/components/MainTel/TMA/Drives/Drives.jsx b/love/src/components/MainTel/TMA/Drives/Drives.jsx
index 325cdadc1..9da7417d6 100644
--- a/love/src/components/MainTel/TMA/Drives/Drives.jsx
+++ b/love/src/components/MainTel/TMA/Drives/Drives.jsx
@@ -28,7 +28,6 @@ export default class Drives extends Component {
type: 'number',
className: styles.angleColumn,
render: (value) => (isNaN(value) || Number.isInteger(value) ? value : `${value.toFixed(2)}º`),
-
};
}
diff --git a/love/src/components/MainTel/TMA/Drives/Drives.module.css b/love/src/components/MainTel/TMA/Drives/Drives.module.css
index 17fb62c53..e6021fc71 100644
--- a/love/src/components/MainTel/TMA/Drives/Drives.module.css
+++ b/love/src/components/MainTel/TMA/Drives/Drives.module.css
@@ -1,22 +1,21 @@
-
.container {
- display: flex;
- flex-direction: column;
+ display: flex;
+ flex-direction: column;
}
.table {
- height: 100%;
+ height: 100%;
}
th.angleColumn {
- text-align: center;
+ text-align: center;
}
.angleColumn {
- max-width: 0.5em;
- text-align: center;
+ max-width: 0.5em;
+ text-align: center;
}
.units {
- opacity: 0.65;
-}
\ No newline at end of file
+ opacity: 0.65;
+}
diff --git a/love/src/components/MainTel/TMA/Elevation/Elevation.jsx b/love/src/components/MainTel/TMA/Elevation/Elevation.jsx
index be3d5f828..a4e0237fa 100644
--- a/love/src/components/MainTel/TMA/Elevation/Elevation.jsx
+++ b/love/src/components/MainTel/TMA/Elevation/Elevation.jsx
@@ -2,6 +2,7 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { closestEquivalentAngle } from 'Utils';
import styles from './Elevation.module.css';
+import GpElevation from 'components/GeneralPurpose/Elevation/Elevation';
export default class Elevation extends Component {
static propTypes = {
@@ -21,89 +22,97 @@ export default class Elevation extends Component {
this.state = {
prevElevationActual: 0,
prevElevationDemand: 0,
- }
+ };
}
componentDidUpdate(prevProps) {
if (prevProps.elevationActualPosition !== this.props.elevationActualPosition) {
this.setState((prevState) => ({
- prevElevationActual: closestEquivalentAngle(prevState.prevElevationActual, this.props.elevationActualPosition)
+ prevElevationActual: closestEquivalentAngle(prevState.prevElevationActual, this.props.elevationActualPosition),
}));
}
if (prevProps.elevationDemandPosition !== this.props.elevationDemandPosition) {
this.setState((prevState) => ({
- prevElevationDemand: closestEquivalentAngle(prevState.prevElevationDemand, this.props.elevationDemandPosition)
+ prevElevationDemand: closestEquivalentAngle(prevState.prevElevationDemand, this.props.elevationDemandPosition),
}));
}
}
render() {
return (
-
- { this.getSvg()}
+
);
}
getSvg = () => {
- const equivalentElevationActual = closestEquivalentAngle(this.state.prevElevationActual, this.props.elevationActualPosition);
- const equivalentElevationDemand = closestEquivalentAngle(this.state.prevElevationDemand, this.props.elevationDemandPosition);
+ const equivalentElevationActual = closestEquivalentAngle(
+ this.state.prevElevationActual,
+ this.props.elevationActualPosition,
+ );
+ const equivalentElevationDemand = closestEquivalentAngle(
+ this.state.prevElevationDemand,
+ this.props.elevationDemandPosition,
+ );
return (
-
);
@@ -99,28 +103,22 @@ export default class MirrorCovers extends Component {
);
return (
-
+ {this.getBase(x0, y0, equivalentAzimuthActual)}
+
+
- { this.getBase(x0, y0, equivalentAzimuthActual) }
-
-
- { this.getMirrorCover(angleClosed, angleClosedBorder, viewBoxSize) }
- { this.getMount(x0, y0) }
-
+ {this.getMirrorCover(angleClosed, angleClosedBorder, viewBoxSize)}
+ {this.getMount(x0, y0)}
+
- { equivalentAzimuthDemand !== equivalentAzimuthActual ?? this.getDemand(equivalentAzimuthDemand) }
-
-
+ {equivalentAzimuthDemand !== equivalentAzimuthActual ?? this.getDemand(equivalentAzimuthDemand)}
+
);
};
@@ -139,20 +137,20 @@ export default class MirrorCovers extends Component {
}}
/>
-
-
+
+
>
);
@@ -170,7 +168,7 @@ export default class MirrorCovers extends Component {
strokeMiterlimit: 10,
transition: 'transform 1.5s linear 0s',
transform: `rotateZ(${equivalentAzimuthDemand}deg)`,
- transformOrigin: `50% 50%`
+ transformOrigin: `50% 50%`,
}}
/>
);
diff --git a/love/src/components/MainTel/TMA/MirrorCovers/MirrorCovers.module.css b/love/src/components/MainTel/TMA/MirrorCovers/MirrorCovers.module.css
index 8609f8f7b..1d3f6a8e0 100644
--- a/love/src/components/MainTel/TMA/MirrorCovers/MirrorCovers.module.css
+++ b/love/src/components/MainTel/TMA/MirrorCovers/MirrorCovers.module.css
@@ -1,28 +1,35 @@
-
.container {
- display: flex;
- align-self: center;
- flex-wrap: wrap;
- position: relative;
+ display: flex;
+ align-self: center;
+ flex-wrap: wrap;
+ position: relative;
}
.container svg {
- vertical-align: top;
- margin: auto;
- width: 70%;
- height: auto;
- }
+ vertical-align: top;
+ margin: auto;
+ width: 50%;
+ height: auto;
+ z-index: 1;
+}
.windRoseContainer {
- position: absolute;
- left: 10%;
- top: 0%;
- width: 13%;
- }
+ position: absolute;
+ left: 0%;
+ top: -20%;
+ width: 20%;
+}
+
+.azContainer {
+ position: absolute;
+ left: -60%;
+ top: -60%;
+ width: 220%;
+}
.cls1 {
- fill: #15242d;
- stroke: #182e39;
+ fill: #15242d;
+ stroke: #182e39;
}
.cls1,
@@ -33,7 +40,7 @@
.cls6,
.cls7,
.cls8 {
- stroke-miterlimit: 10;
+ stroke-miterlimit: 10;
}
.cls1,
@@ -41,52 +48,53 @@
.cls5,
.cls6,
.cls7 {
- stroke-width: 2px;
+ stroke-width: 2px;
}
.cls2,
.cls6 {
- fill: none;
+ fill: none;
}
.cls2 {
- stroke: #e4e4e7;
- stroke-width: 0.5px;
- stroke-dasharray: 6;
+ stroke: #e4e4e7;
+ stroke-width: 0.5px;
+ stroke-dasharray: 6;
}
.cls3,
.cls8 {
- fill: #182e39;
+ fill: #182e39;
}
.cls3,
.cls7,
.cls8 {
- stroke: #27434f;
+ stroke: #27434f;
}
-.cls4, .cls5 {
- stroke: none;
+.cls4,
+.cls5 {
+ stroke: none;
}
.cls4 {
- fill: #bcd8e2;
- }
+ fill: #bcd8e2;
+}
.cls5 {
- fill: #fff;
+ fill: #fff;
}
.cls6 {
- stroke: #f2f2f2;
+ stroke: #f2f2f2;
}
.cls7 {
- fill: #27434f;
+ fill: #27434f;
}
.cls8 {
- stroke-linecap: round;
- stroke-width: 4px;
+ stroke-linecap: round;
+ stroke-width: 4px;
}
diff --git a/love/src/components/MainTel/TMA/Summary/Summary.module.css b/love/src/components/MainTel/TMA/Summary/Summary.module.css
index 6a3b37e9d..6a77e750f 100644
--- a/love/src/components/MainTel/TMA/Summary/Summary.module.css
+++ b/love/src/components/MainTel/TMA/Summary/Summary.module.css
@@ -1,14 +1,13 @@
-
.container {
- display: grid;
- grid-template-columns: 1fr 1fr 1fr;
- background: var(--second-quaternary-background-dimmed-color);
+ display: grid;
+ grid-template-columns: 1fr 1fr 1fr;
+ background: var(--second-quaternary-background-dimmed-color);
}
.highlight {
- color: var(--base-font-color);
- }
+ color: var(--base-font-color);
+}
.pt {
- padding: 2.15em 0em 0.1em 0em !important;
+ padding: 2.15em 0em 0.1em 0em !important;
}
diff --git a/love/src/components/MainTel/TMA/TMA.container.jsx b/love/src/components/MainTel/TMA/TMA.container.jsx
index ecf04f1f6..d71908546 100644
--- a/love/src/components/MainTel/TMA/TMA.container.jsx
+++ b/love/src/components/MainTel/TMA/TMA.container.jsx
@@ -13,8 +13,7 @@ import {
import SubscriptionTableContainer from '../../GeneralPurpose/SubscriptionTable/SubscriptionTable.container';
export const schema = {
- description:
- 'View of Telescope Mount Assembly',
+ description: 'View of Telescope Mount Assembly',
defaultSize: [90, 53],
props: {
title: {
@@ -26,21 +25,11 @@ export const schema = {
},
};
-const TMAContainer = ({
- subscribeToStreams,
- unsubscribeToStreams,
- ...props
-}) => {
+const TMAContainer = ({ subscribeToStreams, unsubscribeToStreams, ...props }) => {
if (props.isRaw) {
- return ;
- }
- return (
-
- );
+ return ;
+ }
+ return ;
};
const mapStateToProps = (state) => {
@@ -49,13 +38,13 @@ const mapStateToProps = (state) => {
const elevation = getElevationState(state);
const drives = getDrivesAzimuthElevationState(state);
const mirror = getMirrorCoversMotionState(state);
- return {
+ return {
...tmaSummary,
...azimuth,
...elevation,
...drives,
...mirror,
- };
+ };
};
const mapDispatchToProps = (dispatch) => {
diff --git a/love/src/components/MainTel/TMA/TMA.jsx b/love/src/components/MainTel/TMA/TMA.jsx
index 967b86a7b..580ef40d4 100644
--- a/love/src/components/MainTel/TMA/TMA.jsx
+++ b/love/src/components/MainTel/TMA/TMA.jsx
@@ -5,6 +5,8 @@ import styles from './TMA.module.css';
import Summary from './Summary/Summary';
import MirrorCovers from './MirrorCovers/MirrorCovers';
import Elevation from './Elevation/Elevation';
+import GpElevation from 'components/GeneralPurpose/Elevation/Elevation';
+
import Drives from './Drives/Drives';
export default class TMA extends Component {
@@ -69,10 +71,6 @@ export default class TMA extends Component {
elevationDrives: [],
};
- componentDidMount() {
- this.props.subscribeToStreams();
- }
-
componentWillUnmount() {
this.props.unsubscribeToStreams();
}
@@ -97,6 +95,7 @@ export default class TMA extends Component {
azimuthDrives,
elevationDrives,
} = this.props;
+
return (
<>
@@ -126,10 +125,12 @@ export default class TMA extends Component {
/>
diff --git a/love/src/components/MainTel/TMA/TMA.module.css b/love/src/components/MainTel/TMA/TMA.module.css
index 4c0774b55..0c503fc91 100644
--- a/love/src/components/MainTel/TMA/TMA.module.css
+++ b/love/src/components/MainTel/TMA/TMA.module.css
@@ -1,30 +1,30 @@
.summaryContainer {
- display: flex;
- flex-grow: 1;
- flex-direction: column;
- padding: 1em;
- border-radius: 5px;
- background: var(--second-secondary-background-color);
- margin-bottom: 1em;
+ display: flex;
+ flex-grow: 1;
+ flex-direction: column;
+ padding: 1em;
+ border-radius: 5px;
+ background: var(--second-secondary-background-color);
+ margin-bottom: 1em;
}
.mirrorAndElevationContainer {
- display: grid;
- grid-template-columns: repeat(2, 1fr);
- grid-auto-rows: auto;
- gap: 10px;
+ display: grid;
+ grid-template-columns: repeat(2, 1fr);
+ grid-auto-rows: auto;
+ gap: 10px;
}
.mirrorCoversContainer {
- align-self: center;
+ align-self: center;
}
.elevationContainer {
- align-self: center;
+ align-self: center;
}
.drivesContainer {
- padding: 1em;
- border-radius: 5px;
- background: var(--second-secondary-background-color);
+ padding: 1em;
+ border-radius: 5px;
+ background: var(--second-secondary-background-color);
}