Go to Post "Pimp my shopping cart"?!?! - dlavery [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 07-02-2011, 17:34
Tds123's Avatar
Tds123 Tds123 is offline
There is no I in team =]
AKA: Timothy Shub
FRC #1396 (Pyrobots)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Tottenville High School
Posts: 27
Tds123 is an unknown quantity at this point
Send a message via AIM to Tds123
Program Check Please..any bugs?

please help.. my drive system is working really slow and my mentor thinks its the programming please double check to make sure i didnt miss anything?
Attached Files
File Type: cpp MyRobot.cpp (5.2 KB, 30 views)
__________________
ThE sCaLeS oF bAlAnCe (Team 1396)
Reply With Quote
  #2   Spotlight this post!  
Unread 07-02-2011, 17:38
mwtidd's Avatar
mwtidd mwtidd is offline
Registered User
AKA: mike
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2003
Location: Boston, MA
Posts: 714
mwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond repute
Re: Program Check Please..any bugs?

remove the speedModifier all together and see what happens.

... as far as i can see that's the only thing that could affect it in your code
__________________
"Never let your schooling interfere with your education" -Mark Twain
Reply With Quote
  #3   Spotlight this post!  
Unread 07-02-2011, 18:08
Dave Scheck's Avatar
Dave Scheck Dave Scheck is offline
Registered User
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Feb 2003
Rookie Year: 2002
Location: Arlington Heights, IL
Posts: 574
Dave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond repute
Re: Program Check Please..any bugs?

What type of speed controllers are you using? If you're using Victors, you will run into problems like this (I don't remember the exact behavior) because the RobotDrive assumes that you're using Jaguars. If you want to use Victors, you need to create your speed controllers and pass them into the constructor.

One good check to see if it's software or hardware is to apply full throttle on your joystick and look at the LEDs on the speed controllers. We only use Victors, so you'll need a Jaguar expert to comment on the Jaguar behavior (or look at the Jaguar documentation). The Victor LED will turn green when full forward is sent to the motor and red when full back is sent to the motors. If the LED is off that means that a value other than full range is being sent. If you're certain that you're giving it full power (i.e. a print in the code shows a 1 being set), then your speed controllers may not be properly calibrated. Refer to the documentation on how to do that (I'm not sure if that applies to Jaguars). If the speed controller is showing the correct LED state for the input you're giving it, then the problem is with your hardware.

I see that you have a Wait(5.00) commented out at the end of your code. That would be a huge source of delay if it was uncommented. I'm assuming that you've tested with the code in the state that you posted it, so this probably isn't your problem (but could be a problem in the future).


Not that it really matters here, but here are some things you can do to improve your code.

- You should only have to call compressor.Start() once in your constructor.
- You're disabling the watchdog in autonomous. That's probably a bad idea. It's there to protect you, so you should be using it appropriately.
- You're creating new local variables every time through your while(IsOperatorControl()) loop. These declarations should be outside the loop for efficiency.
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:37.

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