Modifier and Type | Class and Description |
---|---|
static interface |
NXTMotorMonitor.NXTMotorListener |
Modifier and Type | Field and Description |
---|---|
static String |
ALL_EVENT |
static String |
ENCODER_EVENT |
private ArrayList<NXTMotorMonitor.NXTMotorListener> |
encoderList |
private RemoteMotor |
motor_a |
private RemoteMotor |
motor_b |
private RemoteMotor |
motor_c |
private ArrayList<MotorData> |
motorInfo |
static String |
POWER_EVENT |
private ArrayList<NXTMotorMonitor.NXTMotorListener> |
powerList |
static String |
SPEED_EVENT |
private ArrayList<NXTMotorMonitor.NXTMotorListener> |
speedList |
Constructor and Description |
---|
NXTMotorMonitor() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(NXTMotorMonitor.NXTMotorListener toAdd,
String listenerType) |
private void |
notifyEncoderListeners(int encoderCount,
RemoteMotor motor) |
private void |
notifyPowerListeners(int power,
RemoteMotor motor) |
private void |
notifySpeedListeners(int speed,
RemoteMotor motor) |
void |
run() |
private RemoteMotor motor_a
private RemoteMotor motor_b
private RemoteMotor motor_c
public static final String POWER_EVENT
public static final String SPEED_EVENT
public static final String ENCODER_EVENT
public static final String ALL_EVENT
private ArrayList<NXTMotorMonitor.NXTMotorListener> powerList
private ArrayList<NXTMotorMonitor.NXTMotorListener> speedList
private ArrayList<NXTMotorMonitor.NXTMotorListener> encoderList
private void notifyPowerListeners(int power, RemoteMotor motor)
private void notifySpeedListeners(int speed, RemoteMotor motor)
private void notifyEncoderListeners(int encoderCount, RemoteMotor motor)
public void addListener(NXTMotorMonitor.NXTMotorListener toAdd, String listenerType)