|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
||||
|
||||
|
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.
|
|
#3
|
|||
|
|||
|
Re: Source code for the Easy C Pro library functions?
Quote:
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));
}
|
|
#4
|
|||
|
|||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |