|
Page 1 of 1
|
[ 6 posts ] |
|
Writing own libraries for RobotC
| Author |
Message |
|
Li2 Innovations
Rookie
Joined: Sat May 12, 2012 7:07 am Posts: 18 Location: Bangalore
|
 Writing own libraries for RobotC
Hello, Are we allowed to write custom libraries for RobotC? If yes, then where are we supposed to dump it, I mean the .c and .h files. Any words of wisdom? - Aravind
_________________Visit us: http://www.li2.in
|
| Tue May 29, 2012 6:51 am |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2864 Location: Rotterdam, The Netherlands
|
 Re: Writing own libraries for RobotC
I've been writing drivers for ROBOTC for a while now and I publish them on my own site (see my signature). My word of wisdom would be to put everything in the header file and not use .c files at all. ROBOTC does not have a linker, so you'd end up with something like #include "somefile.c" and that just looks nasty. Also, use Doxygen to create auto-documenting code. Take a look at my library to see how I've been doing it.
- Xander
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Tue May 29, 2012 6:59 am |
|
 |
|
miki
Moderator
Joined: Thu Dec 22, 2011 7:42 am Posts: 43
|
 Re: Writing own libraries for RobotC
In my project (see my signature) I split code into many .c and .h that all follow strict rules to be compatible with RobotC environment. Have a look on it and ask questions if necessary  Regards Miki
_________________Visit my project RainBot v0.11 on source forge, a 6 wheels robot featuring A* & Dijkstra's path finding, motors & sensors emulation, small font, fifo & sorted list libraries, using Xander's drivers for HT Compass, and documented with doxygen.
|
| Tue May 29, 2012 12:51 pm |
|
 |
|
MHTS
Guru
Joined: Sun Nov 15, 2009 5:46 am Posts: 1023
|
 Re: Writing own libraries for RobotC
When you said "allowed", what context are you referring to? Are you talking about FTC? If you are just doing robot programming on your own, of course you are allowed to do anything to your code. If for FTC, I believe as long as it is publicly available to other teams, it is allowed. We did our own library and it is available here. http://proj.titanrobotics.net/hg/Ftc/2012/code/file/e28dbb95c68b/ftclibJust like what Xander said, our library is implemented as .h files. Although RobotC doesn't really support object-oriented programming, our library code is organized as objects using C-structures.
|
| Tue May 29, 2012 4:53 pm |
|
 |
|
Spiked3
Expert
Joined: Tue Feb 28, 2012 3:10 pm Posts: 195
|
 Re: Writing own libraries for RobotC
_________________Mike aka Spiked3 http://www.spiked3.com
|
| Tue May 29, 2012 6:04 pm |
|
 |
|
Li2 Innovations
Rookie
Joined: Sat May 12, 2012 7:07 am Posts: 18 Location: Bangalore
|
 Re: Writing own libraries for RobotC
Hello, Thank you Xander, Miki and MHTS. I will look through your sample library files. @ MHTS: By mentioning "allowed" I meant whether we need an official permission to include such custom libraries into the software. Well anyways I got your point. Thanks again - Aravind
_________________Visit us: http://www.li2.in
|
| Wed May 30, 2012 3:07 am |
|
|
|
Page 1 of 1
|
[ 6 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 5 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
|
|