Changes between Version 5 and Version 6 of Command Based Robot Notes


Ignore:
Timestamp:
Jan 15, 2015, 8:11:22 PM (10 years ago)
Author:
awollack
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Command Based Robot Notes

    v5 v6  
    77 - ''Default Commands''
    88    * Continuously executing until Interrupt
     9
     10  {{{setDefaultCommand(new ExampleGroup());}}}
     11
    912 - ''Relation To Robot''
    10     * Subsystems can be compared to mechanisms that use the same overall resources
    11     * Realize that two actions cannot occur at the same time, that require the same subsystem
     13    * Subsystems can be compared to mechanisms that use the
     14      same overall resources
     15    * Realize that two actions cannot occur at the same time,        that require the same subsystem
     16
    1217 - ''Dependencies''
    13     * Dependencies are created by the requires(Subsystem subsystem)
     18    * Dependencies are created by
    1419    * These prevent two different commands from utilizing the same resources on the robot
     20
     21  {{{requires(Robot.exampleSubsystem);}}}
    1522
    1623'''Commands'''
     
    1825    * Called to stop a command from running
    1926    * Specifically when robot is disabled or a dependency overlaps
     27
    2028 - ''Connection With Buttons''
    2129    * Commands can be easily mapped to buttons through the OI class
     
    2432 - ''Input Devices''
    2533    * Input devices are mapped through joystick and button objects
     34
     35  {{{Joystick js0 = new Joystick(0);}}}
     36
     37  {{{Button btn00 = new JoystickButton(js0, 0);}}}
    2638 - ''Button Actions''
    2739    * Commands can be mapped to buttons or triggers in the OI class
     40     
     41  {{{btn00.whileHeld(new Command());}}}
    2842
    2943'''Robot Map'''
     
    3145    * This class centralizes port numbers and connection numbers for robot-wide use
    3246
     47  {{{public static int defaultMotor = 2;}}}
     48
    3349'''Command Groups'''
    3450 - ''About''
    3551    * Command Groups are used for command sequencing and parallelizazation
    3652    * Basically running things in a specific order or at the same time
    37     * think about automated actions
     53    * Think about automated actions
     54    * Commands will add in order of methods to add them
     55
    3856 - ''Sequential''
    3957    * TODO(testing)
     58
     59  {{{addSequential(new Command1());}}}
    4060 - ''Parallel''
    4161    * TODO(testing)
     62 
     63  {{{addParallel(new Command1());}}}