|
Page 1 of 1
|
[ 7 posts ] |
|
| Author |
Message |
|
RoboDesigners
Novice
Joined: Sat Jul 10, 2010 3:06 pm Posts: 86 Location: Roanoke, VA
|
 Inline error?
I ran into the below error messages while programming. Is it just me, or do they seem to be contradictory?
[see newer pic]
Is this something I'm doing wrong, or is it a bug?
I'm using the Cortex, and ROBOTC version 2.31.
Thanks! Andrew
_________________Check out my website! www.RoboDesigners.comVRC Team 2190 Twitter: @RoboDesigners
Last edited by RoboDesigners on Wed Mar 07, 2012 12:52 pm, edited 1 time in total.
|
| Fri Mar 18, 2011 2:38 pm |
|
 |
|
Aswin
Expert
Joined: Mon Oct 06, 2008 6:30 pm Posts: 176 Location: Netherlands
|
 Re: Inline error?
The inline keyword was available in older versions of robotC. It tells the compiler to make a new copy of the function everywhere it is called. This prevents a function to be called at the same moment from different tasks, this would cause all kind of strange errors. In the current beta versions of robotc this keyword has gone. I don't know why. But the compiler still detects that a function is called from different tasks, it warns you for this situation and advises you to use inline functions to prevent possible problems. As the keyword itself is no longer supported this is a problem with the compiler. I already told the developers of this problem. So it might be solved in the next version of robotC.
In the mean time you can use the hogcpu function to prevent functions to be called twice at the same time. But this function also has a problem. It seems to halt I2C communication, so don't use it when reading digital sensors. I did not report this bug, so if one of the developers is reading this post, take notice!
Another solution is to make copies of the function for each task, ie function1, function2 etc. This is like using the inline keyword.
_________________My most recent blog: A grain of sugar
|
| Fri Mar 18, 2011 8:24 pm |
|
 |
|
RoboDesigners
Novice
Joined: Sat Jul 10, 2010 3:06 pm Posts: 86 Location: Roanoke, VA
|
 Re: Inline error?
Thanks for your help Andrew 
_________________Check out my website! www.RoboDesigners.comVRC Team 2190 Twitter: @RoboDesigners
|
| Sat Mar 19, 2011 9:16 am |
|
 |
|
RoboDesigners
Novice
Joined: Sat Jul 10, 2010 3:06 pm Posts: 86 Location: Roanoke, VA
|
 Re: Inline error?
I know that quite a few versions of ROBOTC have come out since this thread was started... any information on when this "bug" will be fixed?
_________________Check out my website! www.RoboDesigners.comVRC Team 2190 Twitter: @RoboDesigners
|
| Mon Mar 05, 2012 8:48 pm |
|
 |
|
jbflot
Site Admin
Joined: Tue May 15, 2007 9:02 am Posts: 383
|
 Re: Inline error?
It looks like the picture of the error message is corrupted. The contradictory warning messages should be resolved as of ROBOTC 3.0.
|
| Wed Mar 07, 2012 11:05 am |
|
 |
|
RoboDesigners
Novice
Joined: Sat Jul 10, 2010 3:06 pm Posts: 86 Location: Roanoke, VA
|
 Re: Inline error?
I have version 3.05. Here's a new picture (just taken).
_________________Check out my website! www.RoboDesigners.comVRC Team 2190 Twitter: @RoboDesigners
|
| Wed Mar 07, 2012 11:39 am |
|
 |
|
jbflot
Site Admin
Joined: Tue May 15, 2007 9:02 am Posts: 383
|
 Re: Inline error?
Thanks for reposting the image. The warning text will be changed in our next release.
|
| Wed Mar 07, 2012 11:57 am |
|
|
|
Page 1 of 1
|
[ 7 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 3 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
|
|