Go to Post The mission is to mobilize community, school and corporate resources to support the vision. The method is to provide an interesting, exciting program that gives young people opportunities to explore and expand their capabilities and interests. - Rick TYler [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 29-03-2004, 20:07
Roland's Avatar
Roland Roland is offline
Post-A-Holic
#1466
Team Role: Webmaster
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Tennessee
Posts: 169
Roland is infamous around these partsRoland is infamous around these partsRoland is infamous around these parts
Autonomous weirdness in user_routines_fast.c

Until today we've been running all of our autonomous code in user_routines.c and only running it unless we have a certain combination of switces on a joystick port set. Yesterday, we made a competition port cable with the autonomous selection switch. We moved all of our auton code to the autonomous loop in u_r_f.c and tried to run our code, but it didn't send out the PWM values. It seems to be doing something, as a pneumatic valve actuates whenever we put it in autonomous mode, but nothing else seems to be doing anything. Any ideas?

Thanks,
Roland
  #2   Spotlight this post!  
Unread 29-03-2004, 20:49
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Autonomous weirdness in user_routines_fast.c

Quote:
Originally Posted by Roland
...We moved all of our auton code to the autonomous loop in u_r_f.c and tried to run our code, but it didn't send out the PWM values...
The default User_Autonomous_Code function fails to call the routine to generate PWMs 13-16. If those are the ones you're using, add Generate_Pwms(pwm13,pwm14,pwm15,pwm16); right before Putdata(&txdata); and it should start working.
  #3   Spotlight this post!  
Unread 29-03-2004, 21:07
Roland's Avatar
Roland Roland is offline
Post-A-Holic
#1466
Team Role: Webmaster
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Tennessee
Posts: 169
Roland is infamous around these partsRoland is infamous around these partsRoland is infamous around these parts
Re: Autonomous weirdness in user_routines_fast.c

Nope, we weren't using those PWMs. We found a lot of problems like = instead of ==, though, so we seem to be getting closer to finding a solution. Our programming mentor is here now, so we're in good hands.
  #4   Spotlight this post!  
Unread 29-03-2004, 21:38
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: Autonomous weirdness in user_routines_fast.c

when you moved it to the other file, did you bring all the variable declarations with you?
  #5   Spotlight this post!  
Unread 30-03-2004, 00:26
10intheCrunch's Avatar
10intheCrunch 10intheCrunch is offline
Who's John V-Neun?
AKA: Alex Baxter
None #0254 (Cheesy Poofs)
Team Role: College Student
 
Join Date: Feb 2004
Rookie Year: 2004
Location: San Jose, CA
Posts: 129
10intheCrunch is a jewel in the rough10intheCrunch is a jewel in the rough10intheCrunch is a jewel in the rough10intheCrunch is a jewel in the rough
Send a message via AIM to 10intheCrunch
Re: Autonomous weirdness in user_routines_fast.c

You'd get compiletime errors if you were missing declarations...sounds like you aren't calling Putdata(), but that would show up as a Code Error I believe. Have any error lights, or error from compiletime?
__________________
~Alex Baxter
Programming, Arms operation, Team 254
  #6   Spotlight this post!  
Unread 30-03-2004, 00:48
Roland's Avatar
Roland Roland is offline
Post-A-Holic
#1466
Team Role: Webmaster
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Tennessee
Posts: 169
Roland is infamous around these partsRoland is infamous around these partsRoland is infamous around these parts
Re: Autonomous weirdness in user_routines_fast.c

OK, we fixed it. It seems we were trying to access some switches on the OI during autonomous mode, and that's what screwed us up. Thanks for all your help!
  #7   Spotlight this post!  
Unread 30-03-2004, 11:36
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: Autonomous weirdness in user_routines_fast.c

Quote:
Originally Posted by 10intheCrunch
You'd get compiletime errors if you were missing declarations...sounds like you aren't calling Putdata(), but that would show up as a Code Error I believe. Have any error lights, or error from compiletime?
not necessarily - if you have variables in the other file with the same names it will compile, but if you had meant to be using the same variables your program would not run correctly.
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
Future of Autonomous Mode FadyS. Programming 41 24-05-2004 19:45
A better autonomous method.. randomperson Programming 4 24-02-2004 18:02
Autonomous Program Names Venkatesh Programming 12 17-02-2004 10:25
autonomous mode problem on field Chris_C Programming 17 26-03-2003 19:11
Autonomous Kill Switch UCGL_Guy Programming 8 15-01-2003 17:39


All times are GMT -5. The time now is 04:31.

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