LCOV - code coverage report
Current view: top level - AP_Common - AP_FWVersion.h (source / functions) Hit Total Coverage
Test: lcov.info Lines: 1 1 100.0 %
Date: 2026-09-09 11:02:08 Functions: 1 1 100.0 %

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include <stdint.h>
       4             : #include <AP_Common/AP_Common.h>
       5             : #include <AP_HAL/AP_HAL_Boards.h>
       6             : 
       7             : class PACKED AP_FWVersion {
       8             : 
       9             : public:
      10             :     /**
      11             :      * @brief Struct to hold infomation about the software version struct
      12             :      *
      13             :      */
      14             :     // First 7 MSBs are a start sequence, LSB is a checksum
      15             :     const uint64_t header;
      16             :     // MSB (major version breaks compatibility), LSB (minor version no compatibility break)
      17             :     const uint16_t header_version;
      18             :     // Pointer size to extract pointer values
      19             :     const uint8_t pointer_size;
      20             : 
      21             :     const uint8_t reserved; // padding
      22             :     const uint8_t vehicle_type;
      23             :     const uint8_t board_type;
      24             :     const uint16_t board_subtype;
      25             :     const uint8_t major;
      26             :     const uint8_t minor;
      27             :     const uint8_t patch;
      28             :     const uint8_t fw_type; /*FIRMWARE_VERSION_TYPE*/
      29             :     const uint32_t os_sw_version;
      30             :     const char *fw_string;
      31             :     const char *fw_hash_str;
      32             :     const uint32_t fw_hash;
      33             :     const char *fw_string_original;
      34             :     const char *fw_short_string;
      35             :     const char *middleware_name;
      36             :     const char *middleware_hash_str;
      37             :     const char *os_name;
      38             :     const char *os_hash_str;
      39             : 
      40        7279 :     static const AP_FWVersion &get_fwverz() { return fwver; }
      41             : 
      42             : private:
      43             : 
      44             :     static const AP_FWVersion fwver;
      45             : };
      46             : 
      47             : namespace AP {
      48             :     const AP_FWVersion &fwversion();
      49             : };

Generated by: LCOV version 1.14