Package com.thegongoliers.input.current
Class CurrentSpikeSensor
- java.lang.Object
-
- com.thegongoliers.input.current.CurrentSpikeSensor
-
- All Implemented Interfaces:
ResettableSwitch
,Switch
public class CurrentSpikeSensor extends java.lang.Object implements ResettableSwitch
-
-
Constructor Summary
Constructors Constructor Description CurrentSpikeSensor(CurrentTripSensor currentTripSensor)
Triggers after a spike in the current
-
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
-
CurrentSpikeSensor
public CurrentSpikeSensor(CurrentTripSensor currentTripSensor)
Triggers after a spike in the current- Parameters:
currentTripSensor
- The current trip sensor (HighCurrentSensors detect upward spikes, LowCurrentSensors 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
-
-