View Single Post
  #2   Spotlight this post!  
Unread 02-02-2015, 17:14
one_each one_each is offline
Registered User
FRC #4057 (KB Bots)
Team Role: Mentor
 
Join Date: Jun 2012
Rookie Year: 2012
Location: Klamath Falls, Or
Posts: 25
one_each is an unknown quantity at this point
Re: Debugging problems

I'm assuming the "debugging" program is the one you listed, not "when the program is ran in with the debugger".

You didn't state if the robot is in auton or teleop. Auton is written in IterativeRobot style and (at a quick glance) should work. The teleop section seems to be in command based style but is not correct. Most of the code in teleopPeriodic() should be in the teleopInit() so it is only called once.

There are a number of programming resources at http://wpilib.screenstepslive.com/s/4485/m/13809 and in particular, I would recommend the "Debugging a robot program" and learn how to set breakpoints and single-step through your code. A debugger is great for learning how your code is working and a tool every programmer should know how to use.
Reply With Quote