Package org.deepjava.runtime.mpc555.demo
Class Robi2MotorDemo
- java.lang.Object
-
- org.deepjava.runtime.ppc32.Task
-
- org.deepjava.runtime.mpc555.demo.Robi2MotorDemo
-
- All Implemented Interfaces:
Ippc32
,Actionable
public class Robi2MotorDemo extends Task
Robi2 Motor Demo. Use the given commands to control the Robi.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static int
driveBackward
(package private) static int
driveForward
(package private) int
state
(package private) static int
stop1
(package private) static int
stop2
(package private) static Robi2MotorDemo
task
-
Fields inherited from class org.deepjava.runtime.ppc32.Task
done, firstErr, maxNofTasks, nofActivations, period, safe, time
-
Fields inherited from interface org.deepjava.runtime.ppc32.Ippc32
CR, CTR, DAR, DEC, DSISR, FPR0, FPR1, FPR10, FPR11, FPR12, FPR13, FPR14, FPR15, FPR16, FPR17, FPR18, FPR19, FPR2, FPR20, FPR21, FPR22, FPR23, FPR24, FPR25, FPR26, FPR27, FPR28, FPR29, FPR3, FPR30, FPR31, FPR4, FPR5, FPR6, FPR7, FPR8, FPR9, FPSCR, LR, MSR, R0, R1, R10, R11, R12, R13, R14, R15, R16, R17, R18, R19, R2, R20, R21, R22, R23, R24, R25, R26, R27, R28, R29, R3, R30, R31, R4, R5, R6, R7, R8, R9, SPR1, SPR18, SPR19, SPR22, SPR26, SPR268, SPR269, SPR27, SPR272, SPR273, SPR274, SPR275, SPR287, SPR8, SPR9, SPRG0, SPRG1, SPRG2, SPRG3, SRR0, SRR1, TBLread, TBUread, XER
-
-
Constructor Summary
Constructors Constructor Description Robi2MotorDemo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
action()
Action to be performed by the taskstatic void
driveFullSpeedBackward()
Drive backward with full speed.static void
driveFullSpeedForward()
Drive forward with full speed.static void
driveHalfSpeedBackward()
Drive backward with half speed.static void
driveHalfSpeedForward()
Drive forward with half speed.static void
startTask()
Start automatic demo mode.static void
stop()
Stop both motors.static void
stopTask()
Stop automatic demo mode.static void
turnLeft()
Turn left around (anticlockwise).static void
turnRight()
Turn right around (clockwise).
-
-
-
Field Detail
-
driveForward
static final int driveForward
- See Also:
- Constant Field Values
-
stop1
static final int stop1
- See Also:
- Constant Field Values
-
driveBackward
static final int driveBackward
- See Also:
- Constant Field Values
-
stop2
static final int stop2
- See Also:
- Constant Field Values
-
task
static Robi2MotorDemo task
-
state
int state
-
-
Method Detail
-
driveFullSpeedForward
public static void driveFullSpeedForward()
Drive forward with full speed.
-
driveHalfSpeedForward
public static void driveHalfSpeedForward()
Drive forward with half speed.
-
driveFullSpeedBackward
public static void driveFullSpeedBackward()
Drive backward with full speed.
-
driveHalfSpeedBackward
public static void driveHalfSpeedBackward()
Drive backward with half speed.
-
turnRight
public static void turnRight()
Turn right around (clockwise).
-
turnLeft
public static void turnLeft()
Turn left around (anticlockwise).
-
stop
public static void stop()
Stop both motors.
-
startTask
public static void startTask()
Start automatic demo mode.
-
stopTask
public static void stopTask()
Stop automatic demo mode.
-
action
public void action()
Description copied from class:Task
Action to be performed by the task- Specified by:
action
in interfaceActionable
- Overrides:
action
in classTask
-
-