![]() |
Craziest Bug I'v Ever Seen--C++
My robot is completely ignoring the code we try to put on it and just doing arcade mode. We have tried the robot default code, customizing the simple robot code, rewiring to pwm's and the CAN system. We have renumbered the pwm's in various ways and tried writing the code with and without the DriverStation object. we have tried declaring this object as
Code:
myRobot = new RobotDrive(1,2);Code:
myRobot = new RobotDrive(1,2,3,4); |
Re: Craziest Bug I'v Ever Seen--C++
Try declaring it as
Code:
RobotDrive *myRobot = new RobotDrive( 1, 2, 3, 4 );Code:
RobotDrive myRobot( 1, 2, 3, 4 );Code:
myRobot->TankDrive( /* arguments */ );Code:
myRobot.TankDrive( /* arguments */ ); |
Re: Craziest Bug I'v Ever Seen--C++
Can you give us more details, preferably code samples?
|
Re: Craziest Bug I'v Ever Seen--C++
It sounds to me like you're not actually downloading code to the robot. This could be because you have something configured wrong or simply because your code has errors and isn't successfully compiling.
First, make sure when you build your code that it's successfully compiled. There will be lots of red and error stuff in the windriver output window if it hasn't compiled. Next, make sure you have the cRIO, your laptop, and windriver configured correctly. Go to the Imaging your cRIO Guide and follow it step-by-step. That will make sure that your cRIO and laptop are setup correctly for C++. Then go to the Building and Downloading a project to the cRIO Guide. I'd recommend doing "Building a robot program" and "Verify that no User Code is running". Then skip ahead to "Loading a program to run on robot startup" and follow along till the end. Running in debug mode is a little more complicated and error prone than just deploying and rebooting. Hopefully after you reboot your robot, whatever code changes you've made will now show up on your robot. |
Re: Craziest Bug I'v Ever Seen--C++
Additionally if you think the program is getting loaded onto the cRio properly, you could also run NetConsole. Do a reboot from the drivers station while netconsole is up and watch the boot up. You might spot an error if the code is erroring. then try to enable it and try to drive - see if you get any errors on netconsole at that point.
good luck! |
Re: Craziest Bug I'v Ever Seen--C++
The .out file path that Deploy is set to use is probably not the one you are compiling.
It's probably an old or default path, so check what it is in FIRST Downloader Preferences. |
Re: Craziest Bug I'v Ever Seen--C++
Well my team seems to believe it is not necessarily a problem with our code but, with deploying the c++ code itself onto the robot but yes hear is our prototype drive code:
Code:
#include <WPILib.h> |
Re: Craziest Bug I'v Ever Seen--C++
From http://wpilib.screenstepslive.com/s/...software-notes
Quote:
|
| All times are GMT -5. The time now is 02:09. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi