Package com.thegongoliers.input.voltage
Class VoltageSpikeSensor
- java.lang.Object
-
- com.thegongoliers.input.voltage.VoltageSpikeSensor
-
- All Implemented Interfaces:
ResettableSwitch
,Switch
public class VoltageSpikeSensor extends java.lang.Object implements ResettableSwitch
-
-
Constructor Summary
Constructors Constructor Description VoltageSpikeSensor(VoltageTripSensor voltageTripSensor)
Triggers after a spike in the voltage
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isTriggered()
Determines if the switch is triggeredvoid
reset()
Reset the current spike sensor to prepare it to sense a new spike.
-
-
-
Constructor Detail
-
VoltageSpikeSensor
public VoltageSpikeSensor(VoltageTripSensor voltageTripSensor)
Triggers after a spike in the voltage- Parameters:
voltageTripSensor
- The voltage trip sensor (HighVoltageSensors detect upward spikes, LowVoltageSensors downward spikes)
-
-
Method Detail
-
isTriggered
public boolean isTriggered()
Description copied from interface:Switch
Determines if the switch is triggered- Specified by:
isTriggered
in interfaceSwitch
- Returns:
- true if the switch is triggered, false otherwise
-
reset
public void reset()
Reset the current spike sensor to prepare it to sense a new spike.- Specified by:
reset
in interfaceResettableSwitch
-
-