I.R. in love with you!
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 Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 29-12-2008, 09:10
koreabell koreabell is offline
Team 956 Safety Captain
FRC #0956 (Eagles)
Team Role: Programmer
 
Join Date: Sep 2008
Rookie Year: 2007
Location: Oregon
Posts: 24
koreabell is an unknown quantity at this point
Re: Getting Familiar with Programming in WindRiver

Quote:
Originally Posted by JDM View Post
That's not exactly true. Right now, the only joysticks/steering wheels/etc. that the DS supports are standard HID joystick devices that don't require drivers. There's no (published, anyway) way to get any special drivers onto the DS. (see section 3.1.8 of the control system manual or look around the beta forums)

Also, keep in mind that the Driver's Station is Linux based so if there were a way to use drivers, then they'd have to be for that platform.
maybe i got confused with upgrading firmware. sorry about that
Reply With Quote
  #2   Spotlight this post!  
Unread 07-01-2009, 17:22
dnrobotics11 dnrobotics11 is offline
Registered User
FRC #2589
 
Join Date: Mar 2008
Location: Massachusetts
Posts: 55
dnrobotics11 is an unknown quantity at this point
How do you open a new C++ file with WindRiver?

How do you open a new C++ file with WindRiver? I've already downloaded the FIRST version and it is working but I do not know how to actually make a new program. Thanks for the help.
Reply With Quote
  #3   Spotlight this post!  
Unread 07-01-2009, 19:34
gvarndell's Avatar
gvarndell gvarndell is offline
Software Engineer
AKA: Addi's and Georgie's Dad
FRC #1629 (GaCo)
Team Role: Parent
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Grantsville, Maryland
Posts: 350
gvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond repute
Re: How do you open a new C++ file with WindRiver?

Quote:
Originally Posted by dnrobotics11 View Post
How do you open a new C++ file with WindRiver? I've already downloaded the FIRST version and it is working but I do not know how to actually make a new program. Thanks for the help.
Do you mean to ask how to create a new source file in an existing project?
Or did you mean to ask how to create a new project?
Reply With Quote
  #4   Spotlight this post!  
Unread 07-01-2009, 20:08
dnrobotics11 dnrobotics11 is offline
Registered User
FRC #2589
 
Join Date: Mar 2008
Location: Massachusetts
Posts: 55
dnrobotics11 is an unknown quantity at this point
Re: Getting Familiar with Programming in WindRiver

I have already set up WindRiver and the "MyRobot" template is set up but I don't know how to set up new source code files for my own robot code. I can't find it in the directions and I don't know what to do. Thanks

Last edited by dnrobotics11 : 07-01-2009 at 20:20.
Reply With Quote
  #5   Spotlight this post!  
Unread 07-01-2009, 20:19
kyungjin kyungjin is offline
Software Specialist
AKA: Daniel
VRC #0646
Team Role: Programmer
 
Join Date: Aug 2008
Rookie Year: 2009
Location: Honolulu, Hawaii
Posts: 65
kyungjin is an unknown quantity at this point
Send a message via AIM to kyungjin Send a message via MSN to kyungjin
Re: Getting Familiar with Programming in WindRiver

Err... To do this go to File -> New...

And then select the project that you want. From there on the bottom there's a textbox where you type your file name WITH the extension. For example... If you want a C++ source file named test... then type in test.cpp. If you want a header file... for example, testlib... then type in testlib.h.

It should automatically create a file in the project that you selected.
Reply With Quote
  #6   Spotlight this post!  
Unread 07-01-2009, 20:22
dnrobotics11 dnrobotics11 is offline
Registered User
FRC #2589
 
Join Date: Mar 2008
Location: Massachusetts
Posts: 55
dnrobotics11 is an unknown quantity at this point
Oh ok thanks
Reply With Quote
  #7   Spotlight this post!  
Unread 07-01-2009, 20:32
gvarndell's Avatar
gvarndell gvarndell is offline
Software Engineer
AKA: Addi's and Georgie's Dad
FRC #1629 (GaCo)
Team Role: Parent
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Grantsville, Maryland
Posts: 350
gvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond reputegvarndell has a reputation beyond repute
Re: Getting Familiar with Programming in WindRiver

Quote:
Originally Posted by dnrobotics11 View Post
I have already set up WindRiver and the "MyRobot" template is set up but I don't know how to set up new source code files for my own robot code. I can't find it in the directions and I don't know what to do. Thanks
Right-click on the project to which you want to add the new file.
Select New->File from Template.
The New File dialog will appear.
Type in the new file's name.
Click the Change... button.
A Preferences dialog will appear -- here you'll select 'cpp_template'.
Click OK in the Preferences dialog.
Click Finish in the New File dialog.
Reply With Quote
  #8   Spotlight this post!  
Unread 08-01-2009, 15:34
kyungjin kyungjin is offline
Software Specialist
AKA: Daniel
VRC #0646
Team Role: Programmer
 
Join Date: Aug 2008
Rookie Year: 2009
Location: Honolulu, Hawaii
Posts: 65
kyungjin is an unknown quantity at this point
Send a message via AIM to kyungjin Send a message via MSN to kyungjin
Re: Getting Familiar with Programming in WindRiver

I've been kinda confused on how to get some of the basic stuff done...

A lot of the functions that are in the WPILib seem inadequate because they don't have enough parameters to get a specific amount of data or control for a specific component, etc.

I'm sure the constructors have something to do with the member functions of its class but so far, I haven't been able to make any sense or relation between the two functions. The only logical idea that I have so far goes something like this...

If, for example, we have two Jaguar motors plugged into PWM 1 and 2 and we want the first motor to go half speed for two seconds and the the second motor to go full speed for three seconds...

Jaguar::Jaguar(1);
Jaguar::Set(0.5);
Wait(2000);

Jaguar::Jaguar(2);
Jaguar::Set(1.0);
Wait(3000);

I'm pretty sure the above is wrong... Can anyone correct this?
Reply With Quote
  #9   Spotlight this post!  
Unread 08-01-2009, 22:19
Jlulian Jlulian is offline
Registered User
AKA: Julian Moore
FRC #0004
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2008
Location: CA
Posts: 5
Jlulian is an unknown quantity at this point
Re: Getting Familiar with Programming in WindRiver

Quote:
Originally Posted by kyungjin View Post
I've been kinda confused on how to get some of the basic stuff done...

A lot of the functions that are in the WPILib seem inadequate because they don't have enough parameters to get a specific amount of data or control for a specific component, etc.

I'm sure the constructors have something to do with the member functions of its class but so far, I haven't been able to make any sense or relation between the two functions. The only logical idea that I have so far goes something like this...

If, for example, we have two Jaguar motors plugged into PWM 1 and 2 and we want the first motor to go half speed for two seconds and the the second motor to go full speed for three seconds...

Jaguar::Jaguar(1);
Jaguar::Set(0.5);
Wait(2000);

Jaguar::Jaguar(2);
Jaguar::Set(1.0);
Wait(3000);

I'm pretty sure the above is wrong... Can anyone correct this?
This should work:

Code:
Jaguar* jaguar1 = new Jaguar(1);
Jaguar* jaguar2 = new Jaguar(2);

jaguar1->Set(0.5); 
Wait(2000);
jaguar2->Set(1.0);
incidentally, the following does compile (and _does_ work)

Code:
SpeedController* Motor1 = new Jaguar(1);
SpeedController* Motor2 = new Victor(1); //Implicit casts
Though I wouldn't recommend using two entirely different speed controllers for your drive train
Reply With Quote
  #10   Spotlight this post!  
Unread 10-01-2009, 05:53
kyungjin kyungjin is offline
Software Specialist
AKA: Daniel
VRC #0646
Team Role: Programmer
 
Join Date: Aug 2008
Rookie Year: 2009
Location: Honolulu, Hawaii
Posts: 65
kyungjin is an unknown quantity at this point
Send a message via AIM to kyungjin Send a message via MSN to kyungjin
Re: Getting Familiar with Programming in WindRiver

Thanks for the reply! It was just what I was looking for.

Just one question though... What is the difference between the first set of code and the second set of code?
Reply With Quote
  #11   Spotlight this post!  
Unread 12-01-2009, 21:58
kyungjin kyungjin is offline
Software Specialist
AKA: Daniel
VRC #0646
Team Role: Programmer
 
Join Date: Aug 2008
Rookie Year: 2009
Location: Honolulu, Hawaii
Posts: 65
kyungjin is an unknown quantity at this point
Send a message via AIM to kyungjin Send a message via MSN to kyungjin
Re: Getting Familiar with Programming in WindRiver

Hey Jlulian, I tried what you posted and for the most part everything seems to work fine... except when we try to put it into reverse...

Code:
Jaguar* jaguar1 = new Jaguar(1);
Jaguar* jaguar2 = new Jaguar(2);

jaguar1->Set(0.5); 
Wait(2000);
jaguar2->Set(1.0);
I tried playing around with the code a bit and found that whenever I set the number to a negative value for example:
Code:
jaguar1->Set(-1.0);
... the code wouldn't run...

I haven't tried played around with it too much but I was wondering if you knew anything about this...
Reply With Quote
  #12   Spotlight this post!  
Unread 17-01-2009, 13:04
kyungjin kyungjin is offline
Software Specialist
AKA: Daniel
VRC #0646
Team Role: Programmer
 
Join Date: Aug 2008
Rookie Year: 2009
Location: Honolulu, Hawaii
Posts: 65
kyungjin is an unknown quantity at this point
Send a message via AIM to kyungjin Send a message via MSN to kyungjin
Re: Getting Familiar with Programming in WindRiver

I've tried playing with it some more.... It seems that the jaguar command doesn't like negative numbers... Is there a reason for this?
Reply With Quote
  #13   Spotlight this post!  
Unread 08-01-2009, 16:06
dnrobotics11 dnrobotics11 is offline
Registered User
FRC #2589
 
Join Date: Mar 2008
Location: Massachusetts
Posts: 55
dnrobotics11 is an unknown quantity at this point
I NEED HELP

--------------------------------------------------------------------------------

I have set up the WindRiver programming compiler but first of all, I don't know how to set up a FIRST code template with the three phases of competition as subroutines. Also, I am extremely lost in regards to the configuration of the cRIO system with WindRiver. I set up the IP addresses but there is never a connection between the cRIO and the computer. I do not know what I'm doing. Can anyone help? Thank you
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming - Getting Started Mark McLeod Programming 80 16-04-2008 23:37
Help Getting Started with VEX programming. Joe Johnson VEX 5 16-04-2007 09:01
pic: Mobot with familiar parts jgannon Extra Discussion 11 24-04-2006 18:55
programming motors with programming kit BorisTheBlade FIRST Tech Challenge 4 01-11-2005 19:03
Programming and Electronics — Getting Started Sidney San Martín Technical Discussion 7 12-01-2005 15:25


All times are GMT -5. The time now is 23:08.

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