View unanswered posts | View active topics It is currently Thu Sep 18, 2014 7:41 am






Reply to topic  [ 25 posts ]  Go to page Previous  1, 2
Developer Packages 
Author Message
Expert
User avatar

Joined: Fri Nov 02, 2012 12:07 am
Posts: 164
Location: California, USA
Post Re: Developer Packages
Nice, and the Libraries folder is the one you're referring too, right? And when do you think it will be complete? :-) :D :o

_________________
string Robored = "Awesome"
~~Neil Balch~~


Tue Aug 06, 2013 10:24 pm
Profile WWW
Professor
User avatar

Joined: Sat May 18, 2013 1:24 pm
Posts: 272
Location: Olympia, WA
Post Re: Developer Packages
You can never finish anything :) It'll be reasonably complete before kickoff, Sept. 7th.

_________________
FTC Team 6424, the 'Oly Cow - Chief programmer.
FRC Team 4450, Olympia Robotics Federation (ORF).

and also quadrotors. Quadrotors!


Tue Aug 06, 2013 11:28 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: Developer Packages
Ernest3.14 wrote:

That was 2012's code. 2013 code is here:

http://proj.titanrobotics.net/hg/Ftc/20 ... 6218f40e81


Wed Aug 07, 2013 3:55 am
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: Developer Packages
Ernest3.14 wrote:
You can never finish anything :) It'll be reasonably complete before kickoff, Sept. 7th.

May I make a suggestion? Most of the functions in your library are renaming RobotC intrinsic functions. For those you may consider using macros instead. For example:
Code:
void Time_Wait(int milliseconds) {
   wait1Msec(milliseconds);
}
void Time_Sleep(int milliseconds) {
   Sleep(milliseconds);
}

// You may want to define macros instead:
#define Time_Wait(ms)    wait1Msec(ms)
#define Time_Sleep(ms)   Sleep(ms)

You may not realize, RobotC has a limit on the number of functions. The limit on the new version is fairly big but it can still run out. But wrapping a lot of intrinsic functions with different names will waste a lot of slots in the function table. Besides, calling a function that in turns calling an intrinsic function is very inefficient. You can achieve the same effect with the above macros.


Wed Aug 07, 2013 4:12 am
Profile
Professor
User avatar

Joined: Sat May 18, 2013 1:24 pm
Posts: 272
Location: Olympia, WA
Post Re: Developer Packages
MHTS wrote:
May I make a suggestion? Most of the functions in your library are renaming RobotC intrinsic functions. For those you may consider using macros instead.

-snip-

You may not realize, RobotC has a limit on the number of functions. The limit on the new version is fairly big but it can still run out. But wrapping a lot of intrinsic functions with different names will waste a lot of slots in the function table. Besides, calling a function that in turns calling an intrinsic function is very inefficient. You can achieve the same effect with the above macros.


Heh, I was using `inline`, until I noticed RobotC doesn't support that. Thanks for the heads up about function limits and macros. The C++ programmer in me is complaining about type checking though :shock:

_________________
FTC Team 6424, the 'Oly Cow - Chief programmer.
FRC Team 4450, Olympia Robotics Federation (ORF).

and also quadrotors. Quadrotors!


Wed Aug 07, 2013 1:50 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: Developer Packages
Ernest3.14 wrote:
Heh, I was using `inline`, until I noticed RobotC doesn't support that. Thanks for the heads up about function limits and macros. The C++ programmer in me is complaining about type checking though :shock:

Since the macros will be expanded to the corresponding RobotC Intrinsic functions, you still get type checking through the intrinsic function prototypes.


Wed Aug 07, 2013 2:37 pm
Profile
Professor
User avatar

Joined: Sat May 18, 2013 1:24 pm
Posts: 272
Location: Olympia, WA
Post Re: Developer Packages
Ok. Thanks! Do you know what the limit on the number of functions is? I don't want to rewrite stuff if I don't have to ;)

_________________
FTC Team 6424, the 'Oly Cow - Chief programmer.
FRC Team 4450, Olympia Robotics Federation (ORF).

and also quadrotors. Quadrotors!


Wed Aug 07, 2013 2:38 pm
Profile
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: Developer Packages
Ernest3.14 wrote:
Ok. Thanks! Do you know what the limit on the number of functions is? I don't want to rewrite stuff if I don't have to ;)

I don't remember. I exceeded their limit a few years back with our library. So they increased it and I forgot how much they increased it. I think it is at least a couple hundreds.


Wed Aug 07, 2013 2:45 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3223
Location: Rotterdam, The Netherlands
Post Re: Developer Packages
I just asked and it's around 256 or so.

= Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Wed Aug 07, 2013 4:13 pm
Profile WWW
Expert
User avatar

Joined: Fri Nov 02, 2012 12:07 am
Posts: 164
Location: California, USA
Post Re: Developer Packages
MHTS wrote:
Ernest3.14 wrote:

That was 2012's code. 2013 code is here:

http://proj.titanrobotics.net/hg/Ftc/20 ... 6218f40e81


THanks a lot! :) :)

_________________
string Robored = "Awesome"
~~Neil Balch~~


Wed Aug 07, 2013 7:18 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 25 posts ]  Go to page Previous  1, 2

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.