View Full Version : Problem with Modified Code
Brigander
29-01-2007, 17:18
Whenever I try to upload modified code to our robot controller, it refuses the modified code. but when i try the default code it works fine. can anyone help me figure out a solution to this?
Alan Anderson
29-01-2007, 22:16
Can you be more specific? "Refuses the modified code" is a nice turn of phrase, but it doesn't say much about what is happening.
Shinigami2057
29-01-2007, 22:17
Define "refuses." If the code loads all the way, but does not run (code error), then make sure you are calling Getdata/Putdata and not getting stuck in an infinite loop. If the user processor cannot communicate with the master processor (by means of Getdata/Putdata) then the code will not run at all.
I find the same problem happens if you try to upload for the wrong processor.
Make sure if you are working with the full size controller, you're setup to work with the new (18F8722 iirc) processor.
Brigander
30-01-2007, 08:15
The code loads but does not run... so you are saying that it might be a Getdata error? I will try this.
Mike Betts
30-01-2007, 08:20
The code loads but does not run... so you are saying that it might be a Getdata error? I will try this.
It comes down to this... What did you change?
65_Xero_Huskie
30-01-2007, 08:24
If you post part of the code u changed, im sure the "Pro"grammers on here can help you with your problems. Turst me, ive seen it done before.
Brigander
30-01-2007, 08:25
I only changed the inputs for the PWM outputs... made it so that you use two joysticks to drive with
analog inputs to pwm outputs
pwm01 = p1_y;
pwm02 = p1_y;
pwm03 = p2_y;
pwm04 = p2_y;
pwm05 = p1_x;
pwm06 = p1_x;
pwm07 = p2_x;
pwm08 = p2 _x;
pwm09 = p1_wheel;
pwm10 = p2_wheel;
pwm11 = p3_wheel;
pwm12 = p4_wheel;
65_Xero_Huskie
30-01-2007, 08:28
I remembered when we switched our program to run a 360 controller, all of our PWMs were out of order so we had to imput the correct PWMs into the code, maybe you dont have the correct pwms set up for what you need to drive.
Bomberofdoom
30-01-2007, 08:45
I think there's a typo:
pwm08 = p2 _x;
it's
pwm08 = p2_x;
But I think he rewrote the whole code into the post and accidently typed space there.
Ah, ok. What did you plug in to what PWM output?
Brigander
30-01-2007, 08:54
only tested the first 4 pwm ports for the motors nothing was hooked into 5-12 at the time
more description... when i load non-default code all i get in the terminal window is "IFI>"
Mike Betts
30-01-2007, 21:18
I only changed the inputs for the PWM outputs... made it so that you use two joysticks to drive with
analog inputs to pwm outputs
pwm01 = p1_y;
pwm02 = p1_y;
pwm03 = p2_y;
pwm04 = p2_y;
pwm05 = p1_x;
pwm06 = p1_x;
pwm07 = p2_x;
pwm08 = p2 _x;
pwm09 = p1_wheel;
pwm10 = p2_wheel;
pwm11 = p3_wheel;
pwm12 = p4_wheel;
Andrew,
You changed something else. Try running windiff to compare default and modified source code files.
Mike
Brigander
31-01-2007, 08:20
what is windiff? where can I find it?
Mike Betts
31-01-2007, 09:02
what is windiff? where can I find it?
A google search yields many references including this (http://en.wikipedia.org/wiki/WinDiff).
Brigander
31-01-2007, 13:25
ok i think the issue is resolved. thanks for all the advice.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.