Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore

This file was deleted.

Binary file added robot/robot/__pycache__/robot.cpython-37.pyc
Binary file not shown.
47 changes: 47 additions & 0 deletions robot/robot/robot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/usr/bin/env python3
'''
This is a demo program showing how to use Mecanum control with the
RobotDrive class.
'''

import wpilib
import commandbased


import subsystems.driveTrain



class MyRobot(commandbased.CommandBasedRobot):

def robotInit(self):
MyRobot.getRobot = lambda x=0:self

self.dtSub = subsystems.driveTrain.DriveTrainSub(self)
self.driveController = wpilib.XboxController(0)

# def teleopInit(self):
# print("Test Mode")
# dc = self.driveController
# while self.isOperatorControl():
# leftSide = dc.getRawAxis(0)
# rightSide = dc.getRawAxis(1)
#
# self.dtSub.setTankDrive(leftSide, rightSide)
#
# print("Test Done")


#code to help run the robot

#import sys
def exit(retval):
pass
# sys.exit(retval)

if __name__ == '__main__':
try:
print(wpilib._impl.main.exit)
except:
wpilib._impl.main.exit = exit
wpilib.run(MyRobot,physics_enabled=True)
File renamed without changes.
File renamed without changes.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,32 @@

from wpilib.command.subsystem import Subsystem
import wpilib.drive.differentialdrive as dd

from commands.joystickDrive import JoystickDrive

import team3200

import ctre

import robot as robotPackage
from commands.joystickDrive import JoystickDrive
class DriveTrainSub(Subsystem):
'''
This is the subsystem to controller the robots wheels.
This is the subsystem to control the robot's wheels.
'''

def __init__(self):
def __init__(self, robot):
'''Initilizes the subsystem, gets the motors,
creates the drivetrain mixer
'''
creates the drivetrain mixer'''

super().__init__("DriveTrainSub")
self.robot = team3200.getRobot();
self.robot = robot
#self.robot = robotPackage.MyRobot.getRobot()
self.driveMotors = {}
self.driveMotors['leftMotor'] = ctre.WPI_TalonSRX(0)
self.driveMotors['rightMotor'] = ctre.WPI_TalonSRX(1)


self.driveTrain = dd.DifferentialDrive(**self.driveMotors)

def setTankDrive(self, leftSide, rightSide):
self.driveTrain.tankDrive(leftSide, rightSide)

def setArcadeDrive(self, speed, rot):
self.driveTrain.arcadeDrive(speed, rot)

def initDefaultCommand(self):
self.setDefaultCommand(JoystickDrive(self.robot))
self.setDefaultCommand(JoystickDrive(self.robot))

File renamed without changes.
22 changes: 0 additions & 22 deletions robot/team3200/commands/joystickDrive.py

This file was deleted.

Empty file removed robot/team3200/motorHelper.py
Empty file.
56 changes: 0 additions & 56 deletions robot/team3200/physics.py

This file was deleted.

69 changes: 0 additions & 69 deletions robot/team3200/robot.py

This file was deleted.

70 changes: 0 additions & 70 deletions robot/team3200/sim/pygame_joysticks.py

This file was deleted.

Loading