Skip to content

Commit 7ce3328

Browse files
committed
Standardize robot.py styling for copyright header
1 parent 411d9b0 commit 7ce3328

File tree

38 files changed

+271
-95
lines changed

38 files changed

+271
-95
lines changed

addressableled/robot.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
#!/usr/bin/env python3
2+
#
3+
# Copyright (c) FIRST and other WPILib contributors.
4+
# Open Source Software; you can modify and/or share it under the terms of
5+
# the WPILib BSD license file in the root directory of this project.
6+
#
7+
18
import wpilib
29

310
kLEDBuffer = 60

arcade-drive-xbox-controller/robot.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
#!/usr/bin/env python3
2-
"""
3-
This is a demo program showing the use of the DifferentialDrive class.
4-
Runs the motors with split arcade steering and an Xbox controller.
5-
"""
2+
#
3+
# Copyright (c) FIRST and other WPILib contributors.
4+
# Open Source Software; you can modify and/or share it under the terms of
5+
# the WPILib BSD license file in the root directory of this project.
6+
#
67

78
import wpilib
89
import wpilib.drive
910

1011

1112
class MyRobot(wpilib.TimedRobot):
13+
"""
14+
This is a demo program showing the use of the DifferentialDrive class.
15+
Runs the motors with split arcade steering and an Xbox controller.
16+
"""
17+
1218
def robotInit(self):
1319
"""Robot initialization function"""
1420

arcade-drive/robot.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
#!/usr/bin/env python3
2-
"""
3-
This is a demo program showing the use of the DifferentialDrive class.
4-
Runs the motors with arcade steering.
5-
"""
2+
#
3+
# Copyright (c) FIRST and other WPILib contributors.
4+
# Open Source Software; you can modify and/or share it under the terms of
5+
# the WPILib BSD license file in the root directory of this project.
6+
#
67

78
import wpilib
89
import wpilib.drive
910

1011

1112
class MyRobot(wpilib.TimedRobot):
13+
"""
14+
This is a demo program showing the use of the DifferentialDrive class.
15+
Runs the motors with arcade steering.
16+
"""
17+
1218
def robotInit(self):
1319
"""Robot initialization function"""
1420

arm-simulation/robot.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Copyright (c) FIRST and other WPILib contributors.
44
# Open Source Software; you can modify and/or share it under the terms of
55
# the WPILib BSD license file in the root directory of this project.
6+
#
67

78
import wpilib
89

armbot/robot.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
#!usr/bin/env python3
2-
1+
#!/usr/bin/env python3
2+
#
33
# Copyright (c) FIRST and other WPILib contributors.
44
# Open Source Software; you can modify and/or share it under the terms of
55
# the WPILib BSD license file in the root directory of this project.
6+
#
67

78
import wpilib
89
import commands2

armbotoffboard/robot.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
#!usr/bin/env python3
2-
1+
#!/usr/bin/env python3
2+
#
33
# Copyright (c) FIRST and other WPILib contributors.
44
# Open Source Software; you can modify and/or share it under the terms of
55
# the WPILib BSD license file in the root directory of this project.
6+
#
67

78
import wpilib
89
import commands2

canpdp/robot.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
#!/usr/bin/env python3
2-
"""
3-
This is a sample program showing how to retrieve information from the Power
4-
Distribution Panel via CAN. The information will be displayed under variables
5-
through the SmartDashboard.
6-
"""
2+
#
3+
# Copyright (c) FIRST and other WPILib contributors.
4+
# Open Source Software; you can modify and/or share it under the terms of
5+
# the WPILib BSD license file in the root directory of this project.
6+
#
77

88
import wpilib
99
import wpilib.drive
1010

1111

1212
class MyRobot(wpilib.TimedRobot):
13+
"""
14+
This is a sample program showing how to retrieve information from the Power
15+
Distribution Panel via CAN. The information will be displayed under variables
16+
through the SmartDashboard.
17+
"""
18+
1319
def robotInit(self):
1420
"""Robot initialization function"""
1521

cscore-intermediate-vision/robot.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
#!/usr/bin/env python3
2-
"""
3-
This is a good foundation to build your robot code on
4-
"""
2+
#
3+
# Copyright (c) FIRST and other WPILib contributors.
4+
# Open Source Software; you can modify and/or share it under the terms of
5+
# the WPILib BSD license file in the root directory of this project.
6+
#
57

68
import wpilib
79

810

911
class MyRobot(wpilib.TimedRobot):
12+
"""
13+
This is a good foundation to build your robot code on
14+
"""
15+
1016
def robotInit(self):
1117
wpilib.CameraServer.launch("vision.py:main")
1218

cscore-quick-vision/robot.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
#!/usr/bin/env python3
2-
"""
3-
This is a good foundation to build your robot code on
4-
"""
2+
#
3+
# Copyright (c) FIRST and other WPILib contributors.
4+
# Open Source Software; you can modify and/or share it under the terms of
5+
# the WPILib BSD license file in the root directory of this project.
6+
#
57

68
import wpilib
79

810

911
class MyRobot(wpilib.TimedRobot):
12+
"""
13+
This is a good foundation to build your robot code on
14+
"""
15+
1016
def robotInit(self):
1117
wpilib.CameraServer.launch()
1218

differential-drive-bot/robot.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#!/usr/bin/env python3
2+
#
3+
# Copyright (c) FIRST and other WPILib contributors.
4+
# Open Source Software; you can modify and/or share it under the terms of
5+
# the WPILib BSD license file in the root directory of this project.
6+
#
27

38
import wpilib
49
import wpilib.drive

elevator-profiled-pid/robot.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
#!/usr/bin/env python3
2+
#
3+
# Copyright (c) FIRST and other WPILib contributors.
4+
# Open Source Software; you can modify and/or share it under the terms of
5+
# the WPILib BSD license file in the root directory of this project.
6+
#
7+
18
import wpilib
29
import wpimath.controller
310
import wpimath.trajectory

elevator-simulation/robot.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Copyright (c) FIRST and other WPILib contributors.
44
# Open Source Software; you can modify and/or share it under the terms of
55
# the WPILib BSD license file in the root directory of this project.
6+
#
67

78
import math
89
import wpilib

game-data/robot.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
#!/usr/bin/env python3
2-
"""
3-
Example file showing how to get game-data from your driver station / FMS
4-
"""
2+
#
3+
# Copyright (c) FIRST and other WPILib contributors.
4+
# Open Source Software; you can modify and/or share it under the terms of
5+
# the WPILib BSD license file in the root directory of this project.
6+
#
7+
58
import wpilib
69
import ntcore
710

811
PNUE_MOD_TYPE = wpilib.PneumaticsModuleType.CTREPCM
912

1013

11-
class GameDataRobot(wpilib.TimedRobot):
14+
class MyRobot(wpilib.TimedRobot):
15+
"""
16+
Example file showing how to get game-data from your driver station / FMS
17+
"""
18+
1219
def robotInit(self):
1320
# A way of demonstrating the difference between the game data strings
1421
self.blue = wpilib.Solenoid(PNUE_MOD_TYPE, 0)
@@ -35,4 +42,4 @@ def teleopPeriodic(self):
3542

3643

3744
if __name__ == "__main__":
38-
wpilib.run(GameDataRobot)
45+
wpilib.run(MyRobot)

hatchbot-inlined/robot.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#!/usr/bin/env python3
2+
#
3+
# Copyright (c) FIRST and other WPILib contributors.
4+
# Open Source Software; you can modify and/or share it under the terms of
5+
# the WPILib BSD license file in the root directory of this project.
6+
#
27

38
import typing
49
import wpilib

hatchbot/robot.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#!/usr/bin/env python3
2+
#
3+
# Copyright (c) FIRST and other WPILib contributors.
4+
# Open Source Software; you can modify and/or share it under the terms of
5+
# the WPILib BSD license file in the root directory of this project.
6+
#
27

38
import typing
49
import wpilib

i2c-communication/robot.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
#!/usr/bin/env python3
2-
"""
3-
This is a sample program demonstrating how to communicate to a light controller from the robot
4-
code using the roboRIO's I2C port.
5-
"""
2+
#
3+
# Copyright (c) FIRST and other WPILib contributors.
4+
# Open Source Software; you can modify and/or share it under the terms of
5+
# the WPILib BSD license file in the root directory of this project.
6+
#
67

78
import wpilib
89

910

1011
class MyRobot(wpilib.TimedRobot):
12+
"""
13+
This is a sample program demonstrating how to communicate to a light controller from the robot
14+
code using the roboRIO's I2C port.
15+
"""
16+
1117
PORT = wpilib.I2C.Port.kOnboard
1218
DEVICE_ADDRESS = 4
1319

magicbot-simple/robot.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#!/usr/bin/env python3
2+
#
3+
# Copyright (c) FIRST and other WPILib contributors.
4+
# Open Source Software; you can modify and/or share it under the terms of
5+
# the WPILib BSD license file in the root directory of this project.
6+
#
27

38
import wpilib
49
from magicbot import MagicRobot

mecanum-drive/robot.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
#!/usr/bin/env python3
2-
"""
3-
This is a demo program showing how to use Mecanum control with the
4-
MecanumDrive class.
5-
"""
2+
#
3+
# Copyright (c) FIRST and other WPILib contributors.
4+
# Open Source Software; you can modify and/or share it under the terms of
5+
# the WPILib BSD license file in the root directory of this project.
6+
#
67

78
import wpilib
89
import wpilib.drive
910

1011

1112
class MyRobot(wpilib.TimedRobot):
13+
"""
14+
This is a demo program showing how to use Mecanum control with the
15+
MecanumDrive class.
16+
"""
17+
1218
# Channels on the roboRIO that the motor controllers are plugged in to
1319
kFrontLeftChannel = 2
1420
kRearLeftChannel = 3

mecanum-driveXbox/robot.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
#!/usr/bin/env python3
2-
"""
3-
This is a demo program showing how to use Mecanum control with the
4-
MecanumDrive class.
5-
"""
2+
#
3+
# Copyright (c) FIRST and other WPILib contributors.
4+
# Open Source Software; you can modify and/or share it under the terms of
5+
# the WPILib BSD license file in the root directory of this project.
6+
#
67

78
import wpilib
89
from wpilib.drive import MecanumDrive
910

1011

1112
class MyRobot(wpilib.TimedRobot):
13+
"""
14+
This is a demo program showing how to use Mecanum control with the
15+
MecanumDrive class.
16+
"""
17+
1218
# Channels on the roboRIO that the motor controllers are plugged in to
1319
frontLeftChannel = 2
1420
rearLeftChannel = 3

mechanism2d/robot.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
#!/usr/bin/env python3
2-
"""
3-
This sample program shows how to use Mechanism2d - a visual representation of arms, elevators,
4-
and other mechanisms on dashboards; driven by a node-based API.
5-
6-
Ligaments are based on other ligaments or roots, and roots are contained in the base
7-
Mechanism2d object.
8-
"""
2+
#
3+
# Copyright (c) FIRST and other WPILib contributors.
4+
# Open Source Software; you can modify and/or share it under the terms of
5+
# the WPILib BSD license file in the root directory of this project.
6+
#
97

108
import wpilib
119

1210

1311
class MyRobot(wpilib.TimedRobot):
12+
"""
13+
This sample program shows how to use Mechanism2d - a visual representation of arms, elevators,
14+
and other mechanisms on dashboards; driven by a node-based API.
15+
16+
Ligaments are based on other ligaments or roots, and roots are contained in the base
17+
Mechanism2d object.
18+
"""
19+
1420
kMetersPerPulse = 0.01
1521
kElevatorMinimumLength = 0.5
1622

motor-control/robot.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
#!/usr/bin/env python3
2-
"""
2+
#
3+
# Copyright (c) FIRST and other WPILib contributors.
4+
# Open Source Software; you can modify and/or share it under the terms of
5+
# the WPILib BSD license file in the root directory of this project.
6+
#
7+
8+
import wpilib
9+
10+
11+
class MyRobot(wpilib.TimedRobot):
12+
"""
313
This sample program shows how to control a motor using a joystick. In the
414
operator control part of the program, the joystick is read and the value
515
is written to the motor.
@@ -9,12 +19,8 @@
919
a short time in the loop to allow other threads to run. This is generally
1020
a good idea, especially since the joystick values are only transmitted
1121
from the Driver Station once every 20ms.
12-
"""
22+
"""
1323

14-
import wpilib
15-
16-
17-
class MyRobot(wpilib.TimedRobot):
1824
#: update every 0.005 seconds/5 milliseconds (200Hz)
1925
kUpdatePeriod = 0.005
2026

physics-4wheel/src/robot.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#!/usr/bin/env python3
2+
#
3+
# Copyright (c) FIRST and other WPILib contributors.
4+
# Open Source Software; you can modify and/or share it under the terms of
5+
# the WPILib BSD license file in the root directory of this project.
6+
#
27

38
import wpilib
49
import wpilib.drive

0 commit comments

Comments
 (0)