Go to Post What's the point of competing if you're not going to be competitive? - davepowers [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
  #16   Spotlight this post!  
Unread 02-11-2006, 23:06
Dave Scheck's Avatar
Dave Scheck Dave Scheck is offline
Registered User
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Feb 2003
Rookie Year: 2002
Location: Arlington Heights, IL
Posts: 574
Dave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond repute
Re: !HELP! IM STUCK IN A SUBROUTINE!!! !HELP!

I agree with Alan and James that a problem exists in the use of the assignment operator, but the initial problem stated that the code was stuck in Left. I don't see how this could be reached. How was it determined that it was getting stuck in Left?
  #17   Spotlight this post!  
Unread 03-11-2006, 02:25
cdennisxlx2's Avatar
cdennisxlx2 cdennisxlx2 is offline
Team San Diego Web Liaison
AKA: Cameron Dennis
FRC #1266 (The Devil Duckies)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: San Diego
Posts: 188
cdennisxlx2 is a splendid one to beholdcdennisxlx2 is a splendid one to beholdcdennisxlx2 is a splendid one to beholdcdennisxlx2 is a splendid one to beholdcdennisxlx2 is a splendid one to beholdcdennisxlx2 is a splendid one to beholdcdennisxlx2 is a splendid one to behold
Re: !HELP! IM STUCK IN A SUBROUTINE!!! !HELP!

i had a student telling me what directions the wheels were turning and i took his word for it instead of double checking, but thank you all for the help
__________________
Team San Diego Robotics Web Liaison
Webmaster and Technical Advisor for the San Diego Regional Planning Committee.
Official Score Keeper for the San Diego Regional
www.sandiegoregional.com
www.frc1266.com
  #18   Spotlight this post!  
Unread 03-11-2006, 09:25
Matt Krass's Avatar
Matt Krass Matt Krass is offline
"Old" and Cranky. Get off my lawn!
AKA: Dark Ages
FRC #0263 (Sachem Aftershock)
Team Role: Mentor
 
Join Date: Oct 2002
Rookie Year: 2002
Location: Long Island, NY
Posts: 1,187
Matt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond repute
Send a message via AIM to Matt Krass
Re: !HELP! IM STUCK IN A SUBROUTINE!!! !HELP!

I still think we need to see the rest of the code, or at least how the time variable is defined. If it isn't defined static, the variable will be re-initialized everytime its host entity is restarted. So if it's at the top of your function, and this function runs over and over every loop, it will be reinitialized every loop to 0, no matter how much you increment it. Or, time can be a global and it will retain its value, but if you're assigning 0 to it every loop that will also ruin your day. I think you have a pretty simple (and somewhat hard to notice) problem that I'm unfortunately very familiar with, as Mark McLeod can tell you, how many times did I hit Chris with the robot again?
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!

I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)
  #19   Spotlight this post!  
Unread 03-11-2006, 15:28
cdennisxlx2's Avatar
cdennisxlx2 cdennisxlx2 is offline
Team San Diego Web Liaison
AKA: Cameron Dennis
FRC #1266 (The Devil Duckies)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: San Diego
Posts: 188
cdennisxlx2 is a splendid one to beholdcdennisxlx2 is a splendid one to beholdcdennisxlx2 is a splendid one to beholdcdennisxlx2 is a splendid one to beholdcdennisxlx2 is a splendid one to beholdcdennisxlx2 is a splendid one to beholdcdennisxlx2 is a splendid one to behold
Re: !HELP! IM STUCK IN A SUBROUTINE!!! !HELP!

the .c file is attached above, but i know for a fact thats not the problem because ive defined "time" and incrimented it the same way for 3 years now and i have had no problem with that at all.
__________________
Team San Diego Robotics Web Liaison
Webmaster and Technical Advisor for the San Diego Regional Planning Committee.
Official Score Keeper for the San Diego Regional
www.sandiegoregional.com
www.frc1266.com
  #20   Spotlight this post!  
Unread 03-11-2006, 15:50
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: !HELP! IM STUCK IN A SUBROUTINE!!! !HELP!

Quote:
Originally Posted by Matt Krass
I still think we need to see the rest of the code, or at least how the time variable is defined. If it isn't defined static, the variable will be re-initialized everytime its host entity is restarted.
It's there, line 25 of user_routines_fast.c, as a global, so it should be fine. I'm not exactly sure what you mean by "If it isn't defined static, the variable will be re-initialized everytime its host entity is restarted."
  #21   Spotlight this post!  
Unread 03-11-2006, 15:57
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: !HELP! IM STUCK IN A SUBROUTINE!!! !HELP!

Quote:
Originally Posted by ghhs_1527
...ive defined "time" and incrimented it the same way for 3 years now and i have had no problem with that at all.
You probably have had problems, but you didn't recognize them as being caused by the way you're initializing your time variable. The way you're doing it, the initialization happens once when the robot powers up. You won't be able to rerun the autonomous mode correctly unless you reset the robot first. Better would be set time to zero explicitly when you enter the User_Autonomous_Code() function, just before the while (autonomous_mode) loop.
  #22   Spotlight this post!  
Unread 03-11-2006, 17:15
Matt Krass's Avatar
Matt Krass Matt Krass is offline
"Old" and Cranky. Get off my lawn!
AKA: Dark Ages
FRC #0263 (Sachem Aftershock)
Team Role: Mentor
 
Join Date: Oct 2002
Rookie Year: 2002
Location: Long Island, NY
Posts: 1,187
Matt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond repute
Send a message via AIM to Matt Krass
Re: !HELP! IM STUCK IN A SUBROUTINE!!! !HELP!

Quote:
Originally Posted by Dave Flowerday
It's there, line 25 of user_routines_fast.c, as a global, so it should be fine. I'm not exactly sure what you mean by "If it isn't defined static, the variable will be re-initialized everytime its host entity is restarted."
I missed the attached posting, my fault for trying to do too much at once, sorry about that.

As far as what I meant, I meant that a local variable inside of a function would be reset everytime the function ended and started again. Not sure why I worded it that way, let me just chalk it up to a goofy morning eh?
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!

I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)
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
RC Controller Stuck bhk88 Programming 1 31-01-2006 17:46
Stuck on Camera Mount busterblade16 Programming 2 14-02-2005 22:07
stuck in programming mode Shu Song Control System 2 29-04-2004 16:44
help! Am really stuck!!!! pagemauck Programming 8 29-01-2004 12:38
guy stuck in toilet! robot180 Chit-Chat 8 14-11-2003 22:27


All times are GMT -5. The time now is 17:56.

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