You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

463 lines
22 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #pragma once
  2. // MESSAGE DIGICAM_CONFIGURE PACKING
  3. #define MAVLINK_MSG_ID_DIGICAM_CONFIGURE 154
  4. MAVPACKED(
  5. typedef struct __mavlink_digicam_configure_t {
  6. float extra_value; /*< Correspondent value to given extra_param.*/
  7. uint16_t shutter_speed; /*< Divisor number //e.g. 1000 means 1/1000 (0 means ignore).*/
  8. uint8_t target_system; /*< System ID.*/
  9. uint8_t target_component; /*< Component ID.*/
  10. uint8_t mode; /*< Mode enumeration from 1 to N //P, TV, AV, M, etc. (0 means ignore).*/
  11. uint8_t aperture; /*< F stop number x 10 //e.g. 28 means 2.8 (0 means ignore).*/
  12. uint8_t iso; /*< ISO enumeration from 1 to N //e.g. 80, 100, 200, Etc (0 means ignore).*/
  13. uint8_t exposure_type; /*< Exposure type enumeration from 1 to N (0 means ignore).*/
  14. uint8_t command_id; /*< Command Identity (incremental loop: 0 to 255). //A command sent multiple times will be executed or pooled just once.*/
  15. uint8_t engine_cut_off; /*< [ds] Main engine cut-off time before camera trigger (0 means no cut-off).*/
  16. uint8_t extra_param; /*< Extra parameters enumeration (0 means ignore).*/
  17. }) mavlink_digicam_configure_t;
  18. #define MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN 15
  19. #define MAVLINK_MSG_ID_DIGICAM_CONFIGURE_MIN_LEN 15
  20. #define MAVLINK_MSG_ID_154_LEN 15
  21. #define MAVLINK_MSG_ID_154_MIN_LEN 15
  22. #define MAVLINK_MSG_ID_DIGICAM_CONFIGURE_CRC 84
  23. #define MAVLINK_MSG_ID_154_CRC 84
  24. #if MAVLINK_COMMAND_24BIT
  25. #define MAVLINK_MESSAGE_INFO_DIGICAM_CONFIGURE { \
  26. 154, \
  27. "DIGICAM_CONFIGURE", \
  28. 11, \
  29. { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_digicam_configure_t, target_system) }, \
  30. { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_digicam_configure_t, target_component) }, \
  31. { "mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_digicam_configure_t, mode) }, \
  32. { "shutter_speed", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_digicam_configure_t, shutter_speed) }, \
  33. { "aperture", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_digicam_configure_t, aperture) }, \
  34. { "iso", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_digicam_configure_t, iso) }, \
  35. { "exposure_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_digicam_configure_t, exposure_type) }, \
  36. { "command_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_digicam_configure_t, command_id) }, \
  37. { "engine_cut_off", NULL, MAVLINK_TYPE_UINT8_T, 0, 13, offsetof(mavlink_digicam_configure_t, engine_cut_off) }, \
  38. { "extra_param", NULL, MAVLINK_TYPE_UINT8_T, 0, 14, offsetof(mavlink_digicam_configure_t, extra_param) }, \
  39. { "extra_value", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_digicam_configure_t, extra_value) }, \
  40. } \
  41. }
  42. #else
  43. #define MAVLINK_MESSAGE_INFO_DIGICAM_CONFIGURE { \
  44. "DIGICAM_CONFIGURE", \
  45. 11, \
  46. { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_digicam_configure_t, target_system) }, \
  47. { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 7, offsetof(mavlink_digicam_configure_t, target_component) }, \
  48. { "mode", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_digicam_configure_t, mode) }, \
  49. { "shutter_speed", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_digicam_configure_t, shutter_speed) }, \
  50. { "aperture", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_digicam_configure_t, aperture) }, \
  51. { "iso", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_digicam_configure_t, iso) }, \
  52. { "exposure_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_digicam_configure_t, exposure_type) }, \
  53. { "command_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 12, offsetof(mavlink_digicam_configure_t, command_id) }, \
  54. { "engine_cut_off", NULL, MAVLINK_TYPE_UINT8_T, 0, 13, offsetof(mavlink_digicam_configure_t, engine_cut_off) }, \
  55. { "extra_param", NULL, MAVLINK_TYPE_UINT8_T, 0, 14, offsetof(mavlink_digicam_configure_t, extra_param) }, \
  56. { "extra_value", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_digicam_configure_t, extra_value) }, \
  57. } \
  58. }
  59. #endif
  60. /**
  61. * @brief Pack a digicam_configure message
  62. * @param system_id ID of this system
  63. * @param component_id ID of this component (e.g. 200 for IMU)
  64. * @param msg The MAVLink message to compress the data into
  65. *
  66. * @param target_system System ID.
  67. * @param target_component Component ID.
  68. * @param mode Mode enumeration from 1 to N //P, TV, AV, M, etc. (0 means ignore).
  69. * @param shutter_speed Divisor number //e.g. 1000 means 1/1000 (0 means ignore).
  70. * @param aperture F stop number x 10 //e.g. 28 means 2.8 (0 means ignore).
  71. * @param iso ISO enumeration from 1 to N //e.g. 80, 100, 200, Etc (0 means ignore).
  72. * @param exposure_type Exposure type enumeration from 1 to N (0 means ignore).
  73. * @param command_id Command Identity (incremental loop: 0 to 255). //A command sent multiple times will be executed or pooled just once.
  74. * @param engine_cut_off [ds] Main engine cut-off time before camera trigger (0 means no cut-off).
  75. * @param extra_param Extra parameters enumeration (0 means ignore).
  76. * @param extra_value Correspondent value to given extra_param.
  77. * @return length of the message in bytes (excluding serial stream start sign)
  78. */
  79. static inline uint16_t mavlink_msg_digicam_configure_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
  80. uint8_t target_system, uint8_t target_component, uint8_t mode, uint16_t shutter_speed, uint8_t aperture, uint8_t iso, uint8_t exposure_type, uint8_t command_id, uint8_t engine_cut_off, uint8_t extra_param, float extra_value)
  81. {
  82. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  83. char buf[MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN];
  84. _mav_put_float(buf, 0, extra_value);
  85. _mav_put_uint16_t(buf, 4, shutter_speed);
  86. _mav_put_uint8_t(buf, 6, target_system);
  87. _mav_put_uint8_t(buf, 7, target_component);
  88. _mav_put_uint8_t(buf, 8, mode);
  89. _mav_put_uint8_t(buf, 9, aperture);
  90. _mav_put_uint8_t(buf, 10, iso);
  91. _mav_put_uint8_t(buf, 11, exposure_type);
  92. _mav_put_uint8_t(buf, 12, command_id);
  93. _mav_put_uint8_t(buf, 13, engine_cut_off);
  94. _mav_put_uint8_t(buf, 14, extra_param);
  95. memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN);
  96. #else
  97. mavlink_digicam_configure_t packet;
  98. packet.extra_value = extra_value;
  99. packet.shutter_speed = shutter_speed;
  100. packet.target_system = target_system;
  101. packet.target_component = target_component;
  102. packet.mode = mode;
  103. packet.aperture = aperture;
  104. packet.iso = iso;
  105. packet.exposure_type = exposure_type;
  106. packet.command_id = command_id;
  107. packet.engine_cut_off = engine_cut_off;
  108. packet.extra_param = extra_param;
  109. memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN);
  110. #endif
  111. msg->msgid = MAVLINK_MSG_ID_DIGICAM_CONFIGURE;
  112. return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_MIN_LEN, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_CRC);
  113. }
  114. /**
  115. * @brief Pack a digicam_configure message on a channel
  116. * @param system_id ID of this system
  117. * @param component_id ID of this component (e.g. 200 for IMU)
  118. * @param chan The MAVLink channel this message will be sent over
  119. * @param msg The MAVLink message to compress the data into
  120. * @param target_system System ID.
  121. * @param target_component Component ID.
  122. * @param mode Mode enumeration from 1 to N //P, TV, AV, M, etc. (0 means ignore).
  123. * @param shutter_speed Divisor number //e.g. 1000 means 1/1000 (0 means ignore).
  124. * @param aperture F stop number x 10 //e.g. 28 means 2.8 (0 means ignore).
  125. * @param iso ISO enumeration from 1 to N //e.g. 80, 100, 200, Etc (0 means ignore).
  126. * @param exposure_type Exposure type enumeration from 1 to N (0 means ignore).
  127. * @param command_id Command Identity (incremental loop: 0 to 255). //A command sent multiple times will be executed or pooled just once.
  128. * @param engine_cut_off [ds] Main engine cut-off time before camera trigger (0 means no cut-off).
  129. * @param extra_param Extra parameters enumeration (0 means ignore).
  130. * @param extra_value Correspondent value to given extra_param.
  131. * @return length of the message in bytes (excluding serial stream start sign)
  132. */
  133. static inline uint16_t mavlink_msg_digicam_configure_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
  134. mavlink_message_t* msg,
  135. uint8_t target_system,uint8_t target_component,uint8_t mode,uint16_t shutter_speed,uint8_t aperture,uint8_t iso,uint8_t exposure_type,uint8_t command_id,uint8_t engine_cut_off,uint8_t extra_param,float extra_value)
  136. {
  137. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  138. char buf[MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN];
  139. _mav_put_float(buf, 0, extra_value);
  140. _mav_put_uint16_t(buf, 4, shutter_speed);
  141. _mav_put_uint8_t(buf, 6, target_system);
  142. _mav_put_uint8_t(buf, 7, target_component);
  143. _mav_put_uint8_t(buf, 8, mode);
  144. _mav_put_uint8_t(buf, 9, aperture);
  145. _mav_put_uint8_t(buf, 10, iso);
  146. _mav_put_uint8_t(buf, 11, exposure_type);
  147. _mav_put_uint8_t(buf, 12, command_id);
  148. _mav_put_uint8_t(buf, 13, engine_cut_off);
  149. _mav_put_uint8_t(buf, 14, extra_param);
  150. memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN);
  151. #else
  152. mavlink_digicam_configure_t packet;
  153. packet.extra_value = extra_value;
  154. packet.shutter_speed = shutter_speed;
  155. packet.target_system = target_system;
  156. packet.target_component = target_component;
  157. packet.mode = mode;
  158. packet.aperture = aperture;
  159. packet.iso = iso;
  160. packet.exposure_type = exposure_type;
  161. packet.command_id = command_id;
  162. packet.engine_cut_off = engine_cut_off;
  163. packet.extra_param = extra_param;
  164. memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN);
  165. #endif
  166. msg->msgid = MAVLINK_MSG_ID_DIGICAM_CONFIGURE;
  167. return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_MIN_LEN, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_CRC);
  168. }
  169. /**
  170. * @brief Encode a digicam_configure struct
  171. *
  172. * @param system_id ID of this system
  173. * @param component_id ID of this component (e.g. 200 for IMU)
  174. * @param msg The MAVLink message to compress the data into
  175. * @param digicam_configure C-struct to read the message contents from
  176. */
  177. static inline uint16_t mavlink_msg_digicam_configure_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_digicam_configure_t* digicam_configure)
  178. {
  179. return mavlink_msg_digicam_configure_pack(system_id, component_id, msg, digicam_configure->target_system, digicam_configure->target_component, digicam_configure->mode, digicam_configure->shutter_speed, digicam_configure->aperture, digicam_configure->iso, digicam_configure->exposure_type, digicam_configure->command_id, digicam_configure->engine_cut_off, digicam_configure->extra_param, digicam_configure->extra_value);
  180. }
  181. /**
  182. * @brief Encode a digicam_configure struct on a channel
  183. *
  184. * @param system_id ID of this system
  185. * @param component_id ID of this component (e.g. 200 for IMU)
  186. * @param chan The MAVLink channel this message will be sent over
  187. * @param msg The MAVLink message to compress the data into
  188. * @param digicam_configure C-struct to read the message contents from
  189. */
  190. static inline uint16_t mavlink_msg_digicam_configure_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_digicam_configure_t* digicam_configure)
  191. {
  192. return mavlink_msg_digicam_configure_pack_chan(system_id, component_id, chan, msg, digicam_configure->target_system, digicam_configure->target_component, digicam_configure->mode, digicam_configure->shutter_speed, digicam_configure->aperture, digicam_configure->iso, digicam_configure->exposure_type, digicam_configure->command_id, digicam_configure->engine_cut_off, digicam_configure->extra_param, digicam_configure->extra_value);
  193. }
  194. /**
  195. * @brief Send a digicam_configure message
  196. * @param chan MAVLink channel to send the message
  197. *
  198. * @param target_system System ID.
  199. * @param target_component Component ID.
  200. * @param mode Mode enumeration from 1 to N //P, TV, AV, M, etc. (0 means ignore).
  201. * @param shutter_speed Divisor number //e.g. 1000 means 1/1000 (0 means ignore).
  202. * @param aperture F stop number x 10 //e.g. 28 means 2.8 (0 means ignore).
  203. * @param iso ISO enumeration from 1 to N //e.g. 80, 100, 200, Etc (0 means ignore).
  204. * @param exposure_type Exposure type enumeration from 1 to N (0 means ignore).
  205. * @param command_id Command Identity (incremental loop: 0 to 255). //A command sent multiple times will be executed or pooled just once.
  206. * @param engine_cut_off [ds] Main engine cut-off time before camera trigger (0 means no cut-off).
  207. * @param extra_param Extra parameters enumeration (0 means ignore).
  208. * @param extra_value Correspondent value to given extra_param.
  209. */
  210. #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
  211. static inline void mavlink_msg_digicam_configure_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t mode, uint16_t shutter_speed, uint8_t aperture, uint8_t iso, uint8_t exposure_type, uint8_t command_id, uint8_t engine_cut_off, uint8_t extra_param, float extra_value)
  212. {
  213. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  214. char buf[MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN];
  215. _mav_put_float(buf, 0, extra_value);
  216. _mav_put_uint16_t(buf, 4, shutter_speed);
  217. _mav_put_uint8_t(buf, 6, target_system);
  218. _mav_put_uint8_t(buf, 7, target_component);
  219. _mav_put_uint8_t(buf, 8, mode);
  220. _mav_put_uint8_t(buf, 9, aperture);
  221. _mav_put_uint8_t(buf, 10, iso);
  222. _mav_put_uint8_t(buf, 11, exposure_type);
  223. _mav_put_uint8_t(buf, 12, command_id);
  224. _mav_put_uint8_t(buf, 13, engine_cut_off);
  225. _mav_put_uint8_t(buf, 14, extra_param);
  226. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIGICAM_CONFIGURE, buf, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_MIN_LEN, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_CRC);
  227. #else
  228. mavlink_digicam_configure_t packet;
  229. packet.extra_value = extra_value;
  230. packet.shutter_speed = shutter_speed;
  231. packet.target_system = target_system;
  232. packet.target_component = target_component;
  233. packet.mode = mode;
  234. packet.aperture = aperture;
  235. packet.iso = iso;
  236. packet.exposure_type = exposure_type;
  237. packet.command_id = command_id;
  238. packet.engine_cut_off = engine_cut_off;
  239. packet.extra_param = extra_param;
  240. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIGICAM_CONFIGURE, (const char *)&packet, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_MIN_LEN, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_CRC);
  241. #endif
  242. }
  243. /**
  244. * @brief Send a digicam_configure message
  245. * @param chan MAVLink channel to send the message
  246. * @param struct The MAVLink struct to serialize
  247. */
  248. static inline void mavlink_msg_digicam_configure_send_struct(mavlink_channel_t chan, const mavlink_digicam_configure_t* digicam_configure)
  249. {
  250. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  251. mavlink_msg_digicam_configure_send(chan, digicam_configure->target_system, digicam_configure->target_component, digicam_configure->mode, digicam_configure->shutter_speed, digicam_configure->aperture, digicam_configure->iso, digicam_configure->exposure_type, digicam_configure->command_id, digicam_configure->engine_cut_off, digicam_configure->extra_param, digicam_configure->extra_value);
  252. #else
  253. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIGICAM_CONFIGURE, (const char *)digicam_configure, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_MIN_LEN, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_CRC);
  254. #endif
  255. }
  256. #if MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN <= MAVLINK_MAX_PAYLOAD_LEN
  257. /*
  258. This varient of _send() can be used to save stack space by re-using
  259. memory from the receive buffer. The caller provides a
  260. mavlink_message_t which is the size of a full mavlink message. This
  261. is usually the receive buffer for the channel, and allows a reply to an
  262. incoming message with minimum stack space usage.
  263. */
  264. static inline void mavlink_msg_digicam_configure_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t mode, uint16_t shutter_speed, uint8_t aperture, uint8_t iso, uint8_t exposure_type, uint8_t command_id, uint8_t engine_cut_off, uint8_t extra_param, float extra_value)
  265. {
  266. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  267. char *buf = (char *)msgbuf;
  268. _mav_put_float(buf, 0, extra_value);
  269. _mav_put_uint16_t(buf, 4, shutter_speed);
  270. _mav_put_uint8_t(buf, 6, target_system);
  271. _mav_put_uint8_t(buf, 7, target_component);
  272. _mav_put_uint8_t(buf, 8, mode);
  273. _mav_put_uint8_t(buf, 9, aperture);
  274. _mav_put_uint8_t(buf, 10, iso);
  275. _mav_put_uint8_t(buf, 11, exposure_type);
  276. _mav_put_uint8_t(buf, 12, command_id);
  277. _mav_put_uint8_t(buf, 13, engine_cut_off);
  278. _mav_put_uint8_t(buf, 14, extra_param);
  279. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIGICAM_CONFIGURE, buf, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_MIN_LEN, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_CRC);
  280. #else
  281. mavlink_digicam_configure_t *packet = (mavlink_digicam_configure_t *)msgbuf;
  282. packet->extra_value = extra_value;
  283. packet->shutter_speed = shutter_speed;
  284. packet->target_system = target_system;
  285. packet->target_component = target_component;
  286. packet->mode = mode;
  287. packet->aperture = aperture;
  288. packet->iso = iso;
  289. packet->exposure_type = exposure_type;
  290. packet->command_id = command_id;
  291. packet->engine_cut_off = engine_cut_off;
  292. packet->extra_param = extra_param;
  293. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DIGICAM_CONFIGURE, (const char *)packet, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_MIN_LEN, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_CRC);
  294. #endif
  295. }
  296. #endif
  297. #endif
  298. // MESSAGE DIGICAM_CONFIGURE UNPACKING
  299. /**
  300. * @brief Get field target_system from digicam_configure message
  301. *
  302. * @return System ID.
  303. */
  304. static inline uint8_t mavlink_msg_digicam_configure_get_target_system(const mavlink_message_t* msg)
  305. {
  306. return _MAV_RETURN_uint8_t(msg, 6);
  307. }
  308. /**
  309. * @brief Get field target_component from digicam_configure message
  310. *
  311. * @return Component ID.
  312. */
  313. static inline uint8_t mavlink_msg_digicam_configure_get_target_component(const mavlink_message_t* msg)
  314. {
  315. return _MAV_RETURN_uint8_t(msg, 7);
  316. }
  317. /**
  318. * @brief Get field mode from digicam_configure message
  319. *
  320. * @return Mode enumeration from 1 to N //P, TV, AV, M, etc. (0 means ignore).
  321. */
  322. static inline uint8_t mavlink_msg_digicam_configure_get_mode(const mavlink_message_t* msg)
  323. {
  324. return _MAV_RETURN_uint8_t(msg, 8);
  325. }
  326. /**
  327. * @brief Get field shutter_speed from digicam_configure message
  328. *
  329. * @return Divisor number //e.g. 1000 means 1/1000 (0 means ignore).
  330. */
  331. static inline uint16_t mavlink_msg_digicam_configure_get_shutter_speed(const mavlink_message_t* msg)
  332. {
  333. return _MAV_RETURN_uint16_t(msg, 4);
  334. }
  335. /**
  336. * @brief Get field aperture from digicam_configure message
  337. *
  338. * @return F stop number x 10 //e.g. 28 means 2.8 (0 means ignore).
  339. */
  340. static inline uint8_t mavlink_msg_digicam_configure_get_aperture(const mavlink_message_t* msg)
  341. {
  342. return _MAV_RETURN_uint8_t(msg, 9);
  343. }
  344. /**
  345. * @brief Get field iso from digicam_configure message
  346. *
  347. * @return ISO enumeration from 1 to N //e.g. 80, 100, 200, Etc (0 means ignore).
  348. */
  349. static inline uint8_t mavlink_msg_digicam_configure_get_iso(const mavlink_message_t* msg)
  350. {
  351. return _MAV_RETURN_uint8_t(msg, 10);
  352. }
  353. /**
  354. * @brief Get field exposure_type from digicam_configure message
  355. *
  356. * @return Exposure type enumeration from 1 to N (0 means ignore).
  357. */
  358. static inline uint8_t mavlink_msg_digicam_configure_get_exposure_type(const mavlink_message_t* msg)
  359. {
  360. return _MAV_RETURN_uint8_t(msg, 11);
  361. }
  362. /**
  363. * @brief Get field command_id from digicam_configure message
  364. *
  365. * @return Command Identity (incremental loop: 0 to 255). //A command sent multiple times will be executed or pooled just once.
  366. */
  367. static inline uint8_t mavlink_msg_digicam_configure_get_command_id(const mavlink_message_t* msg)
  368. {
  369. return _MAV_RETURN_uint8_t(msg, 12);
  370. }
  371. /**
  372. * @brief Get field engine_cut_off from digicam_configure message
  373. *
  374. * @return [ds] Main engine cut-off time before camera trigger (0 means no cut-off).
  375. */
  376. static inline uint8_t mavlink_msg_digicam_configure_get_engine_cut_off(const mavlink_message_t* msg)
  377. {
  378. return _MAV_RETURN_uint8_t(msg, 13);
  379. }
  380. /**
  381. * @brief Get field extra_param from digicam_configure message
  382. *
  383. * @return Extra parameters enumeration (0 means ignore).
  384. */
  385. static inline uint8_t mavlink_msg_digicam_configure_get_extra_param(const mavlink_message_t* msg)
  386. {
  387. return _MAV_RETURN_uint8_t(msg, 14);
  388. }
  389. /**
  390. * @brief Get field extra_value from digicam_configure message
  391. *
  392. * @return Correspondent value to given extra_param.
  393. */
  394. static inline float mavlink_msg_digicam_configure_get_extra_value(const mavlink_message_t* msg)
  395. {
  396. return _MAV_RETURN_float(msg, 0);
  397. }
  398. /**
  399. * @brief Decode a digicam_configure message into a struct
  400. *
  401. * @param msg The message to decode
  402. * @param digicam_configure C-struct to decode the message contents into
  403. */
  404. static inline void mavlink_msg_digicam_configure_decode(const mavlink_message_t* msg, mavlink_digicam_configure_t* digicam_configure)
  405. {
  406. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  407. digicam_configure->extra_value = mavlink_msg_digicam_configure_get_extra_value(msg);
  408. digicam_configure->shutter_speed = mavlink_msg_digicam_configure_get_shutter_speed(msg);
  409. digicam_configure->target_system = mavlink_msg_digicam_configure_get_target_system(msg);
  410. digicam_configure->target_component = mavlink_msg_digicam_configure_get_target_component(msg);
  411. digicam_configure->mode = mavlink_msg_digicam_configure_get_mode(msg);
  412. digicam_configure->aperture = mavlink_msg_digicam_configure_get_aperture(msg);
  413. digicam_configure->iso = mavlink_msg_digicam_configure_get_iso(msg);
  414. digicam_configure->exposure_type = mavlink_msg_digicam_configure_get_exposure_type(msg);
  415. digicam_configure->command_id = mavlink_msg_digicam_configure_get_command_id(msg);
  416. digicam_configure->engine_cut_off = mavlink_msg_digicam_configure_get_engine_cut_off(msg);
  417. digicam_configure->extra_param = mavlink_msg_digicam_configure_get_extra_param(msg);
  418. #else
  419. uint8_t len = msg->len < MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN? msg->len : MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN;
  420. memset(digicam_configure, 0, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN);
  421. memcpy(digicam_configure, _MAV_PAYLOAD(msg), len);
  422. #endif
  423. }