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 booleanisTriggered()Determines if the switch is triggeredvoidreset()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:SwitchDetermines if the switch is triggered- Specified by:
isTriggeredin 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:
resetin interfaceResettableSwitch
-
-