Society of Robots - Robot Forum

Software => Software => Topic started by: euchrid on May 30, 2011, 11:16:39 AM

Title: Extending Webbotlib
Post by: euchrid on May 30, 2011, 11:16:39 AM
I am currently using the following compass for a project:
http://www.sparkfun.com/products/9810 (http://www.sparkfun.com/products/9810)

This board contains both an accelerometer and a magnetic sensor, the math to compensate for tilt must be done in software.  I am writing the code for these two devices and would like it to integrate with the Webbotlib (e.g. use the accelerometerCalibrateX() function). 

  To use a supported sensor you only include the .h file for the sensor.  I can not find an include statement for the .c files.  Is this done during the ant build?  If not, how is this accomplished?

Title: Re: Extending Webbotlib
Post by: adanvasco on May 31, 2011, 09:14:01 AM
What IDE are you using? .c files are included as part of the project.
Title: Re: Extending Webbotlib
Post by: euchrid on May 31, 2011, 09:48:14 AM
I'm using AVR studio.  Experimenting a bit I may have answered my own question.  It appears as though all of the .c files in the library are compiled into .o files when the library is compiled (with ant).  Those .o files are then amalgamated into the different mc .a files that are included in an individuals project.
Title: Re: Extending Webbotlib
Post by: Webbot on May 31, 2011, 06:19:06 PM
If you need further help then give me a shout. Equally - if you want to contribute your code to WebbotLib then I'm sure others would appreciate it.
Title: Re: Extending Webbotlib
Post by: euchrid on May 31, 2011, 06:27:06 PM
I may take you up on that.  Anything I produce others are more than welcome to use, I'll send it your way.