Go to Post Due to risk of unforseeable consequences, teams may not initiate a wormhole for the purpose of scoring ringers from past or future matches. - Richard Wallace [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

 
 
 
Thread Tools Rating: Thread Rating: 6 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 23-01-2010, 16:43
sircedric4's Avatar
sircedric4 sircedric4 is offline
Registered User
AKA: Darren
no team (The SS Prometheus)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Lousiana
Posts: 245
sircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond repute
Compressor Code causes No Robot Code Error

I've just tried to add the Compressor class code to my C++ Iterative Robot code and when I load it to the robot it causes a no robot code error. Has anyone else run into this problem and do you have a solution on how you fixed it.

The code I used was:
Code:
public:
/**
 * Constructor for this "IterativeRobotDemo" Class.
 * Create an instance of a RobotDrive with left and right motors plugged into PWM
 * ports 0 and 1 on the first digital module. 
 */
	IterativeDemo(void)	{
		cout << "IterativeDemo Constructor Started\n";
		
		// Create a robot using standard right/left robot drive on PWMS 1, 2, 3, and #4
		myRobot = new RobotDrive(1, 3, 2, 4);
		
		// Define joysticks being used at USB port #1 and USB port #2 on the Drivers Station
		rightStick = new Joystick(2);
		leftStick = new Joystick(1);

		// Acquire the Driver Station object
		ds = DriverStation::GetInstance();
		dsLCD = DriverStationLCD::GetInstance();
				
		// Counters to record the number of loops completed in autonomous and teleop modes
		auto_periodic_loops = 0;
		disabled_periodic_loops = 0;
		tele_periodic_loops = 0;
		
		//Compressor Instance
		Compressor *cpressor = new Compressor(1,1);	//Input DIO Port 1, Relay 1
		cpressor->Start();	//Start compressor
I have the compressor Spike wired to Relay 1 and the Pressure Switch wired to Digital Input 1. Would I get a no robot code error if something wasn't physically connected right? The example in the User Guide said to put it in the constructor of the robot and that's the only place I need it, which I have done.

The robot works fine without the compressor code, its just when I uncomments the line above.

Any ideas? Help.
Reply With Quote
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
User code won't download/run-possible causes? nathanww C/C++ 3 21-01-2009 11:00
Code error causing robot to go into programming mode. MJD Programming 14 30-10-2007 14:21
Error in code light on, trouble finding error Bryan Herbst Programming 16 12-10-2007 21:59
Code error on RC after downloading "bells and whistles" version of Kevins camera code DanDon Programming 6 10-01-2006 18:07
Compressor Code gacp Programming 2 19-02-2005 16:18


All times are GMT -5. The time now is 12:18.

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