View Single Post
  #8   Spotlight this post!  
Unread 13-01-2016, 16:42
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,574
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Porting Talon SRX

Quote:
Originally Posted by VaneRaklan View Post
Code:
public class RobotMap {

	public static SpeedController frontLeft;
	public static CANTalon frontRight;
	public static CANTalon backLeft;
	public static CANTalon backRight;
	public static RobotDrive robotDrive;
	
	public static void init(){
		frontLeft = new CANTalon(3, 0);
//		frontRight = new CANTalon(4);
//		backLeft = new CANTalon(1);
//		backRight = new CANTalon(0);
		
		robotDrive = new RobotDrive(frontLeft, frontRight, backLeft, backRight);
		robotDrive.setSafetyEnabled(false);
		
		
	}
}
The frontRight, backLeft, and backRight pointers are null because those constructor lines are commented out. This would likely cause a null pointer exception in the robotDrive constructor. Also, if you wrap your code in code tags (highlight the block and click the # symbol), it's easier to read.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
Reply With Quote