ch.aplu.nxt
Class CompassAdapter

java.lang.Object
  extended by ch.aplu.nxt.CompassAdapter
All Implemented Interfaces:
CompassListener

public class CompassAdapter
extends java.lang.Object
implements CompassListener

Class with empty callback methods for the compass sensor.


Constructor Summary
CompassAdapter()
           
 
Method Summary
 void toLeft(SensorPort port, double degrees)
          Empty method called when the compass reading points to a direction at the left half-plane of the trigger direction.
 void toRight(SensorPort port, double degrees)
          Empty method called when the compass reading points to a direction at the right half-plane of the trigger direction.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompassAdapter

public CompassAdapter()
Method Detail

toRight

public void toRight(SensorPort port,
                    double degrees)
Empty method called when the compass reading points to a direction at the right half-plane of the trigger direction. Override it to process the event.

Specified by:
toRight in interface CompassListener
Parameters:
port - the port where the sensor is plugged in
degrees - the current compass direction

toLeft

public void toLeft(SensorPort port,
                   double degrees)
Empty method called when the compass reading points to a direction at the left half-plane of the trigger direction. Override it to process the event.

Specified by:
toLeft in interface CompassListener
Parameters:
port - the port where the sensor is plugged in
degrees - the current compass direction