Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Default Code error? (http://www.chiefdelphi.com/forums/showthread.php?t=63086)

Lakeeffect1674 02-02-2008 09:48

Default Code error?
 
I loaded the new 08 default code to the robot, but it won't respond to the controllers and it will not respond when I give it a value of 255.

I read kevins post about upgrading the software to use the new code, but that just helped me to beable to load it to the bot.
I also noticed he removed the printf code.

how did other teams get their bot going?
and can someone tell me if I can add printf and how?

I just tried to program autonomys and I found that I am able to control the pwm(s) with static statements such as:
pwm=255

paulcd2000 02-02-2008 12:44

Re: Default Code error?
 
in teleop.c, call:
Code:

Default_Routine();
that should set pwm01 to p1_y, pwm02 to p2_y, etc.
You can edit the function in ifi_code.c
Look in the forum for help for beginning programming, there are several threads in existence already

psy_wombats 02-02-2008 12:54

Re: Default Code error?
 
Printfs can be used in the code, just need to remember to end lines with \r\n to make sure you get a new line.

Lakeeffect1674 02-02-2008 12:55

Re: Default Code error?
 
Thanks for the reply,but does it matter where I put it?
I tried adding that code but I get an error

"Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8722 "autonomous.c" -fo="autonomous.o" -k -mL -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Thread would not exit normally.
Could not read language tool output from pipe. (5)
A language-plugin exception occurred and was logged.
BUILD FAILED: Sat Feb 02 12:55:39 2008"

paulcd2000 02-02-2008 13:05

Re: Default Code error?
 
there are threads which tell you how to solve that. Use the search function to find them

Lakeeffect1674 02-02-2008 13:15

Re: Default Code error?
 
Yeah thats what I have been doing for a few hours now.
I looked under beginning programming I can't find anything.
What else should I search for, cause I don't even know what to call my problem?

psy_wombats 02-02-2008 13:16

Re: Default Code error?
 
As far as I know there's been maybe one thread about this... And it wasn't really resolved. At least I haven't heard of this before.

Anyway, what version of mcc18 are you using? The build commands are a bit weird, (the disabling of the removement of unreachable code, and all the other minuses), but it doesn't look like that is causing an issue. Does this error still occur even without a printf? As this looks like a compiler issue.

And by default code, do you mean the FIRST default code or Kevin Watson's code?

Lakeeffect1674 02-02-2008 13:19

Re: Default Code error?
 
I am using mcp18V 3.10 I think ( I read a post by kevin saying we needed to use it)

the default I am refering to is from kevin.
where can I get the FIRST default code? isn't it the same as kevins?

I commented out all printf because it didn't work and I just wanted to get the bot moving.

june_2008 02-02-2008 13:23

Re: Default Code error?
 
Where did you get 2008 default code? I looked on ifirobotics.com and couldn't find anything newer than 2007. I also looked on kevin.org and didn't see anything there that looked like '08 default code.

Lakeeffect1674 02-02-2008 13:25

Re: Default Code error?
 
kevin.org/frc/

http://www.kevin.org/frc/ifi_frc_simple.zip


is there something else I should be using?

psy_wombats 02-02-2008 13:31

Re: Default Code error?
 
There really isn't a 2008 default code, so I suppose 'default' would be 2007's default code. The real difference is that it's only compatible with the 2.4 version, thus the topic title of the sticky. (Sorry, I'm not the most knowledgeable about the compiler...)

That looks right for Kevin's sensorless code, there are version available with the gyro and stuff, if you want it.

Lakeeffect1674 02-02-2008 13:32

Re: Default Code error?
 
would you recomend sticking with the 07 code?

psy_wombats 02-02-2008 14:06

Re: Default Code error?
 
I don't think you should abandon Kevin's code yet, it really is very handy. However, bulky code that works is better than elegant code that doesn't. I'd save this as a last attempt.

What version of MPLAB are you using? There might a problem there, try reinstalling with 8.0+ or something. (I don't know MPLAB well either, just a thought.) And looking at the build stuff again... Do you have the include search path at C:\mcc18-3.10\h or similar? That's set by right clicking the project, (.mcp), selecting Build Options and using the Directories tab.

Kevin Watson 02-02-2008 14:08

Re: Default Code error?
 
Quote:

Originally Posted by Lakeeffect1674 (Post 690708)
Thanks for the reply,but does it matter where I put it?
I tried adding that code but I get an error

"Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8722 "autonomous.c" -fo="autonomous.o" -k -mL -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa-
Thread would not exit normally.
Could not read language tool output from pipe. (5)
A language-plugin exception occurred and was logged.
BUILD FAILED: Sat Feb 02 12:55:39 2008"

This is a very strange error. Are you using Windows? What version of MPLAB are you using (not C18, which is different)?

-Kevin

Lakeeffect1674 02-02-2008 14:55

Re: Default Code error?
 
We added mcc 18 to the search path and it still did not work. Also we are using MPLAB 8 with Windows.


All times are GMT -5. The time now is 23:45.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi