View unanswered posts | View active topics It is currently Sat Aug 02, 2014 1:12 am






Reply to topic  [ 7 posts ] 
Inline error? 
Author Message
Novice
User avatar

Joined: Sat Jul 10, 2010 3:06 pm
Posts: 86
Location: Roanoke, VA
Post 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.com

VRC 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
Profile WWW
Expert
User avatar

Joined: Mon Oct 06, 2008 6:30 pm
Posts: 176
Location: Netherlands
Post 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
Profile WWW
Novice
User avatar

Joined: Sat Jul 10, 2010 3:06 pm
Posts: 86
Location: Roanoke, VA
Post Re: Inline error?
Thanks for your help

Andrew

:programmer:

_________________
Check out my website! www.RoboDesigners.com

VRC Team 2190

Twitter: @RoboDesigners


Sat Mar 19, 2011 9:16 am
Profile WWW
Novice
User avatar

Joined: Sat Jul 10, 2010 3:06 pm
Posts: 86
Location: Roanoke, VA
Post 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.com

VRC Team 2190

Twitter: @RoboDesigners


Mon Mar 05, 2012 8:48 pm
Profile WWW
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 403
Post 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.

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Wed Mar 07, 2012 11:05 am
Profile
Novice
User avatar

Joined: Sat Jul 10, 2010 3:06 pm
Posts: 86
Location: Roanoke, VA
Post Re: Inline error?
jbflot wrote:
It looks like the picture of the error message is corrupted. The contradictory warning messages should be resolved as of ROBOTC 3.0.

I have version 3.05.

Here's a new picture (just taken).


Attachments:
File comment: Inline error
InlineError.jpg
InlineError.jpg [ 61.07 KiB | Viewed 1801 times ]

_________________
Check out my website! www.RoboDesigners.com

VRC Team 2190

Twitter: @RoboDesigners
Wed Mar 07, 2012 11:39 am
Profile WWW
Site Admin
Site Admin

Joined: Tue May 15, 2007 9:02 am
Posts: 403
Post Re: Inline error?
Thanks for reposting the image. The warning text will be changed in our next release.

_________________
Jesse Flot
CMU Robotics Academy
ROBOTC Support


Wed Mar 07, 2012 11:57 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 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.