Changes between Version 6 and Version 7 of Command Based Robot Notes
- Timestamp:
- Jan 17, 2015, 10:06:27 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Command Based Robot Notes
v6 v7 22 22 23 23 '''Commands''' 24 - ''Initialization'' 25 * Initialization occurs when a command is run for the first time 26 * This means that if a command is stopped and then run again the init() method will run twice 27 28 - ''Execution'' 29 * The execute method inside of a command is must be concise and must not bog down the system or the entire robot may stop 30 * This means that large loops and wait methods should not be inside of an execute command 31 24 32 - ''Interrupts'' 25 33 * Called to stop a command from running … … 29 37 * Commands can be easily mapped to buttons through the OI class 30 38 39 - ''Manually Starting Commands'' 40 * In order to manually start commands, create a new command object and run the start() method on the new command object 41 * This may be very important when programming the autonomous robot 42 43 {{{ExampleCommand cmd = new ExampleCommand()}}} 44 45 {{{cmd.start();}}} 31 46 '''Input Class''' 32 47 - ''Input Devices'' … … 49 64 '''Command Groups''' 50 65 - ''About'' 51 * Command Groups are used for command sequencing and paralleliza zation66 * Command Groups are used for command sequencing and parallelization 52 67 * Basically running things in a specific order or at the same time 53 68 * Think about automated actions 54 69 * Commands will add in order of methods to add them 55 70 71 - ''Parallel'' 72 * Runs one command in the command group after the other without the need for an end command. 73 56 74 - ''Sequential'' 57 * TODO(testing)75 * Runs one command in the command group after the other with the need for an end() command before moving to the next command. 58 76 59 77 {{{addSequential(new Command1());}}} 60 - ''Parallel'' 61 * TODO(testing) 78 62 79 63 80 {{{addParallel(new Command1());}}}