|
Re: ERROR
Ok, I will post my function...but where you see ???? it means the number has been editied out for secrecy purposes. BTW with the spelling fixed I still get :
D:\Robot\MyFiles\user_routines.c:242:Warning [2058] call of function without prototype
D:\Robot\MyFiles\user_routines.c:243:Warning [2058] call of function without prototype
D:\Robot\MyFiles\user_routines.c:255:Warning [2058] call of function without prototype
D:\Robot\MyFiles\user_routines.c:256:Error [1105] symbol 'nodecimalparatwo' has not been defined
D:\Robot\MyFiles\user_routines.c:256:Warning [2058] call of function without prototype
D:\Robot\MyFiles\user_routines.c:256:Error [1101] lvalue required
D:\Robot\MyFiles\user_routines.c:257:Error [1105] symbol 'nodecimalparatwo' has not been defined
#include "ifi_aliases.h"
#include "ifi_default.h"
#include "ifi_utilities.h"
#include "user_routines.h"
#include "printf_lib.h"
#include "user_Serialdrv.h"
#include <math.h>
...
void Default_Routine(void)
{
long reduction, nodecimalpara, reductiontwo, nodecomal, paratwo;
double para, para2;
/*---------- Analog Inputs (Joysticks) to PWM Outputs-----------------------
*--------------------------------------------------------------------------
* This maps the joystick axes to specific PWM outputs.
*/
reduction=p1_y-?;
if (reduction>=0)
{
}
else
{
reduction=reduction*-1;
}
para=((pow(reduction, ?)/?)+?);
nodecimalpara=ceil(para);
pwm01 = nodecimalpara;
reductiontwo=p2_y-?;
if (reductiontwo<=0)
{
reductiontwo=reductiontwo*-1;
}
else
{
}
paratwo=((pow(reductiontwo, ?/?)+?);
nodecimalparatwo=ceil(paratwo);
pwm02 = nodecimalparatwo;
__________________
I quit FRC over 2 years ago (more if you're reading this past 2010).
Last edited by amateurrobotguy : 26-02-2005 at 15:03.
|