File tree Expand file tree Collapse file tree 4 files changed +38
-9
lines changed
Expand file tree Collapse file tree 4 files changed +38
-9
lines changed Original file line number Diff line number Diff line change 1+ # This is the class all mechanisms derive from
2+
3+ class Mechanism :
4+ def __init__ (self ):
5+ self .hardware = []
6+ def start (self ):
7+ for hardware in self .hardware :
8+ hardware .start ()
9+ def update (self ):
10+ for hardware in self .hardware :
11+ hardware .update ()
12+ def stop (self ):
13+ for hardware in self .hardware :
14+ hardware .stop ()
Original file line number Diff line number Diff line change 1+ # This is the base class that all OpModes derive from
2+ class OpMode :
3+ def __init__ (self , robot ):
4+ self .robot = robot
5+ def start (self ):
6+ self .robot .start ()
7+ def loop (self ):
8+ self .robot .update ()
9+ def stop (self ):
10+ self .robot .stop ()
Original file line number Diff line number Diff line change 1+ # This is the class all robots derive from
2+
3+ class RobotBase :
4+ def __init__ (self ):
5+ self .hardware = []
6+ def start (self ):
7+ for hardware in self .hardware :
8+ hardware .start ()
9+ def update (self ):
10+ for hardware in self .hardware :
11+ hardware .update ()
12+ def stop (self ):
13+ for hardware in self .hardware :
14+ hardware .stop ()
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments