mirror of
https://github.com/EEVengers/ThunderScope.git
synced 2025-04-08 06:25:30 +00:00
fixed Electron warnings
This commit is contained in:
parent
5f4fea33e6
commit
4f93d3dade
Software/waveview/src
@ -49,8 +49,8 @@ class App extends React.Component {
|
||||
tick() {
|
||||
let tickCount = this.state.tickCount + 1;
|
||||
this.generator.update();
|
||||
if(tickCount % 100 == 0) {
|
||||
this.conf.update(tickCount % 1000 != 0);
|
||||
if(tickCount % 100 === 0) {
|
||||
this.conf.update(tickCount % 1000 !== 0);
|
||||
//this.conf.mathUpdate();
|
||||
}
|
||||
this.setState({tickCount: tickCount});
|
||||
|
@ -11,11 +11,11 @@ class Channel extends React.Component<any, any> {
|
||||
<label>
|
||||
CH{this.props.channelNumber}:
|
||||
{" "}
|
||||
{this.props.verticalWidget.settings[this.props.channelNumber-1].controlMode == ControlMode.Course
|
||||
{this.props.verticalWidget.settings[this.props.channelNumber-1].controlMode === ControlMode.Course
|
||||
&& this.props.verticalWidget.timePerDivision[this.props.channelNumber-1].course.value.toString()
|
||||
+ this.props.verticalWidget.timePerDivision[this.props.channelNumber-1].course.unit.toString() + "/div"}
|
||||
{this.props.verticalWidget.settings[this.props.channelNumber-1].controlMode == ControlMode.Fine
|
||||
&& (this.props.verticalWidget.settings[this.props.channelNumber-1].probeMode == ProbeMode.x1
|
||||
{this.props.verticalWidget.settings[this.props.channelNumber-1].controlMode === ControlMode.Fine
|
||||
&& (this.props.verticalWidget.settings[this.props.channelNumber-1].probeMode === ProbeMode.x1
|
||||
? this.props.verticalWidget.timePerDivision[this.props.channelNumber-1].fine.value.toString()
|
||||
: this.props.verticalWidget.timePerDivision[this.props.channelNumber-1].fine.x10value.toString())
|
||||
+ this.props.verticalWidget.timePerDivision[this.props.channelNumber-1].fine.unit.toString() + "/div"},
|
||||
|
@ -57,7 +57,7 @@ class HorizontalWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeTimeBaseMode(ControlMode.Course)}>
|
||||
<label
|
||||
className=""
|
||||
style={{fontWeight: this.props.horizontalWidget.horizontalTimeBase.mode == ControlMode.Course ? "bold" : "normal"}}>
|
||||
style={{fontWeight: this.props.horizontalWidget.horizontalTimeBase.mode === ControlMode.Course ? "bold" : "normal"}}>
|
||||
Course
|
||||
</label>
|
||||
</button>
|
||||
@ -66,7 +66,7 @@ class HorizontalWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeTimeBaseMode(ControlMode.Fine)}>
|
||||
<label
|
||||
className=""
|
||||
style={{fontWeight: this.props.horizontalWidget.horizontalTimeBase.mode == ControlMode.Fine ? "bold" : "normal"}}>
|
||||
style={{fontWeight: this.props.horizontalWidget.horizontalTimeBase.mode === ControlMode.Fine ? "bold" : "normal"}}>
|
||||
Fine
|
||||
</label>
|
||||
</button>
|
||||
@ -75,33 +75,33 @@ class HorizontalWidget extends React.Component<any, any> {
|
||||
<div className="HorizontalWidgetAdjustBlock-HorizontalTimeBase">
|
||||
<button
|
||||
className="MinusButton"
|
||||
onClick={() => this.props.horizontalWidget.horizontalTimeBase.mode == ControlMode.Course ? this.decrementTimeBase() : this.decrementTimeBaseFine()}>
|
||||
onClick={() => this.props.horizontalWidget.horizontalTimeBase.mode === ControlMode.Course ? this.decrementTimeBase() : this.decrementTimeBaseFine()}>
|
||||
-
|
||||
</button>
|
||||
<label
|
||||
className="AdjustValueBlockHorizontalTimeBase"
|
||||
style={{color: "white"}}
|
||||
>
|
||||
{this.props.horizontalWidget.horizontalTimeBase.mode == ControlMode.Course && this.props.horizontalWidget.horizontalTimeBase.course.value.toString()}
|
||||
{this.props.horizontalWidget.horizontalTimeBase.mode == ControlMode.Course && this.props.horizontalWidget.horizontalTimeBase.course.unit.toString() + "/div"}
|
||||
{this.props.horizontalWidget.horizontalTimeBase.mode == ControlMode.Fine && this.props.horizontalWidget.horizontalTimeBase.fine.value.toString()}
|
||||
{this.props.horizontalWidget.horizontalTimeBase.mode == ControlMode.Fine && this.props.horizontalWidget.horizontalTimeBase.fine.unit.toString() + "/div"}
|
||||
{this.props.horizontalWidget.horizontalTimeBase.mode === ControlMode.Course && this.props.horizontalWidget.horizontalTimeBase.course.value.toString()}
|
||||
{this.props.horizontalWidget.horizontalTimeBase.mode === ControlMode.Course && this.props.horizontalWidget.horizontalTimeBase.course.unit.toString() + "/div"}
|
||||
{this.props.horizontalWidget.horizontalTimeBase.mode === ControlMode.Fine && this.props.horizontalWidget.horizontalTimeBase.fine.value.toString()}
|
||||
{this.props.horizontalWidget.horizontalTimeBase.mode === ControlMode.Fine && this.props.horizontalWidget.horizontalTimeBase.fine.unit.toString() + "/div"}
|
||||
</label>
|
||||
<button
|
||||
className="PlusButton"
|
||||
onClick={() => this.props.horizontalWidget.horizontalTimeBase.mode == ControlMode.Course ? this.incrementTimeBase() : this.incrementTimeBaseFine()}>
|
||||
onClick={() => this.props.horizontalWidget.horizontalTimeBase.mode === ControlMode.Course ? this.incrementTimeBase() : this.incrementTimeBaseFine()}>
|
||||
+
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{this.props.horizontalWidget.horizontalTimeBase.mode == ControlMode.Fine &&
|
||||
{this.props.horizontalWidget.horizontalTimeBase.mode === ControlMode.Fine &&
|
||||
<div className="FineModeUnitButtons">
|
||||
<button
|
||||
className="NanoSecondButton"
|
||||
onClick={() => this.changeTimeBaseUnit(TimeUnit.NanoSecond)}>
|
||||
<label
|
||||
className={"NanoSecondButtonText"}
|
||||
style={{fontWeight: this.props.horizontalWidget.horizontalTimeBase.fine.unit == TimeUnit.NanoSecond ? "bold" : "normal"}}>
|
||||
style={{fontWeight: this.props.horizontalWidget.horizontalTimeBase.fine.unit === TimeUnit.NanoSecond ? "bold" : "normal"}}>
|
||||
{TimeUnit.NanoSecond}
|
||||
</label>
|
||||
</button>
|
||||
@ -110,7 +110,7 @@ class HorizontalWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeTimeBaseUnit(TimeUnit.MicroSecond)}>
|
||||
<label
|
||||
className={"MicroSecondButtonText"}
|
||||
style={{fontWeight: this.props.horizontalWidget.horizontalTimeBase.fine.unit == TimeUnit.MicroSecond ? "bold" : "normal"}}>
|
||||
style={{fontWeight: this.props.horizontalWidget.horizontalTimeBase.fine.unit === TimeUnit.MicroSecond ? "bold" : "normal"}}>
|
||||
{TimeUnit.MicroSecond}
|
||||
</label>
|
||||
</button>
|
||||
@ -119,7 +119,7 @@ class HorizontalWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeTimeBaseUnit(TimeUnit.MilliSecond)}>
|
||||
<label
|
||||
className={"MilliSecondButtonText"}
|
||||
style={{fontWeight: this.props.horizontalWidget.horizontalTimeBase.fine.unit == TimeUnit.MilliSecond ? "bold" : "normal"}}>
|
||||
style={{fontWeight: this.props.horizontalWidget.horizontalTimeBase.fine.unit === TimeUnit.MilliSecond ? "bold" : "normal"}}>
|
||||
{TimeUnit.MilliSecond}
|
||||
</label>
|
||||
</button>
|
||||
@ -128,7 +128,7 @@ class HorizontalWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeTimeBaseUnit(TimeUnit.Second)}>
|
||||
<label
|
||||
className={"SecondButtonText"}
|
||||
style={{fontWeight: this.props.horizontalWidget.horizontalTimeBase.fine.unit == TimeUnit.Second ? "bold" : "normal"}}>
|
||||
style={{fontWeight: this.props.horizontalWidget.horizontalTimeBase.fine.unit === TimeUnit.Second ? "bold" : "normal"}}>
|
||||
{TimeUnit.Second}
|
||||
</label>
|
||||
</button>
|
||||
|
@ -54,7 +54,7 @@ class TriggerWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeChannel(1)}>
|
||||
<label
|
||||
className={"Channel1ButtonText"}
|
||||
style={{color: this.props.triggerWidget.triggerChannel == 1 ? this.props.triggerWidget.channelColorsList[this.props.triggerWidget.triggerChannel-1] : "black"}}>
|
||||
style={{color: this.props.triggerWidget.triggerChannel === 1 ? this.props.triggerWidget.channelColorsList[this.props.triggerWidget.triggerChannel-1] : "black"}}>
|
||||
CH1
|
||||
</label>
|
||||
</button>
|
||||
@ -63,7 +63,7 @@ class TriggerWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeChannel(2)}>
|
||||
<label
|
||||
className={"Channel2ButtonText"}
|
||||
style={{color: this.props.triggerWidget.triggerChannel == 2 ? this.props.triggerWidget.channelColorsList[this.props.triggerWidget.triggerChannel-1] : "black"}}>
|
||||
style={{color: this.props.triggerWidget.triggerChannel === 2 ? this.props.triggerWidget.channelColorsList[this.props.triggerWidget.triggerChannel-1] : "black"}}>
|
||||
CH2
|
||||
</label>
|
||||
</button>
|
||||
@ -72,7 +72,7 @@ class TriggerWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeChannel(3)}>
|
||||
<label
|
||||
className={"Channel3ButtonText"}
|
||||
style={{color: this.props.triggerWidget.triggerChannel == 3 ? this.props.triggerWidget.channelColorsList[this.props.triggerWidget.triggerChannel-1] : "black"}}>
|
||||
style={{color: this.props.triggerWidget.triggerChannel === 3 ? this.props.triggerWidget.channelColorsList[this.props.triggerWidget.triggerChannel-1] : "black"}}>
|
||||
CH3
|
||||
</label>
|
||||
</button>
|
||||
@ -81,7 +81,7 @@ class TriggerWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeChannel(4)}>
|
||||
<label
|
||||
className={"Channel4ButtonText"}
|
||||
style={{color: this.props.triggerWidget.triggerChannel == 4 ? this.props.triggerWidget.channelColorsList[this.props.triggerWidget.triggerChannel-1] : "black"}}>
|
||||
style={{color: this.props.triggerWidget.triggerChannel === 4 ? this.props.triggerWidget.channelColorsList[this.props.triggerWidget.triggerChannel-1] : "black"}}>
|
||||
CH4
|
||||
</label>
|
||||
</button>
|
||||
@ -96,7 +96,7 @@ class TriggerWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeTriggerType(TriggerType.FallingEdge)}>
|
||||
<label
|
||||
className="FallingEdgeButtonText"
|
||||
style={{fontWeight: this.props.triggerWidget.triggerType[this.props.triggerWidget.triggerChannel-1] == TriggerType.FallingEdge ? "bold" : "normal"}}>
|
||||
style={{fontWeight: this.props.triggerWidget.triggerType[this.props.triggerWidget.triggerChannel-1] === TriggerType.FallingEdge ? "bold" : "normal"}}>
|
||||
Falling Edge
|
||||
</label>
|
||||
</button>
|
||||
@ -105,7 +105,7 @@ class TriggerWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeTriggerType(TriggerType.RisingEdge)}>
|
||||
<label
|
||||
className="RisingEdgeButtonText"
|
||||
style={{fontWeight: this.props.triggerWidget.triggerType[this.props.triggerWidget.triggerChannel-1] == TriggerType.RisingEdge ? "bold" : "normal"}}>
|
||||
style={{fontWeight: this.props.triggerWidget.triggerType[this.props.triggerWidget.triggerChannel-1] === TriggerType.RisingEdge ? "bold" : "normal"}}>
|
||||
Rising Edge
|
||||
</label>
|
||||
</button>
|
||||
@ -140,7 +140,7 @@ class TriggerWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeTriggerLevelUnit(VoltageUnit.NanoVolt)}>
|
||||
<label
|
||||
className={"NanoVoltButtonText"}
|
||||
style={{fontWeight: this.props.triggerWidget.triggerLevel[this.props.triggerWidget.triggerChannel-1].unit == VoltageUnit.NanoVolt ? "bold" : "normal"}}>
|
||||
style={{fontWeight: this.props.triggerWidget.triggerLevel[this.props.triggerWidget.triggerChannel-1].unit === VoltageUnit.NanoVolt ? "bold" : "normal"}}>
|
||||
{VoltageUnit.NanoVolt}
|
||||
</label>
|
||||
</button>
|
||||
@ -149,7 +149,7 @@ class TriggerWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeTriggerLevelUnit(VoltageUnit.MicroVolt)}>
|
||||
<label
|
||||
className={"MicroVoltButtonText"}
|
||||
style={{fontWeight: this.props.triggerWidget.triggerLevel[this.props.triggerWidget.triggerChannel-1].unit == VoltageUnit.MicroVolt ? "bold" : "normal"}}>
|
||||
style={{fontWeight: this.props.triggerWidget.triggerLevel[this.props.triggerWidget.triggerChannel-1].unit === VoltageUnit.MicroVolt ? "bold" : "normal"}}>
|
||||
{VoltageUnit.MicroVolt}
|
||||
</label>
|
||||
</button>
|
||||
@ -158,7 +158,7 @@ class TriggerWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeTriggerLevelUnit(VoltageUnit.MilliVolt)}>
|
||||
<label
|
||||
className={"MilliVoltButtonText"}
|
||||
style={{fontWeight: this.props.triggerWidget.triggerLevel[this.props.triggerWidget.triggerChannel-1].unit == VoltageUnit.MilliVolt ? "bold" : "normal"}}>
|
||||
style={{fontWeight: this.props.triggerWidget.triggerLevel[this.props.triggerWidget.triggerChannel-1].unit === VoltageUnit.MilliVolt ? "bold" : "normal"}}>
|
||||
{VoltageUnit.MilliVolt}
|
||||
</label>
|
||||
</button>
|
||||
@ -167,7 +167,7 @@ class TriggerWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeTriggerLevelUnit(VoltageUnit.Volt)}>
|
||||
<label
|
||||
className={"VoltButtonText"}
|
||||
style={{fontWeight: this.props.triggerWidget.triggerLevel[this.props.triggerWidget.triggerChannel-1].unit == VoltageUnit.Volt ? "bold" : "normal"}}>
|
||||
style={{fontWeight: this.props.triggerWidget.triggerLevel[this.props.triggerWidget.triggerChannel-1].unit === VoltageUnit.Volt ? "bold" : "normal"}}>
|
||||
{VoltageUnit.Volt}
|
||||
</label>
|
||||
</button>
|
||||
|
@ -80,7 +80,7 @@ class VerticalWidget extends React.Component<any, any> {
|
||||
onDoubleClick={() => this.changeChannelStatus(0)}>
|
||||
<label
|
||||
className={"Channel1ButtonText"}
|
||||
style={{color: this.props.verticalWidget.settings[0].status == 1 ? this.props.verticalWidget.channelColorsList[0] : "black"}}>
|
||||
style={{color: this.props.verticalWidget.settings[0].status === 1 ? this.props.verticalWidget.channelColorsList[0] : "black"}}>
|
||||
CH1
|
||||
</label>
|
||||
</button>
|
||||
@ -90,7 +90,7 @@ class VerticalWidget extends React.Component<any, any> {
|
||||
onDoubleClick={() => this.changeChannelStatus(1)}>
|
||||
<label
|
||||
className={"Channel2ButtonText"}
|
||||
style={{color: this.props.verticalWidget.settings[1].status == 1 ? this.props.verticalWidget.channelColorsList[1] : "black"}}>
|
||||
style={{color: this.props.verticalWidget.settings[1].status === 1 ? this.props.verticalWidget.channelColorsList[1] : "black"}}>
|
||||
CH2
|
||||
</label>
|
||||
</button>
|
||||
@ -100,7 +100,7 @@ class VerticalWidget extends React.Component<any, any> {
|
||||
onDoubleClick={() => this.changeChannelStatus(2)}>
|
||||
<label
|
||||
className={"Channel3ButtonText"}
|
||||
style={{color: this.props.verticalWidget.settings[2].status == 1 ? this.props.verticalWidget.channelColorsList[2] : "black"}}>
|
||||
style={{color: this.props.verticalWidget.settings[2].status === 1 ? this.props.verticalWidget.channelColorsList[2] : "black"}}>
|
||||
CH3
|
||||
</label>
|
||||
</button>
|
||||
@ -110,7 +110,7 @@ class VerticalWidget extends React.Component<any, any> {
|
||||
onDoubleClick={() => this.changeChannelStatus(3)}>
|
||||
<label
|
||||
className={"Channel4ButtonText"}
|
||||
style={{color: this.props.verticalWidget.settings[3].status == 1 ? this.props.verticalWidget.channelColorsList[3] : "black"}}>
|
||||
style={{color: this.props.verticalWidget.settings[3].status === 1 ? this.props.verticalWidget.channelColorsList[3] : "black"}}>
|
||||
CH4
|
||||
</label>
|
||||
</button>
|
||||
@ -125,7 +125,7 @@ class VerticalWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeControlMode(ControlMode.Course)}>
|
||||
<label
|
||||
className=""
|
||||
style={{fontWeight: this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].controlMode == ControlMode.Course ? "bold" : "normal"}}>
|
||||
style={{fontWeight: this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].controlMode === ControlMode.Course ? "bold" : "normal"}}>
|
||||
Course
|
||||
</label>
|
||||
</button>
|
||||
@ -134,7 +134,7 @@ class VerticalWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeControlMode(ControlMode.Fine)}>
|
||||
<label
|
||||
className=""
|
||||
style={{fontWeight: this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].controlMode == ControlMode.Fine ? "bold" : "normal"}}>
|
||||
style={{fontWeight: this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].controlMode === ControlMode.Fine ? "bold" : "normal"}}>
|
||||
Fine
|
||||
</label>
|
||||
</button>
|
||||
@ -143,25 +143,25 @@ class VerticalWidget extends React.Component<any, any> {
|
||||
<div className="VerticalWidgetAdjustBlock-TimePerDivision">
|
||||
<button
|
||||
className="MinusButton"
|
||||
onClick={() => this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].controlMode == ControlMode.Course ? this.decrementTimePerDivision() : this.decrementTimePerDivisionFine()}>
|
||||
onClick={() => this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].controlMode === ControlMode.Course ? this.decrementTimePerDivision() : this.decrementTimePerDivisionFine()}>
|
||||
-
|
||||
</button>
|
||||
<label
|
||||
className="AdjustValueBlockTimePerDivision"
|
||||
style={{color: this.props.verticalWidget.channelColorsList[this.props.verticalWidget.activeChannel-1]}}
|
||||
>
|
||||
{this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].controlMode == ControlMode.Course
|
||||
{this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].controlMode === ControlMode.Course
|
||||
&& this.props.verticalWidget.timePerDivision[this.props.verticalWidget.activeChannel-1].course.value.toString()
|
||||
+ this.props.verticalWidget.timePerDivision[this.props.verticalWidget.activeChannel-1].course.unit.toString() + "/div"}
|
||||
{this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].controlMode == ControlMode.Fine
|
||||
&& (this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].probeMode == ProbeMode.x1
|
||||
{this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].controlMode === ControlMode.Fine
|
||||
&& (this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].probeMode === ProbeMode.x1
|
||||
? this.props.verticalWidget.timePerDivision[this.props.verticalWidget.activeChannel-1].fine.value.toString()
|
||||
: this.props.verticalWidget.timePerDivision[this.props.verticalWidget.activeChannel-1].fine.x10value.toString())
|
||||
+ this.props.verticalWidget.timePerDivision[this.props.verticalWidget.activeChannel-1].fine.unit.toString() + "/div"}
|
||||
</label>
|
||||
<button
|
||||
className="PlusButton"
|
||||
onClick={() => this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].controlMode == ControlMode.Course ? this.incrementTimePerDivision() : this.incrementTimePerDivisionFine()}>
|
||||
onClick={() => this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].controlMode === ControlMode.Course ? this.incrementTimePerDivision() : this.incrementTimePerDivisionFine()}>
|
||||
+
|
||||
</button>
|
||||
</div>
|
||||
@ -173,7 +173,7 @@ class VerticalWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeDivisionUnit(VoltageUnit.NanoVolt)}>
|
||||
<label
|
||||
className={"MicroVoltButtonText"}
|
||||
style={{fontWeight: this.props.verticalWidget.timePerDivision[this.props.verticalWidget.activeChannel-1].fine.unit == VoltageUnit.NanoVolt? "bold" : "normal"}}>
|
||||
style={{fontWeight: this.props.verticalWidget.timePerDivision[this.props.verticalWidget.activeChannel-1].fine.unit === VoltageUnit.NanoVolt? "bold" : "normal"}}>
|
||||
{VoltageUnit.NanoVolt}
|
||||
</label>
|
||||
</button>
|
||||
@ -182,7 +182,7 @@ class VerticalWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeDivisionUnit(VoltageUnit.MicroVolt)}>
|
||||
<label
|
||||
className={"MicroVoltButtonText"}
|
||||
style={{fontWeight: this.props.verticalWidget.timePerDivision[this.props.verticalWidget.activeChannel-1].fine.unit == VoltageUnit.MicroVolt? "bold" : "normal"}}>
|
||||
style={{fontWeight: this.props.verticalWidget.timePerDivision[this.props.verticalWidget.activeChannel-1].fine.unit === VoltageUnit.MicroVolt? "bold" : "normal"}}>
|
||||
{VoltageUnit.MicroVolt}
|
||||
</label>
|
||||
</button>
|
||||
@ -191,7 +191,7 @@ class VerticalWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeDivisionUnit(VoltageUnit.MilliVolt)}>
|
||||
<label
|
||||
className={"MilliVoltButtonText"}
|
||||
style={{fontWeight: this.props.verticalWidget.timePerDivision[this.props.verticalWidget.activeChannel-1].fine.unit == VoltageUnit.MilliVolt ? "bold" : "normal"}}>
|
||||
style={{fontWeight: this.props.verticalWidget.timePerDivision[this.props.verticalWidget.activeChannel-1].fine.unit === VoltageUnit.MilliVolt ? "bold" : "normal"}}>
|
||||
{VoltageUnit.MilliVolt}
|
||||
</label>
|
||||
</button>
|
||||
@ -200,7 +200,7 @@ class VerticalWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeDivisionUnit(VoltageUnit.Volt)}>
|
||||
<label
|
||||
className={"VoltButtonText"}
|
||||
style={{fontWeight: this.props.verticalWidget.timePerDivision[this.props.verticalWidget.activeChannel-1].fine.unit == VoltageUnit.Volt ? "bold" : "normal"}}>
|
||||
style={{fontWeight: this.props.verticalWidget.timePerDivision[this.props.verticalWidget.activeChannel-1].fine.unit === VoltageUnit.Volt ? "bold" : "normal"}}>
|
||||
{VoltageUnit.Volt}
|
||||
</label>
|
||||
</button>
|
||||
@ -239,7 +239,7 @@ class VerticalWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeCouplingMode(MeasurementType.AC)}>
|
||||
<label
|
||||
className="AC-ButtonText"
|
||||
style={{fontWeight: this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].coupling == MeasurementType.AC ? "bold" : "normal"}}>
|
||||
style={{fontWeight: this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].coupling === MeasurementType.AC ? "bold" : "normal"}}>
|
||||
{MeasurementType.AC}
|
||||
</label>
|
||||
</button>
|
||||
@ -248,7 +248,7 @@ class VerticalWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeCouplingMode(MeasurementType.DC)}>
|
||||
<label
|
||||
className="DC-ButtonText"
|
||||
style={{fontWeight: this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].coupling == MeasurementType.DC ? "bold" : "normal"}}>
|
||||
style={{fontWeight: this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].coupling === MeasurementType.DC ? "bold" : "normal"}}>
|
||||
{MeasurementType.DC}
|
||||
</label>
|
||||
</button>
|
||||
@ -263,7 +263,7 @@ class VerticalWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeProbeMode(ProbeMode.x1)}>
|
||||
<label
|
||||
className="x1-ButtonText"
|
||||
style={{fontWeight: this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].probeMode == ProbeMode.x1 ? "bold" : "normal"}}>
|
||||
style={{fontWeight: this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].probeMode === ProbeMode.x1 ? "bold" : "normal"}}>
|
||||
x1
|
||||
</label>
|
||||
</button>
|
||||
@ -272,7 +272,7 @@ class VerticalWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeProbeMode(ProbeMode.x10)}>
|
||||
<label
|
||||
className="x10-ButtonText"
|
||||
style={{fontWeight: this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].probeMode == ProbeMode.x10 ? "bold" : "normal"}}>
|
||||
style={{fontWeight: this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].probeMode === ProbeMode.x10 ? "bold" : "normal"}}>
|
||||
x10
|
||||
</label>
|
||||
</button>
|
||||
@ -287,7 +287,7 @@ class VerticalWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeBandwidth(20)}>
|
||||
<label
|
||||
className="20MHz-ButtonText"
|
||||
style={{fontWeight: this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].bandwidth == 20 ? "bold" : "normal"}}>
|
||||
style={{fontWeight: this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].bandwidth === 20 ? "bold" : "normal"}}>
|
||||
20MHz
|
||||
</label>
|
||||
</button>
|
||||
@ -296,7 +296,7 @@ class VerticalWidget extends React.Component<any, any> {
|
||||
onClick={() => this.changeBandwidth(100)}>
|
||||
<label
|
||||
className="100MHz-ButtonText"
|
||||
style={{fontWeight: this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].bandwidth == 100 ? "bold" : "normal"}}>
|
||||
style={{fontWeight: this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].bandwidth === 100 ? "bold" : "normal"}}>
|
||||
100MHz
|
||||
</label>
|
||||
</button>
|
||||
@ -305,7 +305,7 @@ class VerticalWidget extends React.Component<any, any> {
|
||||
onClick={() => (this.props.verticalWidget.totalChannelsUsed <= 2) && this.changeBandwidth(200)}>
|
||||
<label
|
||||
className="200MHz-ButtonText"
|
||||
style={{fontWeight: this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].bandwidth == 200 ? "bold" : "normal"}}>
|
||||
style={{fontWeight: this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].bandwidth === 200 ? "bold" : "normal"}}>
|
||||
200MHz
|
||||
</label>
|
||||
</button>
|
||||
@ -314,7 +314,7 @@ class VerticalWidget extends React.Component<any, any> {
|
||||
onClick={() => (this.props.verticalWidget.totalChannelsUsed <= 1) && this.changeBandwidth(350)}>
|
||||
<label
|
||||
className="350MHz-ButtonText"
|
||||
style={{fontWeight: this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].bandwidth == 350 ? "bold" : "normal"}}>
|
||||
style={{fontWeight: this.props.verticalWidget.settings[this.props.verticalWidget.activeChannel-1].bandwidth === 350 ? "bold" : "normal"}}>
|
||||
350MHz
|
||||
</label>
|
||||
</button>
|
||||
|
@ -1,22 +1,6 @@
|
||||
import VoltageUnit from './enums/voltageUnit';
|
||||
import TimeUnit from './enums/timeUnit';
|
||||
|
||||
const x1ProbeValues = [
|
||||
"10V/div",
|
||||
"5V/div",
|
||||
"2V/div",
|
||||
"1V/div",
|
||||
"500mV/div",
|
||||
"200mV/div",
|
||||
"100mV/div",
|
||||
"50mV/div",
|
||||
"20mV/div",
|
||||
"10mV/div",
|
||||
"5mV/div",
|
||||
"2mV/div",
|
||||
"1mV/div"
|
||||
];
|
||||
|
||||
const x1ProbeValues_New = [
|
||||
{
|
||||
value: 10,
|
||||
@ -72,22 +56,6 @@ const x1ProbeValues_New = [
|
||||
}
|
||||
];
|
||||
|
||||
const x10ProbeValues = [
|
||||
"100V/div",
|
||||
"50V/div",
|
||||
"20V/div",
|
||||
"10V/div",
|
||||
"5V/div",
|
||||
"2V/div",
|
||||
"1V/div",
|
||||
"500mV/div",
|
||||
"200mV/div",
|
||||
"100mV/div",
|
||||
"50mV/div",
|
||||
"20mV/div",
|
||||
"10mV/div"
|
||||
];
|
||||
|
||||
const x10ProbeValues_New = [
|
||||
{
|
||||
value: 100,
|
||||
@ -146,40 +114,6 @@ const x10ProbeValues_New = [
|
||||
// 13 different voltages per divison presets
|
||||
// Start at x1ProbeValues[6] and change accordingly
|
||||
|
||||
const horizontalTimeBases = [
|
||||
"1ns/div",
|
||||
"2ns/div",
|
||||
"5ns/div",
|
||||
"10ns/div",
|
||||
"20ns/div",
|
||||
"50ns/div",
|
||||
"100ns/div",
|
||||
"200ns/div",
|
||||
"500ns/div",
|
||||
"1µs/div",
|
||||
"2µs/div",
|
||||
"5µs/div",
|
||||
"10µs/div",
|
||||
"20µs/div",
|
||||
"50µs/div",
|
||||
"100µs/div",
|
||||
"200µs/div",
|
||||
"500µs/div",
|
||||
"1ms/div",
|
||||
"2ms/div",
|
||||
"5ms/div",
|
||||
"10ms/div",
|
||||
"20ms/div",
|
||||
"50ms/div",
|
||||
"100ms/div",
|
||||
"200ms/div",
|
||||
"500ms/div",
|
||||
"1s/div",
|
||||
"2s/div",
|
||||
"5s/div",
|
||||
"10s/div"
|
||||
];
|
||||
|
||||
const horizontalTimeBases_New = [
|
||||
{
|
||||
value: 1,
|
||||
@ -310,9 +244,6 @@ const horizontalTimeBases_New = [
|
||||
// Start at horizontalTimeBases[15] and change accordingly
|
||||
|
||||
export default {
|
||||
x1ProbeValues,
|
||||
x10ProbeValues,
|
||||
horizontalTimeBases,
|
||||
x1ProbeValues_New,
|
||||
x10ProbeValues_New,
|
||||
horizontalTimeBases_New
|
||||
|
@ -17,7 +17,7 @@ export default function(state = VerticalWidgetInitialState, action: {type: any,
|
||||
|
||||
tmp2 = state.verticalOffset;
|
||||
|
||||
tmp2[channelIndex].unit = action.payload == ControlMode.Fine ? state.timePerDivision[channelIndex].fine.unit : state.timePerDivision[channelIndex].course.unit;
|
||||
tmp2[channelIndex].unit = action.payload === ControlMode.Fine ? state.timePerDivision[channelIndex].fine.unit : state.timePerDivision[channelIndex].course.unit;
|
||||
return {
|
||||
...state,
|
||||
settings: tmp,
|
||||
@ -56,10 +56,10 @@ export default function(state = VerticalWidgetInitialState, action: {type: any,
|
||||
|
||||
tmp2 = state.timePerDivision;
|
||||
|
||||
tmp2[channelIndex].course.value = action.payload == ProbeMode.x1
|
||||
tmp2[channelIndex].course.value = action.payload === ProbeMode.x1
|
||||
? DefaultValues.x1ProbeValues_New[state.timePerDivision[channelIndex].index].value
|
||||
: DefaultValues.x10ProbeValues_New[state.timePerDivision[channelIndex].index].value;
|
||||
tmp2[channelIndex].course.unit = action.payload == ProbeMode.x1
|
||||
tmp2[channelIndex].course.unit = action.payload === ProbeMode.x1
|
||||
? DefaultValues.x1ProbeValues_New[state.timePerDivision[channelIndex].index].unit
|
||||
: DefaultValues.x10ProbeValues_New[state.timePerDivision[channelIndex].index].unit;
|
||||
|
||||
@ -120,10 +120,10 @@ export default function(state = VerticalWidgetInitialState, action: {type: any,
|
||||
tmp = state.timePerDivision;
|
||||
|
||||
tmp[channelIndex].index = state.timePerDivision[channelIndex].index - 1;
|
||||
tmp[channelIndex].course.value = state.settings[channelIndex].probeMode == ProbeMode.x1
|
||||
tmp[channelIndex].course.value = state.settings[channelIndex].probeMode === ProbeMode.x1
|
||||
? DefaultValues.x1ProbeValues_New[tmp[channelIndex].index].value
|
||||
: DefaultValues.x10ProbeValues_New[tmp[channelIndex].index].value;
|
||||
tmp[channelIndex].course.unit = state.settings[channelIndex].probeMode == ProbeMode.x1
|
||||
tmp[channelIndex].course.unit = state.settings[channelIndex].probeMode === ProbeMode.x1
|
||||
? DefaultValues.x1ProbeValues_New[tmp[channelIndex].index].unit
|
||||
: DefaultValues.x10ProbeValues_New[tmp[channelIndex].index].unit;
|
||||
|
||||
@ -142,10 +142,10 @@ export default function(state = VerticalWidgetInitialState, action: {type: any,
|
||||
tmp = state.timePerDivision;
|
||||
|
||||
tmp[channelIndex].index = state.timePerDivision[channelIndex].index + 1;
|
||||
tmp[channelIndex].course.value = state.settings[channelIndex].probeMode == ProbeMode.x1
|
||||
tmp[channelIndex].course.value = state.settings[channelIndex].probeMode === ProbeMode.x1
|
||||
? DefaultValues.x1ProbeValues_New[tmp[channelIndex].index].value
|
||||
: DefaultValues.x10ProbeValues_New[tmp[channelIndex].index].value;
|
||||
tmp[channelIndex].course.unit = state.settings[channelIndex].probeMode == ProbeMode.x1
|
||||
tmp[channelIndex].course.unit = state.settings[channelIndex].probeMode === ProbeMode.x1
|
||||
? DefaultValues.x1ProbeValues_New[tmp[channelIndex].index].unit
|
||||
: DefaultValues.x10ProbeValues_New[tmp[channelIndex].index].unit;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user