Go Down

Topic: Library generator (Read 6132 times) previous topic - next topic

majenko


Works like a charm. What I want to do is:
- add a bunch of doxygen parms I am working with
- add a couple of SVN parameters
- add the ability to work both under Arduino and Eclipse without source modifcation
- and any other nice to have stuff :)
But that does need some changes in the files and I am not sure the author likes it that way :smiley-mr-green: But of course I am always willing to share. Ia

It's under the BSD license - you can copy / modify / redistribute at will as long as you keep it under the same license ;)

If you do come up with some nice generic mods that would be useful for others, then it would be great if you could share them back to the original repo.

nicoverduin

When I am finishied playing around, I put it back in GITHUB and let you decide if you want to commit.
Regards
Nico
Met vriendelijke groet / kindest regards
Nico Verduin
www.verelec.nl
Do not PM me for personal consultancy unless you are willing to pay for it.

majenko

The way it's normally done is you fork the repo (press the "fork" button in the top right) then you have a copy of it on GitHub.  Then you clone your repo to your local computer, and do all your work in there.  Then you can check it in and push to your own repo as much as you like.

When you're happy with it you create a pull request (green button) which then generates a patch which I can apply to my repo automatically.

Jantje


Hi Jantje
For Eclipse we include the .h file with the references to setup and loop and any functions we use. Which btw is neat programming as far as I am concerned :)
In the Arduino we can skip all this.
And a couple of my customers just want the sketch and that's it. So now I solve it this way:
Code: [Select]


#ifdef __IN_ECLIPSE__
#include "test.h"
#endif


Then it always works

I'm a bit confused here. IMHO Arduino does not do "pre processing" of the library files. So for libraries you are down to C/C++ including the need of function definitions before function usage.
For sketches the only file arduino includes behind your back is arduino.h. All the libraries need a include in the ino file. If not Arduino can not calculate the build and include path.
So IMHO
Code: [Select]

#ifdef __IN_ECLIPSE__
#include "test.h"
#endif

can always be replaced with
Code: [Select]

#include "test.h"

when test.h has the double include protection like

Code: [Select]

#ifndef _[HEADERNAME]_H_
#define _[HEADERNAME]_H_
//Your code goes here
#endif

If I'm wrong please tell me.

Note that I created the __IN_ECLIPSE__ define and I never used it. I'm not even sure V2 of the plugin still defines it.
So if there is a need I would like to know so I can make sure it stays in (or gets back into) the plugin.
Best regards
Jantje
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

nicoverduin

Hi Jantje
I have customers who simply just don't want the extra include file when they compile the code. They just want the single .ino.
So if I simply put the include in, Arduino will start complaining.  Doing it this way the preprocessor knows it works within either Eclipse or not.
So please leave it in :)
Met vriendelijke groet / kindest regards
Nico Verduin
www.verelec.nl
Do not PM me for personal consultancy unless you are willing to pay for it.

Jantje

You do have a point there.
You also have some demanding customers ;-)
I'll leave it in or put it back in.

Best regards
Jantje
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

nicoverduin

nope :), totally ignorant to Arduino etc. II write software for all kinds of hardware solutions while I have never even seen the hardware itself :) I just build to design specs, mail the sketch, they load it and program the hardware. Cést tout....
And they pay the bills :)
Met vriendelijke groet / kindest regards
Nico Verduin
www.verelec.nl
Do not PM me for personal consultancy unless you are willing to pay for it.

Jantje


nope :), totally ignorant to Arduino etc. II write software for all kinds of hardware solutions while I have never even seen the hardware itself :) I just build to design specs, mail the sketch, they load it and program the hardware. Cést tout....
And they pay the bills :)

Send them over to me if you have to much work  ;)
Back to the library generator.
Based on the discussion I see no reason for special eclipse code unless you also want to generate example frameworks.
Best regards
Jantje
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Go Up