ch.aplu.nxt
Class UltrasonicAdapter
java.lang.Object
ch.aplu.nxt.UltrasonicAdapter
- All Implemented Interfaces:
- UltrasonicListener
public class UltrasonicAdapter
- extends java.lang.Object
- implements UltrasonicListener
Class with empty callback methods for the ultrasonic sensor.
Method Summary |
void |
far(SensorPort port,
int level)
Empty method called when the distance exceeds the trigger level. |
void |
near(SensorPort port,
int level)
Empty method called when the distance falls below the trigger level. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UltrasonicAdapter
public UltrasonicAdapter()
far
public void far(SensorPort port,
int level)
- Empty method called when the distance exceeds the trigger level.
Override it to process the event.
- Specified by:
far
in interface UltrasonicListener
- Parameters:
port
- the port where the sensor is plugged inlevel
- the current distance level
near
public void near(SensorPort port,
int level)
- Empty method called when the distance falls below the trigger level.
Override it to process the event.
- Specified by:
near
in interface UltrasonicListener
- Parameters:
port
- the port where the sensor is plugged inlevel
- the current distance level