Go to Post My own opinion is that any truly great student can succeed with any teacher, and any truly great teacher can succeed with any group of students. - DampRobot [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-02-2007, 17:47
bobpskier bobpskier is offline
Registered User
FRC #0159 (Alpine Robotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Fort Collins, Colorado
Posts: 7
bobpskier is an unknown quantity at this point
Source code for the Easy C Pro library functions?

Is possible to look at the source behind the library functions supplied with Easy C Pro for FIRST? For instance can we download the source to the Arcade drive function to see how it is actually coded?

Thanks,

Bob Potterveld
  #2   Spotlight this post!  
Unread 02-02-2007, 23:37
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: Source code for the Easy C Pro library functions?

I'm sorry but the complete source isn't available. But, most of the functions are pretty strait forward. Brad can also post bits of code if he wants.
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni
  #3   Spotlight this post!  
Unread 05-02-2007, 10:16
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 591
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Source code for the Easy C Pro library functions?

Quote:
Originally Posted by Kingofl337 View Post
I'm sorry but the complete source isn't available. But, most of the functions are pretty strait forward. Brad can also post bits of code if he wants.
The 2 motor arcade code looks like this:
Code:
void Arcade2(unsigned char movePort, unsigned char moveChannel,
	unsigned char rotatePort, unsigned char rotateChannel,
	unsigned char leftMotor, unsigned char rightMotor,
	unsigned char leftInvert, unsigned char rightInvert)
{
	int moveValue, rotateValue;
	int leftMotorValue, rightMotorValue;
	moveValue = ((int)GetOIAInput(movePort, moveChannel)) - 127;
	rotateValue = ((int)GetOIAInput(rotatePort, rotateChannel)) - 127;
	rightMotorValue = moveValue + rotateValue;
	leftMotorValue = rotateValue - moveValue;
	if (leftInvert) leftMotorValue = - leftMotorValue;
	if (rightInvert) rightMotorValue = - rightMotorValue;
	SetPWM(leftMotor, pwmLimit(leftMotorValue + 127));
	SetPWM(rightMotor, pwmLimit(rightMotorValue + 127));
}
If you were interested because of wanting to make some changes, you can simply include your own version of this function in your easyC or WPILib program and it will be used instead of the library routine. That's the nice thing about libraries - your project code takes precedence.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
  #4   Spotlight this post!  
Unread 05-02-2007, 21:39
bobpskier bobpskier is offline
Registered User
FRC #0159 (Alpine Robotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Fort Collins, Colorado
Posts: 7
bobpskier is an unknown quantity at this point
Re: Source code for the Easy C Pro library functions?

Thanks for the post Brad. We are worried about overdriving our motor and might need to be able to adjust how this function works for some of the extremes during operator control.

Bob Potterveld
Closed Thread


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
Problem with easy c pro and mechanum wheels pbrules15 Programming 9 03-02-2007 20:38
From MPLAB To EASY C PRO 354.FIRST Programming 4 30-01-2007 17:13
FIRST Code Library 114Klutz Programming 17 10-07-2006 15:24
how to convert Easy C code into real code? TheHolyLancer Programming 1 29-01-2006 09:09
Do you write functions for your code? Max Lobovsky Programming 26 11-03-2004 07:04


All times are GMT -5. The time now is 03: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