fireXtract
05-03-2014, 17:16
I am using one Subsystem that has methods for driving based on encoders and driving based on double input. I have been doing some scrounging and borrowed some code from various places.
the subsystem looks like this
DriveTrain (http://pastebin.com/MuiKhujt)
the commands used are DriveWithJoystick and DriveToDistance
DriveToDistance (http://pastebin.com/aWP49wuC) (this one doesnt do anything i commented out the autodrive part)
DriveWithJoysticks (http://pastebin.com/FzqhbjSG)
Im stumped because when i deploy my code to the robot it gives a null pointer exception at the lines that reference the mechanum part
[cRIO] java.lang.NullPointerException
[cRIO] at us.mn.k12.fairmont.robotics.subsystems.DriveTrain. driveMechanum_Cartesian(DriveTrain.java:37)
[cRIO] at us.mn.k12.fairmont.robotics.commands.DriveWithJoys ticks.execute(DriveWithJoysticks.java:25)
Anything else needed to solve the problem i can put into a pastebin but i dont know how to get around using the drive in 2 places.
the subsystem looks like this
DriveTrain (http://pastebin.com/MuiKhujt)
the commands used are DriveWithJoystick and DriveToDistance
DriveToDistance (http://pastebin.com/aWP49wuC) (this one doesnt do anything i commented out the autodrive part)
DriveWithJoysticks (http://pastebin.com/FzqhbjSG)
Im stumped because when i deploy my code to the robot it gives a null pointer exception at the lines that reference the mechanum part
[cRIO] java.lang.NullPointerException
[cRIO] at us.mn.k12.fairmont.robotics.subsystems.DriveTrain. driveMechanum_Cartesian(DriveTrain.java:37)
[cRIO] at us.mn.k12.fairmont.robotics.commands.DriveWithJoys ticks.execute(DriveWithJoysticks.java:25)
Anything else needed to solve the problem i can put into a pastebin but i dont know how to get around using the drive in 2 places.