Please select Into the mobile phone version | Continue to access the computer ver.
Porting OSDK Code from M100 to M300
221 3 2020-11-23
Uploading and Loding Picture ...(0/1)
o(^-^)o
Lison Li
lvl.2

United Kingdom
Offline

Hi all!

I am trying to port some existing codes from a Matrice 100 to a Matrice 300. Is there any tutorial / tips on how to do this effectively?

Currently I'm going through the M100 code line by line picking up the M100 specific instruction and try to look up the equivalent in M300. However, I can't find a page with direct comparison of the two's API's and often times I end up not being able to find an equivalent. For examle, in the `dji_status.hpp` file for M100, there is a namespace called "M100FlightStaus", which allows access to 5 statuses of the drone. Whereas in the same file, under the namespace of "FlightStatus", there are only 3. I assume that the code with namespace "M100FlightStatus" won't be able to run on the M300 platform so I tried to look up "M300FlightStatus" online but didn't find anything. Does that leave me with just the option to use "FlightStatus", which has only 3 statuses, on M300?

So I guess my questions would be:
1. Is there a better way to do the porting other than looking up the code line by line?
2. How to find the M100-specific instruction equvalent on M300?

Any help would be appreciated!

Nosilil
2020-11-23
Use props
kv886
Second Officer

South Africa
Offline

The difference between M100 and M300 is too big. It is recommended to port from the functional level. For example, you say "there is a namespace called "M100FlightStaus", which allows access to 5 statuses of the drone. ". I think you can find in M100's code how to get the 5 states through OSDK. And in M300's code, get these 5 states through the corresponding API
2020-11-24
Use props
Lison Li
lvl.2

United Kingdom
Offline

kv886 Posted at 11-24 00:29
The difference between M100 and M300 is too big. It is recommended to port from the functional level. For example, you say "there is a namespace called "M100FlightStaus", which allows access to 5 statuses of the drone. ". I think you can find in M100's code how to get the 5 states through OSDK. And in M300's code, get these 5 states through the corresponding API

Hi kv886!

Thanks for your reply! I'll look into the direction of porting the functional block rather than the instructions.

Just a side note, what is the backward compatibility like on newer drones? Is it possible for the M300 to run codes from M100?

Cheers,
Nosilil
2020-11-24
Use props
kv886
Second Officer

South Africa
Offline

No. M300 only supports onboard SDK 4.0. But M100 can only use onboard 3.9.
I think DJI should have updated the protocol in OSDK4.0
2020-11-27
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules