|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface KartListener
Interface to implement if an object is interested in basic kart status changes. An object implementing this interface can be added using the Kart's method addKartListener(). The object will get notified about changes of the most important parameters of the Kart. Note that not all changes in the registers of the kart are announced by this listener interface. If an object needs more details about all the registers of the Kart, it should implement the KartStatusRegisterListener interface and subscribe himself using the method addStatusRegisterListener(KartStatusRegisterListener().
Method Summary | |
---|---|
void |
batteryVoltageChanged(Kart kart,
float level)
The battery level has changed. |
void |
connectionStatusChanged(Kart kart,
boolean online)
The connection status to the Kart has changed. |
void |
message(Kart kart,
java.lang.String message)
The kart has a message to display, mostly this are cryptic messages just for developers... |
void |
steeringPositionChanged(Kart kart,
int absolutePosition,
float normalizedPosition)
Called by the card whenever the actual steering position has changed. |
void |
steeringPositionHasReached(Kart kart,
boolean reached)
The steering system has changed its state. |
Method Detail |
---|
void steeringPositionChanged(Kart kart, int absolutePosition, float normalizedPosition)
kart
- The kart object.absolutePosition
- The actual position from 0 to max steps (depends kart model!).normalizedPosition
- The actual position from -1 (left) to 1 (right).void steeringPositionHasReached(Kart kart, boolean reached)
kart
- The kart object.reached
- True if the steering target position has reached, false otherwise.void batteryVoltageChanged(Kart kart, float level)
kart
- The kart object.level
- The battery level from 0 (empty) to 1 (full).void connectionStatusChanged(Kart kart, boolean online)
kart
- The kart object.online
- True if the kart is online, false otherwise.void message(Kart kart, java.lang.String message)
kart
- The kart object.message
- The message.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |