7
mirror of https://github.com/EEVengers/ThunderScope.git synced 2025-04-08 06:25:30 +00:00

UI->Plumber: Run/Stop

This commit is contained in:
Ratan Varghese 2021-03-22 00:33:31 -04:00
parent f7dedbe465
commit 60feafdfec
2 changed files with 8 additions and 4 deletions
Software/waveview/src/components

View File

@ -10,6 +10,7 @@ import {
LineSeries
} from 'react-vis';
import GraphStatus from '../../configuration/enums/graphStatus';
import TestPoints from '../../util/testpoints';
class Graph extends React.Component<any, any> {
@ -29,8 +30,10 @@ class Graph extends React.Component<any, any> {
}
tick() {
this.props.dispatch({type: 'graph/tick'});
this.generator.update();
if(!this.props.graph.singleMode && this.props.graph.currentStatus === GraphStatus.On) {
this.props.dispatch({type: 'graph/tick'});
this.generator.update();
}
}
render() {

View File

@ -2,6 +2,7 @@ import React from 'react';
import { connect } from 'react-redux';
import MathType from '../../../configuration/enums/mathType';
import './../../../css/sidebar/widgets/measurementsWidget.css';
import GraphStatus from '../../../configuration/enums/graphStatus';
import {Plumber, PlumberArgs, CMD} from '../../../util/plumber';
@ -16,8 +17,8 @@ class MeasurementsWidget extends React.Component<any, any> {
}
tick() {
this.props.dispatch({type: 'measurements/tick'});
if(!this.props.graph.singleMode) {
if(!this.props.graph.singleMode && this.props.graph.currentStatus === GraphStatus.On) {
this.props.dispatch({type: 'measurements/tick'});
this.update();
}
}