Go to Post At championship, as we do at every regional, we'll be counting every point scored (or lost) by each robot. Nothing beats numbers. - Derek Bessette [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-04-2011, 22:43
Dacilndak's Avatar
Dacilndak Dacilndak is offline
Matt'); DROP TABLE Users; --
AKA: Matthew Haney
FRC #3729 (Red Knights)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Denver, Colorado
Posts: 12
Dacilndak is an unknown quantity at this point
Re: Switching Drive System While Driving

Well, you could do something like

Code:
if (joystick1.GetZ() < 1.0 && joystick1.GetZ() >= 0.33)
{
	// tank drive
}
else if (joystick1.GetZ() < 0.33 && joystick1.GetZ() >= -0.33)
{
	// arcade drive
}
else // if (joystick1.GetZ() < -0.33 && joystick1.GetZ() >= -1.0)
{
	// holonomic drive (?) ... whatever else
}
Ideally, then, in the middle of driving you could turn the Z wheel (towards the bottom of the joystick closest to you, like davidthefat said), thus switching drive modes.

I wouldn't recommend using buttons to switch drive modes, as the change in speed can be sudden and you could tear up your drivetrain if the driver isn't careful and/or you aren't ramping your joystick inputs.
__________________
Team 3729 - Raiders - Programming Team Co-Captain
2011 Colorado Regional Semifinalist
2011 Colorado Regional Rookie All-Star Award
2011 Colorado Regional Highest Rookie Seed Award

Last edited by Dacilndak : 02-04-2011 at 22:45. Reason: Clarification.
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


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

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