|
Re: paper: A programming template for Autonomous Mode
Hey Team
Thanks for your answers.
I set down with a C programmer Nathan and we solved the problem:
1) Added to IFI_utilities.h
2) char Limit_Mix (int); // ADDED 2/07/08 active in user_routines.c
Added to user_routines_fast.c and removed from user_routines.c
3)
/******************************** page 2.6 ***************************************
* FUNCTION NAME: Limit_Mix
* PURPOSE: Limits the mixed value for one joystick drive.
* CALLED FROM: Default_Routine, this file
* ARGUMENTS:
* Argument Type IO Description
* -------- ---- -- -----------
* intermediate_value int I
* RETURNS: unsigned char
************************************************** *****************************/
unsigned char Limit_Mix (int intermediate_value)
{
static int limited_value;
if (intermediate_value < 2000)
{
limited_value = 2000;
}
else if (intermediate_value > 2254)
{
limited_value = 2254;
}
else
{
limited_value = intermediate_value;
}
return (unsigned char) (limited_value - 2000);
}
4) pwm2_tiltup = Limit_Mix(2000 + pot_08 - pot_07 + 127);
5) When we do that all of it will compile!
Without lines 1, 2 above I could not make it work, but now it does thanks
to GM programmer Nathan Mackarewicz!
Problem I think is now solved!
Thanks!!
|