A group to discuss the many ways to edit and compile the code for the Ardupilot Mega!

236 Members
Join Us!

You need to be a member of diydrones to add comments!

Join diydrones

Comments are closed.

Comments

  • I am a green hand of quadcopter,and I just could not find the main function of the arducoper in the code,forget to say,I do not use the arduino IDE but Source Insight,it can just browse the code but not compile them,where is the main function?many thanks

  • Hi,

    Can someone share with me the:

    1) Software architecture for Arducopter

    2) Stabilize and Loiter Controller architecture.

    I could not find it on DIYDrones and even googled it, can't find it. Grateful for any help here!

  • Developer

    @Janelle: Open a forum post as it's much easier to discuss than this 'Wall Feature'

    MAVLink messages are a binary protocol and you can easily create a program to process them without Mission Planner.see http://qgroundcontrol.org/mavlink/start and see http://qgroundcontrol.org/dev/mavlink_onboard_integration_tutorial

    It's just a loop and you can detect each message and then pretty print the output in your own format (or store them and print them out at a set frequency)

    I hope the links help :)

  • @Janelle,

    It doesn't work that way with ArduPlane codebase. Serial Monitor is meant for data with USB attached at 115200bps baud rate. With telemetry, it is only restricted for data in flight (e.g. via MavLINK) and you will see some junk values when using Telemetry. You can change the code however, to display the result on the serial monitor with Telemetry, but I will not do that if it were me.

  • @Randy,

    I figured, since I read

    "Building for ArduPilot Mega 2.x
    Excluding arduino core from include paths
    Excluding arduino core from link"

    during compiling process.

    What a pity!

    Thanks for your answer

  • Developer

    @Anderl re "is it possible to upload AC-3.0.1 using standard arduino?" I'm afraid the answer is 'no'.  The reason is that between 2.9.1b and 3.0.1 we added the hardware-abstraction-layer in order to be able to run the same code on the PX4.  The standard Arduino IDE can't deal with HAL so we had to make a modified version.

  • Hi all,

    Till Arducopter V2.9.1 I was able to programming my APM2.5 using Arduino IDE (standard Arduino IDE 1.0.1, not Arduino IDE for Arducopter). It was necessary to edit the APM_Config file by adding "#define CONFIG_APM_HARDWARE APM_HARDWARE_APM2". But yet, ab V3.0 I'm unable to compile the code. Now, to achieve this, I have to use necessarily the Arduino IDE for arducopter and select the appropiate HAL board.

    Question: There is a way to program the APM 2.5 using the standard Arduino IDE? If yes, how should I proceed to specify in code which board is going to be programmed? (CONFIG_HAL_BOARD == HAL_BOARD_APM2)?

    Thank you all.

  • MR60

    Wiki on Custom Code.  I've moved this conversation to the following 

    http://diydrones.com/group/learning-to-program-the-ardupilot-mega/f...

  • MR60

    Rick Calder and I have been working on a Wiki for the Windows environment showing how to:

    • Creating a workspace
    • Download the code
    • Download the compiler
    • Configure the compiler
    • Familiarizing yourself with the code
    • An example of modifying octa files for custom frame layouts
    • Verify the code
    • Compile and upload the code
    • Maintain custom code when updates occur

    If someone wants to help, let us know how you would like to help.

  • Really great concept for a group guys,

    Seems to me that one thing that is badly needed is a really good Developer wiki page on the basics of exactly how to do this.

    Basically a really straightforward walk through showing step by step how to use Git to properly clone the firmware source, How to install and set up the developer environment, edit, compile and build the source, load the firmware object and finally how to interact with the developer group to get it into shape for submission as a possible inclusion in the user code.

    At one time it was fairly simple to do this, but it has gotten more complicated and I think is screaming for a really good shiny new wiki page that covers this well enough so that your 5 year old (well maybe not) could do it.

    Also like to see it for PX4 and trying to get together something like it with Dennis Spanogle for Mission Planner right now.

    Anybody with actual experience, I would be happy to work with you to get this in the Wiki, contact me from my Avatar.

This reply was deleted.

Getting mission status on UserCode.cpp

Hello, everyone!I'm trying to count how many waypoints has my drone visited and if the mission has been sucessfully finished, and for that I'm planning on writing my code on the UserCode.cpp file, but I don't know if I can define some library to extract that data from, or if I should go directly to the EEPROM, or if I can declare my own parameters and read from them somehow... What is the "good practices" way to do this? Thanks in advance.

Read more…
0 Replies

MAVLink Manual Control via Arduino / Teensy

hi @all,Inspired on Burkards Sonar Boat project i want to build my own Sonar Boat. We have some discussion to implement the MAVLink functionality and use a APM or Pixhawk with ardurover firmware.Burkard has developed a little remote with a OLED to get some information live from the Boat. This remote has a 5 Way Switch (Joystick) to control manual...A 3DR Ground Modul, a five way switch and a Oled are connected to a Teensy (Teensyduino) So far so good :)I try to implement the MAVLink Protocol to…

Read more…
0 Replies

APM servo program

Hi all,       I have some question about the APM servo program.The question is that I can debug it correctly,but it can not make a difference.Meanwhile it run very well when I debug it in my arduino. So I want to know where I do wrong.       Any help would be greatly appreciate!Thanks,APMlover.servo_program.ino

Read more…
0 Replies

The APM code

Hi all I am a fresher to the APM code.I have difficult to understand those codes.Is anybody can help me with this code .Such as the programe experience,the way to understand the codes,flowchart or how to search things  what can help to understand those codes. Any help would be greatly apperciate!Thanks,APMlover ArduCopter.pde

Read more…
0 Replies