2017-08-18 19:42:25 -03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <GCS_MAVLink/GCS_MAVLink.h>
|
|
|
|
|
2020-09-23 12:09:28 -03:00
|
|
|
class PACKED AP_FWVersion {
|
2018-06-13 07:28:40 -03:00
|
|
|
|
|
|
|
public:
|
2020-09-23 12:09:28 -03:00
|
|
|
/**
|
|
|
|
* @brief Struct to hold infomation about the software version struct
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
// First 7 MSBs are a start sequence, LSB is a checksum
|
|
|
|
const uint64_t header;
|
|
|
|
// MSB (major version breaks compatibility), LSB (minor version no compatibility break)
|
|
|
|
const uint16_t header_version;
|
|
|
|
// Pointer size to extract pointer values
|
|
|
|
const uint8_t pointer_size;
|
|
|
|
|
|
|
|
const uint8_t reserved; // padding
|
|
|
|
const uint8_t vehicle_type;
|
|
|
|
const uint8_t board_type;
|
|
|
|
const uint16_t board_subtype;
|
2020-09-23 10:00:27 -03:00
|
|
|
const uint8_t major;
|
|
|
|
const uint8_t minor;
|
|
|
|
const uint8_t patch;
|
2020-09-23 12:09:28 -03:00
|
|
|
const uint8_t fw_type; /*FIRMWARE_VERSION_TYPE*/
|
|
|
|
const uint32_t os_sw_version;
|
2017-08-18 19:42:25 -03:00
|
|
|
const char *fw_string;
|
2017-09-05 02:56:19 -03:00
|
|
|
const char *fw_hash_str;
|
2021-06-01 17:40:51 -03:00
|
|
|
const char *fw_short_string;
|
2018-06-13 07:28:40 -03:00
|
|
|
const char *middleware_name;
|
2017-09-05 02:56:19 -03:00
|
|
|
const char *middleware_hash_str;
|
2018-06-13 07:28:40 -03:00
|
|
|
const char *os_name;
|
2017-09-05 02:56:19 -03:00
|
|
|
const char *os_hash_str;
|
2018-06-13 07:28:40 -03:00
|
|
|
|
|
|
|
static const AP_FWVersion &get_fwverz() { return fwver; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
static const AP_FWVersion fwver;
|
|
|
|
};
|
|
|
|
|
|
|
|
namespace AP {
|
|
|
|
const AP_FWVersion &fwversion();
|
|
|
|
};
|