Go to Post Hi. My name is Rick and I am a Roboholic. - Rick TYler [more]
Home
Go Back   Chief Delphi > Technical > Programming
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
  #6   Spotlight this post!  
Unread 08-01-2009, 01:13
wt200999's Avatar
wt200999 wt200999 is offline
Texas Instruments
AKA: Will Toth
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Dallas, Texas
Posts: 325
wt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud of
Send a message via MSN to wt200999
Re: Basic functions in windriver

Have you looked at the example template things that they have in windriver? They show a couple of decent examples.

I haven't been able to actual put code on our controller yet, but I have been playing with the code a bit (I don't know if what I wrote works yet ) so I can't help too much yet

From what I have looked at it looks like there are a couple of ways to go about the basic drive functions. You need to create your joystick objects

Code:
Joystick LeftStick(1);
Joystick RightStick(2);
then either create a RobotDrive object or create motor controller objects (or both)

Code:
Jaguar LeftMotor(1);
Jaguar RightMotor(2);

then set the speed to the joystick

Code:
LeftMotor.Set( LeftStick.GetY() );
RightMotor.Set( RightStick.GetY() );
The only problem is that I am not sure if Joystick::GetY() returns a scaled number between -1.0 and 1.0 that I think the Jaguar.Set() takes, otherwise there is the RobotDrive function which is shown in the simple robot sample example template thing

Hope that helps
__________________
Programming in LabVIEW? Try VI Snippets!

FIRST LEGO League 2004 - 2005
FRC Team 870 Student 2006 - 2009
FRC Team 3005 Mentor 2013 -
 


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
Debug Windriver issue..... programmr C/C++ 12 06-02-2011 13:47
Windriver LAC McGurky C/C++ 12 25-02-2009 18:38
compiling in windriver koreabell Programming 4 05-01-2009 15:32
windriver projects nickmagus Programming 4 01-12-2008 23:29


All times are GMT -5. The time now is 13:55.

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