How To: Configure MPNG 3.0.1 firmware

1. Changing board type to Crius V1 (HobbyKing – V2)

Important! By default, MPNG coming preconfigured for RCTIMER CRIUS AIOP v2

Important! HobbyKing V2 is not same as RCTimer CRIUS AIOP v2

To switch board to CRIUS AIOP v1 (or other boards without DATAFLASH chip onboard), just disable LOGGING feature in APM_Config.h

#define LOGGING_ENABLED       DISABLED

2. Changing RC input type to SERIAL PPM (CPPM) on PL1 pin

Important! By default, Serial PPM on A8 pin selected

To enable Serial PPM on PL1(PPM SUM) pin (RCTimer Crius V2 only). Open file ardupilot-mpng\libraries\AP_HAL_MPNG\RCInput_MPNG.cpp
Replace this line:

#define SERIAL_PPM SERIAL_PPM_ENABLED

With this:

#define SERIAL_PPM SERIAL_PPM_ENABLED_PL1

 

3. Changing RC input type to regular PWM inputs A8-A15

Important! By default, Serial PPM on A8 pin selected

To disable Serial PPM signal processing, and use separate input pin (A8-A15) for each RC channel. Open file ardupilot-mpng\libraries\AP_HAL_MPNG\RCInput_MPNG.cpp
Replace this line:

#define SERIAL_PPM SERIAL_PPM_ENABLED

With this:

#define SERIAL_PPM SERIAL_PPM_DISABLED

 

4. How to change RC input channel order

MPNG shipped with some predefined channels order which you can select or change in file: ardupilot-mpng\libraries\AP_HAL_MPNG\RCInput_MPNG.cpp

Uncomment only one line!

// To change pinmapping, uncomment ONE line starting with 'static unit8_t...'

// Graupner/Spektrum
// PITCH,YAW,THROTTLE,ROLL,AUX1,AUX2,CAMPITCH,CAMROLL
//static uint8_t pinRcChannel[8] = {1, 3, 2, 0, 4, 5, 6, 7}; 

// Standard (Default)
// ROLL,PITCH,THROTTLE,YAW,MODE,AUX2,CAMPITCH,CAMROLL
static uint8_t pinRcChannel[8] = {0, 1, 2, 3, 4, 5, 6, 7}; 

// some Hitec/Sanwa/others
// PITCH,ROLL,THROTTLE,YAW,AUX1,AUX2,CAMPITCH,CAMROLL
//static uint8_t pinRcChannel[8] = {1, 0, 2, 3, 4, 5, 6, 7};

// Multiwii
// ROLL,THROTTLE,PITCH,YAW,AUX1,AUX2,CAMPITCH,CAMROLL
//static uint8_t pinRcChannel[8] = {1, 2, 0, 3, 4, 5, 6, 7};

// JR
// FLAPS:MODE, GEAR:SAVE TRIMM = apm ch7
//static uint8_t pinRcChannel[8] = {1, 2, 0, 3, 5, 6, 4, 7};

 

29 thoughts on “How To: Configure MPNG 3.0.1 firmware

  1. Hi Alex!

    Thanks for the link – I will test it the R2 if the wind calms down (we have about 3bft!)

    For now I’ve got one question: what is the difference between PPM on PL1 or A8? What is the better solution on a CriusV2?

    greetinx
    d

      1. Okay, I’ll compile it again ;)

        Another question, I asked it some times before @RCG but did not get an answer, maybe you could do it here: what about the diode (or whatever it is) above the outputs 9 and 10? On my CriusV2 it is damaged – is it very important and for what is it? It is difficult for me to find it out, maybe you could please give a short answer?!

  2. BTW: Maybe it could be an idea to open an IRC channel? I think there are many out there who are sometimes online and so we can communicate much faster? IT is not meant that you have to be there all the time – just some other guys who might be helpfull…

  3. After changing to SERIAL_PPM SERIAL_PPM_DISABLED I have a lot of errors while compiling.

    ArduCopter.pde:124:21: error: Arduino.h: No such file or directory
    In file included from ArduCopter.pde:109:
    compat.h:12: error: variable or field ‘run_cli’ declared void
    compat.h:12: error: ‘AP_HAL’ has not been declared
    compat.h:12: error: ‘port’ was not declared in this scope
    In file included from ArduCopter.pde:116:
    Parameters.h:257: error: ‘AP_Int16′ does not name a type
    Parameters.h:258: error: ‘AP_Int8′ does not name a type
    Parameters.h:262: error: ‘AP_Int16′ does not name a type
    Parameters.h:263: error: ‘AP_Int16′ does not name a type
    Parameters.h:264: error: ‘AP_Int8′ does not name a type
    Parameters.h:265: error: ‘AP_Int8′ does not name a type
    Parameters.h:267: error: ‘AP_Int16′ does not name a type
    Parameters.h:268: error: ‘AP_Int8′ does not name a type
    Parameters.h:269: error: ‘AP_Int8′ does not name a type
    Parameters.h:272: error: ‘AP_Float’ does not name a type
    Parameters.h:273: error: ‘AP_Int8′ does not name a type
    Parameters.h:275: error: ‘AP_Float’ does not name a type
    Parameters.h:276: error: ‘AP_Float’ does not name a type
    Parameters.h:277: error: ‘AP_Int16′ does not name a type
    Parameters.h:278: error: ‘AP_Int8′ does not name a type
    ….
    ….
    ….

    1. Check you are using special eddition of Arduino IDE and also selected MPNG board in menu.
      Also check libraries folder.

      1. I’m using special edition of Arduino IDE
        HAL Board: MPNG – selected

        Not sure about the libraries folder. What about the libraries folder. Copying the “ardupilot-mpng\libraries” to “ArduPilot-Arduino-1.0.3-windows\libraries” doesn’t fix it.

    2. I am getting the same error, I have tried “I modified the “RCInput_MPNG.cpp” using wordpad rather arduino.”
      Any ideas will help

      1. I can’t compile R2 version. Followed all the instructions and have got as far as moding “RCInput_MPNG.cpp” I used Notepad++ version 6 and uncommented this
        // Standard (Default)
        // ROLL,PITCH,THROTTLE,YAW,MODE,AUX2,CAMPITCH,CAMROLL
        static uint8_t pinRcChannel[8] = {0, 1, 2, 3, 4, 5, 6, 7};
        On trying to compile, I get a host of errors
        [removed by admin]
        Sorry the list is so long.

        Some guidance will be much appreciated.

          1. What did you do? I’m getting the same error list.

          2. Ah, I finally got it. I had to get my sketch folder set the same as TRUNK

  4. Hello, I have a hexacopter with HK CRIUS AIOP and it was working great on v2.8_r6.
    When I moved to v3.0.1R2 by following the instructions given here, I cannot do the calibration of the Radio Sticks, none of my stick inputs were detected(display 0) on the mission planner(1.2.80)

    I got my EEPROM erased before I flashed it with new FW and these are my settings…
    #define LOGGING_ENABLED DISABLED
    #define SERIAL_PPM SERIAL_PPM_DISABLED//im using individual channels
    static uint8_t pinRcChannel[8] = {1, 2, 0, 3, 4, 5, 6, 7};//multiwii

    1. it turns out that the user is the problem… :D :D :D
      I copied the library folder to arduino IDE library but my working directory is from where I extracted the file.

      I’m modifying the correct from from the wrong folder…

  5. I have a RCtimer Crius AIO V2, have uploaded the MPNG 3.0.1 R2 and in mission planner my altitude is always negative…like -17… what could I have donne wrong??

  6. Hi
    Can you help me. I have self made GPS module work on 9600 baudrate, NMEA protocol.
    Where can I change config settings? As I know in this version 3.0.1 R2 GPS module is in AUTO search mode and in this mode my board see my GPS NMEA module as Ublox module and work on Ublox protocol -This is for me incorrect.
    Please help me.

    Thank you.
    Best regards Roman form Kazakhstan.

    1. Sorry, but I’m not understand what is wrong. If you use UBLOX – the code detect it and automatically switch in best mode for ArduCopter (5Hz update, Binary protocol, 38400 speed)

      1. Thank for reply.
        My GPS module work on baudrate 9600 NMEA Protocol.
        In AUTO detect mode, my Crius AIO V2 board detect it as Ublox protocol, at this time I see worg coordinates.
        Mey be this problem is because i have old Ublox module Neo-6M-0-000
        I can not cofigure it via Ublox config tool, after configure it via config file my GPS go “freeze”
        I think you autodetect mode at first detect on my GPS board Binary protocol and hold on this position and do no switch to NMEA protocol.
        Therefore I need configure manually NMEA protocol on 9600 baud.
        In older version MPNG I have configured it manually and it worked well.
        I am versed in programming, but I have no time
        Thanks

  7. Hi,

    For a few days now I’m trying to use Remzibi’s OSD with ver 3.0.1 without any luck.
    The OSD keeps trting to find a baud rate that will show something but … nothing happens.

    I’m connected to TX1 as appears in the readme files.
    (It worked befor with previous version of MPNG)

    Any idea ?
    - Also, Where can I configure the serial ports on this version ? (things like speed of a port atc..)

    Thanks,
    Gil

  8. Any chance on a manual explaining about the LED outputs the sw does on the board? I had a multiwii board and now the HK AIO V2/Crius v1 board and several of the onboard leds light up but it is hard to figure out what they indicate. This AIO board has leds A, B and C and a few more. But what do they tel me?
    I’m also not getting my MTK3329 (Gstar GS-15c) to work.
    No idea what FW is in it. just that it did work on my old board on MPNG2.8&multiwii2.2. I ‘hear talk’ of firmware for it 1.6 and 1.9 but no download links and how to connect/update. The LED on the GPS blinks/full on indicatin that has (no) fix. But mission planner shows ‘no GPS’.

  9. Hello,

    my Quad is not working with GPS (no fix). With MultiWii this works for me.
    I have a Crius AIOP V2 from RCTimer and NEO-6 V3.0 GPS NEO-6M UBLOX from GLB.
    Which attitudes are absoluty needed in source code to use this assembly?

    Sorry I’m new on MPNG.

    best regards from Berlin

  10. hii
    I’m using a HK multiwii & megapirate flight comtroller v1
    (from the bad batch that the GND connection for 5V regulator is missing)
    i understand that this board is a clone of the crius v1 ..
    I want to upload MegaPirateNG 3.0.1 R2 and i understand that it is
    preconfigured for RCTIMER CRIUS AIOP v2 and i have to disable logging feature in APM_Config.h but when i’m open APM_Config.h it says

    // If you have CRIUS V1 – Uncomment next line to disable logging
    #define LOGGING_ENABLED DISABLED // disable logging for boards without dataflash chip

    but as you can see the line is allready uncomment
    so do i need to comment it ? Ignore it ? chang line to #define LOGGING_DISABLED??

    and for Understanding what can happen if i upload the wrong line ? can it harm the board or just bug it???

    Thanks
    Elad

Leave a Reply