How To: Compile MPNG 3.0.1 sources

    1. Download the ArduPilot-Arduino-1.0.3 (~95Mb) from: ArduPilot site
      Extract downloaded files into any folder, for example: c:\quadcopter
    2. Download latest MPNG source code from here. Extract downloaded MPNG sources into any folder, for example: c:\quadcopter
    3. Important! Copy and replace pde.jar file form MPNG sources folder into ‘LIB‘ subfoler of Arduino IDE (c:\Quadcopter\Arduino-ardupilot-ide\lib\)
    4. Open Arduino IDE and change target Platform to MegaPirateNG:
      Selecting MPNG Platform in IDE
    5. Open Preferences and set sketch folder to folder where you extracted MPNG sources (c:\quadcopter\ardupilot-mpng)
      ide-select-preferenceside-set-folder
    6. Change COM port assigned for your CRIUS AOIP v2 board (or any supported board):
      ide-set-COM-port
    7. Important! Restart Arduino IDE!
    8. Now you can open MPNG sketch and Compile it. That’s all.

8 thoughts on “How To: Compile MPNG 3.0.1 sources

  1. I do not see all the adjustable parameters any longer as I saw them in release 2.x.x, except the hex/quad/tri/etc. config.
    So do I understand it right that all the configuration is now done in Mission Planner?
    I am a bit confused…

  2. Sorry guys, fighting for many hours now but I still don’t get it.

    I did as stated in the How To above, although I do not understand what “Extract IDE files” means.
    The result is that I see in APM_Config.h:

    [quote]
    [color=#7E7E7E]// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-[/color]

    [color=#7E7E7E]// User specific config file.  Any items listed in config.h can be overridden here.[/color]

    [color=#7E7E7E]// If you used to define your CONFIG_APM_HARDWARE setting here, it is no longer[/color]
    [color=#7E7E7E]// valid! You should switch to using a HAL_BOARD flag in your local config.mk.[/color]

    [color=#7E7E7E]// If you have CRIUS V1 - Uncomment next line to disable logging[/color]
    #define LOGGING_ENABLED       DISABLED            [color=#7E7E7E]// disable logging for boards without dataflash chip[/color]

    [color=#7E7E7E]// If Arduino IDE hang while uploading firmware to your board, try to change string below, just enter some random characters[/color]
    #define BOOTLOADER_BUGFIX [color=#006699]“234fs34567hf”[/color]

    [color=#7E7E7E]// Currently not supported[/color]
    #define CONFIG_SONAR DISABLED

    [color=#7E7E7E]//#define HIL_MODE              HIL_MODE_SENSORS    // build for hardware-in-the-loop simulation[/color]
    [color=#7E7E7E]//#define HIL_MODE              HIL_MODE_ATTITUDE    // build for hardware-in-the-loop simulation[/color]

    [color=#7E7E7E]// QuadCopter selected by default[/color]
    [color=#7E7E7E]//#define FRAME_CONFIG HEXA_FRAME[/color]
    [color=#7E7E7E]/*[/color]
    [color=#7E7E7E] *  options:[/color]
    [color=#7E7E7E] *  QUAD_FRAME[/color]
    [color=#7E7E7E] *  TRI_FRAME[/color]
    [color=#7E7E7E] *  HEXA_FRAME[/color]
    [color=#7E7E7E] *  Y6_FRAME[/color]
    [color=#7E7E7E] *  OCTA_FRAME[/color]
    [color=#7E7E7E] *  OCTA_QUAD_FRAME[/color]
    [color=#7E7E7E] *  HELI_FRAME[/color]
    [color=#7E7E7E] */[/color]

    [color=#7E7E7E]// User Hooks : For User Developed code that you wish to run[/color]
    [color=#7E7E7E]// Put your variable definitions into the UserVariables.h file (or another file name and then change the #define below).[/color]
    [color=#7E7E7E]//#define USERHOOK_VARIABLES ”UserVariables.h”[/color]
    [color=#7E7E7E]// Put your custom code into the UserCode.pde with function names matching those listed below and ensure the appropriate #define below is uncommented below[/color]
    [color=#7E7E7E]//#define USERHOOK_INIT userhook_init();                    // for code to be run once at startup[/color]
    [color=#7E7E7E]//#define USERHOOK_FASTLOOP userhook_FastLoop();            // for code to be run at 100hz[/color]
    [color=#7E7E7E]//#define USERHOOK_50HZLOOP userhook_50Hz();                // for code to be run at 50hz[/color]
    [color=#7E7E7E]//#define USERHOOK_MEDIUMLOOP userhook_MediumLoop();        // for code to be run at 10hz[/color]
    [color=#7E7E7E]//#define USERHOOK_SLOWLOOP userhook_SlowLoop();            // for code to be run at 3.3hz[/color]
    [color=#7E7E7E]//#define USERHOOK_SUPERSLOWLOOP userhook_SuperSlowLoop();  // for code to be run at 1hz[/color]
    [/quote]

    I have the impression that there is missing a lot, like the type of transmitter. type of GPS, etc.

    Sorry to bother you but I hope someone can put me on the right track.
    Thanks in advance…

    1. I have the same problem. When I run mission planner I can’t calibrate the radio and there is no place to setup the radio. Sorry I had it all working in older versions.
      Any help?

  3. This is the entire text of APM_Config.H

    // -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-

    // User specific config file. Any items listed in config.h can be overridden here.

    // Select Megapirate board type:
    //#define MPNG_BOARD_TYPE CRIUS_V1
    /*
    RCTIMER_CRIUS_V2 — (DEFAULT!!!) Use ONLY for RCTimer CRIUS V2 board
    CRIUS_V1 — RCTimer CRIUS V1(1.1) board and all HobbyKing AIOP boards
    HK_RED_MULTIWII_PRO — HobbyKing MultiWii Pro RED board with ITG3205 and BMA180, BMP085 sensors
    BLACK_VORTEX
    MULTIWII_PRO_EZ3_BLACK — ReadyToFlyQuads – MultiWii PRO Ez3.0 Blacked MAG Editon Flight Controller w/ GPS Option (NO COMPASS)
    */

    // Currently not supported
    #define CONFIG_SONAR DISABLED

    //#define COPTER_LEDS DISABLED

    // GPS port speed (Serial2) 38400 by default
    //#define SERIAL2_BAUD 38400

    // GPS driver selection
    //#define GPS_PROTOCOL GPS_PROTOCOL_AUTO
    /*
    GPS_PROTOCOL_AUTO (Default)
    GPS_PROTOCOL_NONE
    GPS_PROTOCOL_NMEA
    GPS_PROTOCOL_SIRF
    GPS_PROTOCOL_UBLOX
    GPS_PROTOCOL_IMU
    GPS_PROTOCOL_MTK
    GPS_PROTOCOL_HIL
    GPS_PROTOCOL_MTK19
    */

    // QuadCopter selected by default
    //#define FRAME_CONFIG QUAD_FRAME
    /*
    * options:
    * QUAD_FRAME
    * TRI_FRAME
    * HEXA_FRAME
    * Y6_FRAME
    * OCTA_FRAME
    * OCTA_QUAD_FRAME
    * HELI_FRAME
    */

    //#define HIL_MODE HIL_MODE_SENSORS // build for hardware-in-the-loop simulation
    //#define HIL_MODE HIL_MODE_ATTITUDE // build for hardware-in-the-loop simulation

    // If Arduino IDE hang while uploading firmware to your board, try to change string below, just enter some random characters
    #define BOOTLOADER_BUGFIX “234fs34567″

    // User Hooks : For User Developed code that you wish to run
    // Put your variable definitions into the UserVariables.h file (or another file name and then change the #define below).
    //#define USERHOOK_VARIABLES “UserVariables.h”
    // Put your custom code into the UserCode.pde with function names matching those listed below and ensure the appropriate #define below is uncommented below
    //#define USERHOOK_INIT userhook_init(); // for code to be run once at startup
    //#define USERHOOK_FASTLOOP userhook_FastLoop(); // for code to be run at 100hz
    //#define USERHOOK_50HZLOOP userhook_50Hz(); // for code to be run at 50hz
    //#define USERHOOK_MEDIUMLOOP userhook_MediumLoop(); // for code to be run at 10hz
    //#define USERHOOK_SLOWLOOP userhook_SlowLoop(); // for code to be run at 3.3hz
    //#define USERHOOK_SUPERSLOWLOOP userhook_SuperSlowLoop(); // for code to be run at 1hz

    Where do I set radio config and other params?

Leave a Reply