Go to Post Believe that Dave knows what he is talking about. - JaneYoung [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 17-02-2011, 18:18
Cody Trey's Avatar
Cody Trey Cody Trey is offline
Programing = hard + fun
FRC #2582 (Panther Bots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: US
Posts: 31
Cody Trey is an unknown quantity at this point
Send a message via Yahoo to Cody Trey
Exclamation Spike Code will not run

when i download the code to the robot, the DS will say no code, but if i comment out the spike code, everything runs fine... any ideas why, offer help and solutions?

this is my code with the victor part commented out:

#include "WPILib.h"

/**
* This is a demo program showing the use of the RobotBase class.
* The SimpleRobot class is the base of a robot application that will automatically call your
* Autonomous and OperatorControl methods at the right time as controlled by the switches on
* the driver station or the field controls.
*/
class RobotDemo : public SimpleRobot
{
RobotDrive *mecanumDrive; // robot drive system
DriverStation *ds; // driver station
Joystick *xbox;
Joystick *LeftStick;
Joystick *RightStick;
Victor *ArmLift;
Victor *ClawTwist;
// Relay *Claw;
Victor *ArmLift2;

public:
RobotDemo(void)
{
xbox = new Joystick(1);
ds = DriverStation::GetInstance();
mecanumDrive = new RobotDrive(1, 2, 3, 9); //frontLeft, RearLeft, FrontRight, RearRight
LeftStick = new Joystick(3);
RightStick = new Joystick(2);
// Claw = new Relay(1);
ArmLift = new Victor(6);
ArmLift2 = new Victor(7);
ClawTwist = new Victor(8);
}

void Autonomous(void)
{
GetWatchdog().SetEnabled(false);
mecanumDrive->MecanumDrive_Cartesian(0.0, 0.0, 0.0);
}

void OperatorControl(void)
{
GetWatchdog().SetEnabled(true);
while (IsOperatorControl())
{
GetWatchdog().Feed();
mecanumDrive->MecanumDrive_Cartesian(xbox->GetX(), xbox->GetY(), xbox->GetZ());
ArmLift->Set( RightStick->GetY());
ArmLift2->Set(RightStick->GetX());
ClawTwist->Set((LeftStick->GetY())*.25);
/** GetWatchdog().Feed();
if (RightStick->GetTrigger()) // If Right Joystick Trigger is HELD
Claw->Set(Relay::kForward);
if (LeftStick->GetTrigger()) // If Right Joystick Trigger is HELD
Claw->Set(Relay::kReverse);
else // If Right Joystick Trigger is RELEASED
Claw->Set(Relay::kOff);**/
}
}
};

START_ROBOT_CLASS(RobotDemo);
__________________
Love, Peace, and Robot Grease

Last edited by Cody Trey : 17-02-2011 at 18:20. Reason: typos....
Reply With Quote
  #2   Spotlight this post!  
Unread 17-02-2011, 21:30
rsegrest's Avatar
rsegrest rsegrest is offline
@ least I'm OVER the rock THIS time
FRC #2582 (PantherBots)
Team Role: Coach
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Lufkin, TX
Posts: 414
rsegrest has a brilliant futurersegrest has a brilliant futurersegrest has a brilliant futurersegrest has a brilliant futurersegrest has a brilliant futurersegrest has a brilliant futurersegrest has a brilliant futurersegrest has a brilliant futurersegrest has a brilliant futurersegrest has a brilliant futurersegrest has a brilliant future
Re: Spike Code will not run

CDer's We really need help on this one. As long as the spike code is commented out everything runs correctly (jags, victors etc.) however when spike code is included the bot doesn't recognize that there is any code loaded. We have reimaged, formatted, rebooted, recompiled etc. Any help is greatly appreciated!
__________________
Impossible is just a big word for small men who find it easier to live in the world they've been given than to explore the power they have to change it. Impossible is not a fact. It's an opinion. Impossible is not a declaration. It's a dare Impossible is potential. Impossible is temporary. Impossible is nothing.
~ Unknown
Reply With Quote
  #3   Spotlight this post!  
Unread 17-02-2011, 23:44
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Spike Code will not run

Can you look at the console output while the program is starting up? That should give you come clues as to the nature of the problem.

It doesn't look like you have a big enough program for this to be an issue, but perhaps the "mlongcall" fix would help (search on Chief Delphi for details).
Reply With Quote
  #4   Spotlight this post!  
Unread 18-02-2011, 09:48
Cody Trey's Avatar
Cody Trey Cody Trey is offline
Programing = hard + fun
FRC #2582 (Panther Bots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: US
Posts: 31
Cody Trey is an unknown quantity at this point
Send a message via Yahoo to Cody Trey
Re: Spike Code will not run

I will try to run the net console, but i have no experience with this, could you explain how to do that or where to go to get this information. It will probably be about 4:00 PM central time before i can do this
__________________
Love, Peace, and Robot Grease
Reply With Quote
  #5   Spotlight this post!  
Unread 18-02-2011, 12:40
Cody Trey's Avatar
Cody Trey Cody Trey is offline
Programing = hard + fun
FRC #2582 (Panther Bots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: US
Posts: 31
Cody Trey is an unknown quantity at this point
Send a message via Yahoo to Cody Trey
Re: Spike Code will not run

I am actually in the class room now, i will but until 1:00. enabled net console with the cRIO imaging tool. and i ran the net console program and got no response even when trying to load code.
__________________
Love, Peace, and Robot Grease
Reply With Quote
  #6   Spotlight this post!  
Unread 19-02-2011, 13:48
Cody Trey's Avatar
Cody Trey Cody Trey is offline
Programing = hard + fun
FRC #2582 (Panther Bots)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: US
Posts: 31
Cody Trey is an unknown quantity at this point
Send a message via Yahoo to Cody Trey
Re: Spike Code will not run

Well we could never figure out why, but I did a fresh install of windriver on a different computer, and reluctantly rewrote the code from scratch and now its running but our spike will not go in forward for some reason, I'm going to make a thread about this problem.
__________________
Love, Peace, and Robot Grease

Last edited by Cody Trey : 19-02-2011 at 14:00. Reason: typed reverse rather than forward
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:35.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi