Skip to content

Commit

Permalink
All the things
Browse files Browse the repository at this point in the history
  • Loading branch information
ProgramDragon64 committed Jun 14, 2022
1 parent dfd0851 commit c9c2de2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions Larry/conversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def sign(num) -> int:

def convertJoystickInputToDegrees(x: float, y: float):
return float(math.degrees(math.atan2(y, x)))

def deadband(value: float, deadband: float):
if math.fabs(value) >= deadband:
return 0
Expand Down
4 changes: 2 additions & 2 deletions Larry/simgui-window.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"###FMS": {
"Collapsed": "0",
"Pos": "6,675",
"Size": "281,190"
"Size": "336,164"
},
"###Joysticks": {
"Collapsed": "0",
Expand All @@ -23,7 +23,7 @@
},
"###NetworkTables": {
"Collapsed": "0",
"Pos": "479,267",
"Pos": "481,267",
"Size": "949,231"
},
"###Other Devices": {
Expand Down
3 changes: 0 additions & 3 deletions Larry/simgui.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
}
},
"NetworkTables": {
"LiveWindow": {
"open": true
},
"SmartDashboard": {
"open": true
}
Expand Down
2 changes: 2 additions & 0 deletions Larry/subsystems/swerve_drive.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import math
import conversions
import wpimath.controller
import wpilib
class SwerveWheel:
def __init__(self, directionMotor: ctre.TalonFX, speedMotor: ctre.TalonFX, P: float, I: float, D: float):
# we assume that all the motors are the same: Falcon 500s
Expand Down Expand Up @@ -91,6 +92,7 @@ def __init__(self) -> None:
# May try to make a file/method to use the position to do so

#call gyro
self.gyro = wpilib.ADXRS450_Gyro()

def stopMotors(self):
self.frontLeftDirection.set(ctre.TalonFXControlMode.PercentOutput, 0.0)
Expand Down

0 comments on commit c9c2de2

Please # to comment.