Guido68 / megapirateng

Automatically exported from code.google.com/p/megapirateng
0 stars 0 forks source link

APM_HAL #69

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

i'm quite new to megapirateng and read #17 about arduplane. after some code 
research on ardupilot and megapirateng i noticed that a while back (~1 year, 9 
months in master)  ardupilot started to move the hardware specific stuff to the 
libraries.

i understand megapirateng that this is a port of the  ardupilot code for all in 
one boards so i guess with the change in ardupilot   it should be possible to 
use the original arducopter, plane and even rover code, as long we have a 
working APM_HAL code for the board we want to use.

For example here is a HAL for Flymarple 

https://github.com/mikemccauley/ardupilot/tree/master/libraries/AP_HAL_FLYMAPLE

So maybe thats the way to go ?

Original issue reported on code.google.com by pha.van...@gmail.com on 23 Sep 2013 at 11:03

GoogleCodeExporter commented 9 years ago
Thank you for the info, but MegaPirateNG already ported to new HAL platform. 
MPNG 3.0.1 is available at my site: www.megapirateng.com and also at GitHub: 
https://github.com/SirAlex/ardupilot-mpng

Original comment by Alexey.K...@gmail.com on 23 Sep 2013 at 11:12

GoogleCodeExporter commented 9 years ago
Cool, did not know that, thanks for the info and all your work.
I will test my Witespy Pro Ez3.0 with it.

Are the only changes in the AP_HAL_MPNG tree or did you change other parts 
as-well? the reason i ask is because you committed everything as a big blob and 
the history / infos on which version of ardupilot all is based on.

using git since around 3 years, i would suggest use a fork/clone of the offical 
repro and create a separate mpng-master with the HAL stuff.  With that you and 
any other contributor would have it much easier to get new code from ardupilot 
and maybe even get the HAL abstraction upstream.

Original comment by pha.van...@gmail.com on 23 Sep 2013 at 11:43

GoogleCodeExporter commented 9 years ago
No, other files modified too. But it much less than in 2.9-

I have no big experience with Git (I'm always work with Subversion), so it's 
new for me. Also, I'm working on my local (on my dedicated server) GIT server.  
Where I'm testing/commiting unfinished work. And than upload latest sources to 
GitHub.

Original comment by Alexey.K...@gmail.com on 23 Sep 2013 at 11:51

GoogleCodeExporter commented 9 years ago
Thats the beauty of git you can have as much remote repositories you like.

For some of my projects i do something similar. Pushing to my local server and 
if i'm confident that the code i committed works and is ready for the public i 
push it (or parts of it) to github, without loosing  my commit messages. and i 
even can combine commits or remove bad ones. (thats a bit more advanced)

and i know if you worked with cvs/subversion for years its a bit of a change to 
use git (especially how branches/merging works and the whole decentral system) 
but its really worth it.

if you still know which commit sha1/tag your work is based on it would be 
really helpfull for me to understand your changes.

Original comment by pha.van...@gmail.com on 23 Sep 2013 at 12:38

GoogleCodeExporter commented 9 years ago
Hi, i spend a while and tried to show you what i mean.

Tag 3.0.1-rc2 of ardupilot+your changes:
https://github.com/smurfy/ardupilot-mpng/tree/mpng_3.0.1-rc2

After that i merged the current ardupilot master to the mpng_3.0.1-rc2 branch 
as mpng_master.
There where some conflicts. I most of the time used the ardupilot stuff, except 
some parts and AP_MOTORS_MOT_MPNG in the tri copter setup
https://github.com/smurfy/ardupilot-mpng/commits/mpng_master

I also did not try to compile either of the branches. But i think using this or 
a similar approach allows you and other contributors to quickly get upstream 
changes from ardupilot with a full history of both developments.

Original comment by pha.van...@gmail.com on 23 Sep 2013 at 8:19

GoogleCodeExporter commented 9 years ago
Hi again,

i recreated the mpng_master branch and adapted the changes from you with 
changes which went from 3.0.1-rc -> 3.1-rc2 in ardupilot master branch.

My mpng_master branch now fully compiles and links. (had no time to test on my 
copter)

https://github.com/smurfy/ardupilot-mpng

I guess ardupilot 3.1 should work (maybe some small changes i missed / did not 
understand still needed)

Original comment by pha.van...@gmail.com on 24 Sep 2013 at 7:45

GoogleCodeExporter commented 9 years ago
Heh... I'm tried to rebase my sources on top of ArduCopter 3.0.1-rc2

Is it ok now?

Original comment by Alexey.K...@gmail.com on 25 Sep 2013 at 9:57

GoogleCodeExporter commented 9 years ago
yea thx, the history now seems to work, still a bit different than what i did 
but much better :)

as i mentioned in comment 6, i modified you code a bit that it should work with 
the current master branch of ardupilot (3.1rc2) aswell.

I still did not try if it flys but at least it compiles/links.

Original comment by pha.van...@gmail.com on 25 Sep 2013 at 10:09

GoogleCodeExporter commented 9 years ago
Actually it's not problem to update to 3.1, but I'm always working with release 
versions of arducopter, so latest now is 3.0.1

I'm working on R3 right now. Will push first commits asap.

Original comment by Alexey.K...@gmail.com on 25 Sep 2013 at 10:26

GoogleCodeExporter commented 9 years ago
ok, I'm just created 3.0.1-R3 branch and pushed latest sources, it will be 
current beta version

Original comment by Alexey.K...@gmail.com on 25 Sep 2013 at 10:49