Go to Post just flat out, full force, take no prisoners driving - spears312 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 06-02-2008, 17:27
jc4p jc4p is offline
Registered User
AKA: Kasra Rahjerdi
FRC #2412 (Robototes)
Team Role: Alumni
 
Join Date: Feb 2008
Rookie Year: 2008
Location: Bellevue
Posts: 12
jc4p is an unknown quantity at this point
Problem with Kevin's 2008 code

Hello,
We used to have the 2007 code from IFI's site in our controller, and it worked fine. Now, I have upgraded to Kevin's 2008 code, along with upgrading our MPLAB (7.21), and MCC (3.1). When we put the compiled version of the 2008 code in the controller, all the code we have works except the controller code.
Meaning when we make code in our autonomous.c be "pwmwhatever = 255", it works, but the p1_y = pwmwhatever code does not.
The controller code works if we use the old compiled hex of the 2007 code, so it can't really be a hardware problem.

Has anyone encountered this before, or does anyone have any suggestions?
  #2   Spotlight this post!  
Unread 06-02-2008, 17:31
DanDon's Avatar
DanDon DanDon is offline
ohhh MY god
AKA: Dan Hoizner
FRC #0375 (The Robotic Plague)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Staten Island, NY
Posts: 1,432
DanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond repute
Send a message via ICQ to DanDon Send a message via AIM to DanDon Send a message via MSN to DanDon
Re: Problem with Kevin's 2008 code

Assignments in C work from right to left (i.e. take the value on the right side of the '=' and store it into the variable on the left of the '=').

In which case your code should look like
Code:
pwmXX = pX_y;
__________________
  #3   Spotlight this post!  
Unread 06-02-2008, 17:38
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Problem with Kevin's 2008 code

Quote:
Originally Posted by jc4p View Post
...but the p1_y = pwmwhatever code does not. ...anyone have any suggestions?
Yes, it should be "pwmwhatever = p1_y". I maybe wrong, but I don't think this has anything to do with my code .

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #4   Spotlight this post!  
Unread 06-02-2008, 17:40
jc4p jc4p is offline
Registered User
AKA: Kasra Rahjerdi
FRC #2412 (Robototes)
Team Role: Alumni
 
Join Date: Feb 2008
Rookie Year: 2008
Location: Bellevue
Posts: 12
jc4p is an unknown quantity at this point
Re: Problem with Kevin's 2008 code

edit:
Turned out I had something commented out in the teleop.c and now that I uncommented it works perfectly.

Thanks Kevin, you're magic

Last edited by jc4p : 06-02-2008 at 17:46.
  #5   Spotlight this post!  
Unread 06-02-2008, 17:48
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Problem with Kevin's 2008 code

Quote:
Originally Posted by jc4p View Post
I was reading the giant thread and realized I need to enable one of the encoders, now that I have enabled channel 4 in ifi_frc.h and enabled the Initalization in teleop.c...
You forgot to read the readme.txt file, which tells you to also enable the call to the ISR in ifi_frc.h .

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with 2008 gear tooth sensor Larry R Sensors 27 18-02-2008 11:39
Need help in Kevin's 2008 default code robotrobot2 Programming 5 20-01-2008 14:36
Problem with Kevin's code Tottanka Programming 5 04-11-2007 13:32
Problems with Kevin's 2007 default code bruss6 Programming 8 19-01-2007 15:42
What are with the Ls in Kevin's code??!!! HELP!!! RbtGal1351 Programming 2 18-02-2005 16:57


All times are GMT -5. The time now is 19:14.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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