public static enum KartSequence.Instruction.OpCode extends java.lang.Enum<KartSequence.Instruction.OpCode>
Enumerates the opcodes actually supported by the Kart'a sequencer vm.
Enum Constant and Description |
---|
CLEAR_LED
Turn the LEDs off according to the given mask.
|
DRIVE_LEDS
Set digital output port to the passed value (4 lsb ar considered).
|
END
End of the sequence (Added by the builder automatically) and stops the sequence.
|
GOTO_IF_REG_NZ
Go to a given index in the sequence.
|
MODIFY_REGISTER
Modifies the register according to the given sub-opcode and and operand.
|
NOP
NOP.
|
RUN_DISTANCE
Wait for the passed amount of hall pulses on hall sensor 1.
|
RUN_FOR
Wait for the passed amount of milliseconds before executing the next instruction.
|
SET_ANGLE
Set the steering position.
|
SET_LED
Turn the LEDs on according to the given mask.
|
SET_SPEED
Set the speed of the drive subsystem.
|
Modifier and Type | Method and Description |
---|---|
byte |
toByte()
Converts the opcode to a byte that can be interpreted by the kart VM.
|
static KartSequence.Instruction.OpCode |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static KartSequence.Instruction.OpCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final KartSequence.Instruction.OpCode NOP
NOP. Probably not used that often...
public static final KartSequence.Instruction.OpCode SET_SPEED
Set the speed of the drive subsystem.
public static final KartSequence.Instruction.OpCode SET_ANGLE
Set the steering position.
public static final KartSequence.Instruction.OpCode DRIVE_LEDS
Set digital output port to the passed value (4 lsb ar considered).
public static final KartSequence.Instruction.OpCode SET_LED
Turn the LEDs on according to the given mask.
public static final KartSequence.Instruction.OpCode CLEAR_LED
Turn the LEDs off according to the given mask.
public static final KartSequence.Instruction.OpCode RUN_DISTANCE
Wait for the passed amount of hall pulses on hall sensor 1.
public static final KartSequence.Instruction.OpCode RUN_FOR
Wait for the passed amount of milliseconds before executing the next instruction.
public static final KartSequence.Instruction.OpCode MODIFY_REGISTER
Modifies the register according to the given sub-opcode and and operand.
public static final KartSequence.Instruction.OpCode GOTO_IF_REG_NZ
Go to a given index in the sequence.
public static final KartSequence.Instruction.OpCode END
End of the sequence (Added by the builder automatically) and stops the sequence.
public static KartSequence.Instruction.OpCode[] values()
for (KartSequence.Instruction.OpCode c : KartSequence.Instruction.OpCode.values()) System.out.println(c);
public static KartSequence.Instruction.OpCode valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic byte toByte()
Converts the opcode to a byte that can be interpreted by the kart VM.