Skip to content

Commit bdd3520

Browse files
committed
Standardize header to match #93
1 parent bd91553 commit bdd3520

File tree

7 files changed

+64
-23
lines changed

7 files changed

+64
-23
lines changed

digital-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 DIO ports.
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 DIO ports.
15+
"""
16+
1117
# define ports for digitalcommunication with light controller
1218
kAlliancePort = 0
1319
kEnabledPort = 1

dutycycle-encoder/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

dutycycle-input/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

encoder/robot.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
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+
import math
11+
12+
13+
class MyRobot(wpilib.TimedRobot):
14+
"""
315
Sample program displaying the value of a quadrature encoder on the SmartDashboard. Quadrature
416
Encoders are digital sensors which can detect the amount the encoder has rotated since starting
517
as well as the direction in which the encoder shaft is rotating. However, encoders can not tell
@@ -10,14 +22,8 @@
1022
distance, as specified by DistancePerPulse. One of the most common uses of encoders is in the
1123
drivetrain, so that the distance that the robot drives can be precisely controlled during the
1224
autonomous mode.
13-
"""
25+
"""
1426

15-
import wpilib
16-
17-
import math
18-
19-
20-
class MyRobot(wpilib.TimedRobot):
2127
def robotInit(self):
2228
"""Robot initialization function"""
2329

flywheel-bangbang-controller/robot.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#!/usr/bin/env python3
2-
"""
3-
This is a sample program to demonstrate the use of a BangBangController with a flywheel to
4-
control RPM.
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.simulation
@@ -14,6 +15,11 @@
1415

1516

1617
class MyRobot(wpilib.TimedRobot):
18+
"""
19+
This is a sample program to demonstrate the use of a BangBangController with a flywheel to
20+
control RPM.
21+
"""
22+
1723
kMotorPort = 0
1824
kEncoderAChannel = 0
1925
kEncoderBChannel = 1

gyro-mecanum/robot.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
#!/usr/bin/env python3
2-
"""
3-
This is a sample program that uses mecanum drive with a gyro sensor to maintain rotation vectors
4-
in relation to the starting orientation of the robot (field-oriented controls).
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+
#
7+
68

79
import wpilib
810
import wpilib.drive
911

1012

1113
class MyRobot(wpilib.TimedRobot):
14+
"""
15+
This is a sample program that uses mecanum drive with a gyro sensor to maintain rotation vectors
16+
in relation to the starting orientation of the robot (field-oriented controls).
17+
"""
18+
1219
# gyro calibration constant, may need to be adjusted;
1320
# gyro value of 360 is set to correspond to one full revolution
1421
kVoltsPerDegreePerSecond = 0.0128

hid-rumble/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 demo program showing the use of GenericHID's rumble feature.
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 demo program showing the use of GenericHID's rumble feature.
14+
"""
15+
1016
def robotInit(self):
1117
"""Robot initialization function"""
1218

0 commit comments

Comments
 (0)