Welcome to Multi-Rotor UK. Please login or sign up.

Saturday,April 20, 2024, 09:01:49

Login with username, password and session length

Shoutbox

hoverfly:
17 Apr 2024 17:15:13
 :rolleyes:
Bad Raven:
26 Mar 2024 08:41:05
 :(
Andy7:
25 Mar 2024 14:49:21
An excess of work and rain.  :thumbdown:
Bad Raven:
23 Mar 2024 18:12:38
Almost a personal Blog, it would seem. LOTS of members, but NO posts.  :-/   :shrug:
Gaza07:
06 Mar 2024 16:59:49
Anyone still here  :shrug:
ched:
24 Dec 2023 11:48:48
Hope you all have a Great Christmas and a happy New Year.
Bad Raven:
20 Dec 2023 06:17:47
 ~~   :beer2: 
Gaza07:
19 Dec 2023 22:20:27
Merry Christmas All  :beer2:
Bad Raven:
01 Dec 2023 06:59:57
New Simulator Section started!   :beer2:
Bad Raven:
17 Jun 2023 06:52:23
Yes, smaller, same as lots of things as time passes.
Members
Stats
  • Total Posts: 201,425
  • Total Topics: 20,260
  • Online today: 22
  • Online ever: 530
  • (Tuesday,June 26, 2012, 08:34:46 )
Users Online
Users: 0
Guests: 20
Total: 20

Theme Changer





3d - Printworx

Anyone tried editing the code for the Arducopter APM 2.5?

Started by maddog7, Friday,January 25, 2013, 13:52:18

Previous topic - Next topic

maddog7

Anyone tried editing the code for the Arducopter APM 2.5?
I';m having shed loads of issues trying to change 4 simple values,
I can get it to compile but it won';t display the live outputs (ie artificial horizon etc) in the APM.
If I dl std code using the apm, it works fine?

Any ideas?
D

Jumpy07

Yep.. lots of times.. no issues..

What are you trying to change..  ?

For APM2 uncomment APM_config.h line 5
//#define CONFIG_APM_HARDWARE APM_HARDWARE_APM2
like so:
#define CONFIG_APM_HARDWARE APM_HARDWARE_APM2


In arduino select Tools>Board>Arduino Mega 2560 or Mega ADK

BNUC-S Pilot with PfCo /PFAW.
UAQ / CAA PfCo Instructor / Flight Assessor

"All that is necessary for the triumph of evil is that good men do nothing"

maddog7

Quote from: Jumpy07 on Friday,January 25, 2013, 19:37:11
Yep.. lots of times.. no issues..

What are you trying to change..  ?

For APM2 uncomment APM_config.h line 5
//#define CONFIG_APM_HARDWARE APM_HARDWARE_APM2
like so:
#define CONFIG_APM_HARDWARE APM_HARDWARE_APM2


In arduino select Tools>Board>Arduino Mega 2560 or Mega ADK

Cheers for the reply Jumpy.
I';m trying to change the values in AP_motorsquad.cpp to better reflect the offset config of the TBS Disco.

I';m relatively computer literate but I';m no programmer!
It';s been a bit of a trial to get to the stage I';m at!

I didn';t realise about the uncommenting thing, I made a silly assumption that it was no longer necessary! doh!

I was having issues with errors during compilation.
I';ll have a go uncommenting and report back in a bit.

Thanks so much for the pointers.
:-)
D

maddog7

Jumpy,
Tried what you said but I still seem to have about 30 warnings?
Is this normal?

Being a noob I have visions of my £££ TBS having a brain fart when I flip into RTL and buggering off to scotland!
:-)
Cheers
D

Jumpy07

Nothing wrong with Scotland lol
You have probably saved a file by error..
Start from fresh files.. d
PS: I have a reptile style frame that is find on default X Quad layout.. so do think you need to edit config files btw
BNUC-S Pilot with PfCo /PFAW.
UAQ / CAA PfCo Instructor / Flight Assessor

"All that is necessary for the triumph of evil is that good men do nothing"

maddog7

TBH fella,
It does seem to fly ok on std X, I';ve hovered it for 10 minutes in my (smallish) bedroom without any "moments"

I';d read somewhrere that putting in the motor offsets improves the balance of pitch to roll which made some sense to me.
D
:-)

bunnygirl80

Hi,

If you';re not a programmer and you';re new to it, I would recommend that you don';t change the CPP files and stick to changing the configuration in the CONFIG.H file. As previously mentioned, you should start with a clean install and just uncomment the relevant lines. You will notice the CONFIG.H has lots of lines with // at the beginning. These lines with // are ignored by the compiler and you remove the // for the lines which are relevant to you.

Stef
Always smile because you never know who could be falling in love with it. :) Drone Operator in North Wales. [url="//www.aerialworx.co.uk"]www.aerialworx.co.uk[/url]

maddog7

Stef,
Thanks for the help!
I';ve always shied away from programmaticalistic stuff but my interest in the way multis fly has given me the desire to learn.

I actually didn';t want to mess with anything at all at this early stage of the game but considered I';d probably have to do it at some point and thought changing only 4 values in 1 file might not be too bad  :o

It was a very steep learning curve just to get to that point and it';s still not there yet.

I did actually start from fresh, DL';ing only the V2.9 firmware and a new copy of the ardupilot IDE on a brand new laptop with a fresh install of 7 64 but there are quite a few red herrings in this APM business are there not!

I even tried to compile the untouched 2.9 but to no avail (probably because I didn';t realise I had to un-rem the APM2 line :banghead:)
In actual fact the only changes I';ve made to any of the FW/IDE was to set the sketch folder and replace the 4 motors values in the AP_motorsquad.cpp library file. After Jumpy mentioned the un-rem thing I tried that too, it would compile but there were warnings mee noo understandee :shrug:

I did most of my initial looking for answers on the DIY drones forum which is packed with info but much of it pertains to older FW versions and different hardware, not to mention a discussion I found where many folks were saying that the newest version of the ardupilot IDE was not compiling properly and they';d had to use either older versions or the STD Arduino IDE....

I can easily revert to the untouched version of 2.9 at anytime so a little experimentation with editing should only cause sliced flesh/walls and or a lost investment as it disappears of to (beautiful BTW Jumpy! we visit quite a lot :smiley:) Scotland!

I really would like to get to the bottom of this simple change since I can';t help feeling that if I want the best from the APM I';m gonna need to learn it sooner or later however, tomorrow if it';s not bloody snowing I';m going to take heed and fly the damn thing as it is!

:beer2:
D