Go to Post Happy 6 days till FIRSTmas! (and Happy New Year, but that pales in comparison =D) - VKP [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 Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Spotlight this post!  
Unread 02-12-2010, 10:17 PM
nathanww nathanww is offline
Hacker
FRC #1678 (Citrus Circuits)
Team Role: Programmer
 
Join Date: Dec 2008
Rookie Year: 2007
Location: Davis, CA
Posts: 224
nathanww is just really nicenathanww is just really nicenathanww is just really nicenathanww is just really nice
Re: Motor declarations break analog module

Our compiler doesn't give us any warnings about uninitiialized variables, do you think it would be worth tracking everything down just to make sure?

Our robot has an analog module on slot 1, a digital module hooked to the sidecar on slot 4, and a relay module and pneumatics bumper on slot 8.

The code we're using(without the irrelevant things that don't make it break) is :
Code:
class testRobot : public IterativeRobot
{
	
	//set up roller
	Victor *rollerMotor;
	RobotDrive *testDrive;
	Victor *kickerWinch;
	Jaguar *armWinch;
	AnalogChannel *pot;
        Gyro *angle;
	
public:

	testRobot(void)	{
	
		kickerWinch=new Victor(3);	
		armWinch=new Jaguar(1); //TODO:Fix this so we're using both motorz
		rollerMotor=new Victor(4);
		testDrive=new RobotDrive(5,6,7,8);
		angle=new Gyro(1);
		pot=new AnalogChannel(3);
		

	}
...
void RobotInit(void) {
		testDrive->SetInvertedMotor(RobotDrive::kFrontLeftMotor,true);
		testDrive->SetInvertedMotor(RobotDrive::kFrontLeftMotor,true);
		pot->SetAverageBits(30);
		
	}
...
void DisabledPeriodic(void)  {
		GetWatchdog().Feed();
		printf(" pot=%f\n ",pot->GetAverageVoltage());
	
	}
__________________
Get yer robot source code here!
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
Open motor reference on Slot 6 DIO Module trilogy2826 NI LabVIEW 2 01-27-2009 08:42 AM
spring break thatphotochick Chit-Chat 6 03-29-2006 05:41 PM
Taking apart the motor control module Adam Y. FIRST Tech Challenge 1 04-15-2005 02:02 PM
Module 7 gear -- fischer price motor archiver 2001 6 06-23-2002 10:55 PM
DC Motor current to an Analog Input junkyarddawg Motors 43 04-04-2002 03:53 PM


All times are GMT -5. The time now is 01:03 PM.

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