dji_version.hpp
Go to the documentation of this file.
1 
34 #ifndef DJI_VERSION_H
35 #define DJI_VERSION_H
36 
37 #include "dji_command.hpp"
38 #include <cstdint>
39 
40 namespace DJI
41 {
42 namespace OSDK
43 {
44 
45 class Version
46 {
47 public:
48  typedef uint32_t FirmWare;
49 
50  static const char M100[];
51  static const char N3[];
52  static const char A3[];
53  static const char M210[];
54  static const char M210V2[];
55  static const char M300[];
56  static const char M600[];
57 
58  typedef struct VersionData
59  {
60  uint16_t version_ack;
61  uint32_t version_crc;
62  char hw_serial_num[16];
63  char hwVersion[12];
64  FirmWare fwVersion;
65 
67  char version_name[32];
68  } VersionData;
69 
70 public:
71  static const FirmWare FW(uint8_t a, uint8_t b, uint8_t c, uint8_t d);
72 
73 public:
74  // clang-format off
75 
76  // Matrice 100 Firmware version supported by DJI OSDK Core library
77  static const FirmWare M100_31 = 0x03010A00;//Version::FW(3, 1, 10, 0 );
78  static const FirmWare A3_31 = 0x03016400;//Version::FW(3, 1, 100, 0 );
79  static const FirmWare A3_32 = 0x03026400;//Version::FW(3, 2, 100, 0 );
80 
81  // clang-format on
82 }; // class version
83 
91 const Version::FirmWare mandatoryVersionBase = (Version::FW(3, 1, 10, 0));
92 
100 const Version::FirmWare extendedVersionBase = (Version::FW(3, 2, 36, 6));
101 
107 const Version::FirmWare versionBase33 = (Version::FW(3,3,0,0));
108 
112 typedef struct CMD_SETSupportMatrix
113 {
114  uint8_t cmdSet;
115  Version::FirmWare fwVersion;
117 
118 } // namespace DJI
119 } // namespace OSDK
120 
121 #endif // DJI_VERSION_H
const Version::FirmWare mandatoryVersionBase
Define FW version that supports "mandatory" CMD_SET.
Definition: dji_version.hpp:91
Define CMD_SET support matrix.
Definition: dji_version.hpp:112
All DJI OSDK OpenProtocol Command IDs.
struct DJI::OSDK::CMD_SETSupportMatrix CMD_SETSupportMatrix
Define CMD_SET support matrix.
const Version::FirmWare versionBase33
Define FW version constant for 3.3.x firmware branch.
Definition: dji_version.hpp:107
Definition: dji_ack.cpp:38
const Version::FirmWare extendedVersionBase
Define FW version that supports "extended" CMD_SET.
Definition: dji_version.hpp:100