Thread: ERROR
View Single Post
  #10   Spotlight this post!  
Unread 26-02-2005, 23:35
Alex1072 Alex1072 is offline
Registered User
AKA: Alex
#1072 (Harker Robotics Team)
Team Role: Leadership
 
Join Date: Jan 2003
Rookie Year: 2003
Location: San Jose
Posts: 110
Alex1072 is an unknown quantity at this point
Send a message via AIM to Alex1072 Send a message via Yahoo to Alex1072
Re: ERROR

Quote:
Originally Posted by amateurrobotguy
I think I made a tiny bit of progress in finding a math.c Only problem is, I get this error.

Make: The target "D:\Robot\MyFiles\main.o" is up to date.
Make: The target "D:\Robot\MyFiles\user_SerialDrv.o" is up to date.
Make: The target "D:\Robot\MyFiles\user_routines.o" is up to date.
Make: The target "D:\Robot\MyFiles\user_routines_fast.o" is up to date.
Make: The target "D:\Robot\MyFiles\printf_lib.o" is up to date.
Make: The target "D:\Robot\MyFiles\ifi_utilities.o" is up to date.
Make: The target "D:\Robot\MyFiles\ifi_startup.o" is up to date.
Make: The target "D:\Robot\MyFiles\math.o" is out of date.
Executing: "D:\Robot\mcc18\bin\mcc18.exe" -p=18F8520 "math.c" -fo="math.o" /i"D:\Robot\mcc18\h" -D_FRC_BOARD -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
D:\Robot\MyFiles\math.c:65:Error [1302] old style function declarations not supported
Halting build on first failure as requested.
BUILD FAILED: Sat Feb 26 16:30:19 2005


The error is on line 65 ("return(zp->d);"), so I would guess the mplab compiler doesn't support return(a). Try changing the return statement to "return zp->d;"


As is implied above though, using this function may not be a good idea. The pow function is not intended for small imbedded microprocessors and relies heavilly on floating point operations. It is designed for a full size computer. Running this function on the robot controller will slow it down a lot. You can try it and see if anything weird happens, but I would try and find another way to solve the problem, if possible. When you try it, watch out for weird behavior of the robot, that is a good indication that you are putting too many operations into the 26ms loop.
__________________
--------------------------------------
Alex
President
Team 1072 Harker Robotics