APM 2.012 + REMZIBI OSD

 

 

 

With the APM together, it can display much information on the screen, e.g. the attitude of the plane, GPS data, NAV data, etc. The details of displayed information can be found in the web site of Remzibi OSD and the ARDUmV1_71.txt. Blake Krone has done great works to integrate the OSD and the APM. However, due to the fast development of the APM, some source codes are out of date, and thus a few modifications are needed to make them work properly. In this article, we give a detailed instruction of those modifications.

 

Our work is based on

1. APM 2.12 source code. Arduino-0022 IDE.

2. The firmware of OSD is ARDUmV1_71.hex

3. The serial port of the OSD is connected to serial port 3 of the APM (i.e. Telemetry port). Because the OSD does not send data to APM, the TX pin of the OSD is not required to be connected. You can also connect the Xbee to the serial port 3 of the APM in the meantime. In such case, the RX pins of the Xbee and the OSD are connected in parallel, and You MUST NOT connect the TX pin of the OSD. The Baud rate of the OSD is self-adaptive, and it is usually below 115200.

 

Here are the modifications:

First, download OSD_Remzibi.pde, and then modify some parameters according to the definitions in the code of APM:

1. In function print_osd_data(void)

Original:                    SendSer(GPS.date,DEC); //Date

Modified:       SendSer(g_gps->date,DEC); //Date

Comment:     This parameter is the GPS UTC date

 

Orignal:             SendSer(GPS.time,DEC); //Time

Modified:       SendSer(g_gps->time,DEC); //Time

Comment:     This parameter is the GPS UTC time

 

2. In function void print_osd_ahrs(void):

Original:         SendSer((pitch_sensor/100) * -1,DEC); //Pitch

Modified:       SendSer(dcm.pitch_sensor/100,DEC); //Pitch

Comment:   This parameter is the pitch of the plane.

 

Original:         SendSer(roll_sensor/100,DEC); //Roll

Modified:       SendSer(dcm.roll_sensor/100,DEC); //Roll

Comment:     This parameter is the roll of the plane.

 

Second, modify the source of APM (ver 2.12):

① In APM_Config.h :

Add following codes:

#define OSD_PROTOCOL OSD_PROTOCOL_REMZIBI

#define OSD_PORT 3

#define OSD_MODE_CHANNEL 7

 

These macros tell the APM to use the serial port 3 to connect to the OSD under the REMZIBI protocol. The channel 7 is used to control whether the OSD displays. You can change the serial port or control channel if it is needed.

 

② ArduPilotMega.pde :

In function medium_loop(), add following codes before the break statement in case 3:

#if OSD_PROTOCOL != OSD_PROTOCOL_NONE

print_osd_ahrs();

#endif

 

In function slow_loop (), add following code before the break statement in case 1:

#if OSD_PROTOCOL != OSD_PROTOCOL_NONE

print_osd_data();

#endif

// Read OSD Mode Switch

#if OSD_PROTOCOL == OSD_PROTOCOL_REMZIBI

read_osd_switch();

#endif

 

③ defines.h :

Add following codes after “//GPS type codes”:

// OSD type codes

#define OSD_PROTOCOL_NONE -1

#define OSD_PROTOCOL_REMZIBI 0

 

④ commands.pde :

In line 251, add following code at the end of function init_home():

// Save Home to OSD

// ----------------

#if OSD_PROTOCOL == OSD_PROTOCOL_REMZIBI

osd_init_home();

#endif

 

Now, all the modifications have been done. Copy the OSD_Remzibi.pde to the folder of the source code of the APM 2.12(APM Trunk\ArduPilotMega), start Arduino, build the sketch and upload to the APM.

 

3689404993?profile=original

 

 3689404945?profile=original

 

Uploads are not downloaded,Why?ArduPilotMega2.12+remzibi_osd.rar

 

 

OSD_RemzibiV2.pde

 

chineseV.pdf

 

Thank LEE,hazy,Blake Krone's

E-mail me when people leave their comments –

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

Join diydrones

Comments

  • Very interesting.

    Does the Remzibi takes the GPS input from the Ardupilot or does it still needs it's own GPS ?

  • Yes, using the new

    OSD_RemzibiV2.pde
  • Many Thanks Matthias
  • That's normal , you should use the new pde file https://storage.ning.com/topology/rest/1.0/file/get/3689404877?prof...
  • Currently, i have the following errors when i build the build the sketch.

    I have same comment regarding the rar file can not be downloaded.

    For the OSD_Remzibi.pde, i am using the one posted by Blake.

    ArduPilotMega.cpp: In function 'byte readOSDSwitch()':
    OSD_Remzibi:57: error: 'OSD_MODE_CHANNEL' was not declared in this scope
    ArduPilotMega.cpp: In function 'void print_osd_data()':
    OSD_Remzibi:93: error: expected primary-expression before '.' token
    OSD_Remzibi:99: error: expected primary-expression before '.' token
    OSD_Remzibi:171: error: 'wp_index' was not declared in this scope
    ArduPilotMega.cpp: In function 'void print_osd_ahrs()':
    climb_rate:0: error: 'roll_sensor' was not declared in this scope
    climb_rate:2: error: 'pitch_sensor' was not declared in this scope
  • Well done Binzi , i will do some test this coming week-end
  • A very helpful post Binzi, thank you!
  • By the way the rar file can not be downloaded : permission denied

    And none of the video plays from here (Europe)

  • I was doing the same and finished as well. Thanks for sharing your work.

    Would be really nice to have this integrated into official code one day, unless ... "diydrones OSD" comes to light soon using the SPI interface that would make think easier for connectivity !

  • Known issues. PORT3 Ground Station can not be used in conjunction with the OSD
This reply was deleted.