View unanswered posts | View active topics It is currently Sun Sep 20, 2020 10:45 pm

Reply to topic  [ 3 posts ] 
Tasks and subroutines 
Author Message

Joined: Fri Mar 16, 2007 11:00 pm
Posts: 2
Post Tasks and subroutines
Hi, I'm trying to make a program that updates the position of a differential drive robot with landmarks in the floor. I used a task to calculate the position with odometry and updating with a subroutine, but I get a exception every time. I think is because I'm using a subroutine inside the task. Is it possible? I'm novice programming so I don't know what's the problem...Can anybody help me?

Thx :wink:

Thu Apr 12, 2007 9:05 am

Joined: Fri Mar 16, 2007 9:12 am
Posts: 26
Well, I know that subroutines belong in tasks, so that shouldn't be a problem. Maybe you could post some code and the exception, etc. so that a more detailed diagnosis could be made?

Thu Apr 12, 2007 9:38 am

Joined: Fri Feb 09, 2007 9:21 am
Posts: 616
Post your code so that I can look at it and examine which exception is occuring.

There is a limit -- somewhere between 3 and 10 depending on which version of firmware -- on the depth of the subroutine calls that are handled by the robotC firmware. You can get a stack overflow exception if you have too many nested function calls.

Fri May 04, 2007 2:41 am
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.