Non arduino code

Post Reply
d21d3q
Posts: 2
Joined: Tue Sep 18, 2012 4:35 pm

Non arduino code

Post by d21d3q »

I applaying MultiWii code for non arduino board made by my self, so that I am using only alorithms for control of cuadropoter. Do you think that it would be good idea to make parallel project which conatins .c and .h files, or add preprocessor directives #ifdef ARDUINO/NONARDUINO to existing files?

User avatar
Hamburger
Posts: 2578
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: Non arduino code

Post by Hamburger »

depends on your goals and implications for original MWii code base.
If you want to create a separate branch with other features and not tied to the main MWii code base, then it may be easier to start with the baseflight code. I have no experience with that code, so it is pure hearsay.
Else if you want to stay in sync with the main MWii code base, then you will have to evaluate the #ifdef route. It may turn the code ugly to read? I guess you would have to try. Depending on the extent of #ifdef (among other aspects) it may or may not make it into the main branch.

For the curious mind, what hardware do you run?

d21d3q
Posts: 2
Joined: Tue Sep 18, 2012 4:35 pm

Re: Non arduino code

Post by d21d3q »

I've made my own hardware (based on m328), but in future I will apply it on other mcu's, so thatit might be usefull to make code in C which could be easily adaptable for every platform.

doughboy
Posts: 252
Joined: Tue Sep 04, 2012 7:20 am

Non arduino code

Post by doughboy »

What is m328? Or do you mean atmega328

Post Reply