Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/master/libraries/AP_Common/AP_FWVersionDefine.h
Views: 1798
/*1* This file is free software: you can redistribute it and/or modify it2* under the terms of the GNU General Public License as published by the3* Free Software Foundation, either version 3 of the License, or4* (at your option) any later version.5*6* This file is distributed in the hope that it will be useful, but7* WITHOUT ANY WARRANTY; without even the implied warranty of8* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.9* See the GNU General Public License for more details.10*11* You should have received a copy of the GNU General Public License along12* with this program. If not, see <http://www.gnu.org/licenses/>.13*/1415// this include file *defines* the structure holding the version information for the ArduPilot binary. It must only be16// included in a single place, thus the following protection:1718#ifndef FORCE_VERSION_H_INCLUDE19#error AP_FWVersionDefine.h should never be included directly. You probably want to include AP_Common/AP_FWVersion.h20#endif2122#include <AP_Common/AP_FWVersion.h>23#include <AP_Vehicle/AP_Vehicle_Type.h>2425/*26allow vendors to set AP_CUSTOM_FIRMWARE_STRING in hwdef.dat27*/28#ifdef AP_CUSTOM_FIRMWARE_STRING29#define ACTIVE_FWSTR AP_CUSTOM_FIRMWARE_STRING30#define ORIGINAL_FWSTR THISFIRMWARE31#else32#define ACTIVE_FWSTR THISFIRMWARE33#define ORIGINAL_FWSTR nullptr34#endif3536/**37* The version number should be used when the structure is updated38* Major: For breaking changes of the structure39* Minor: For new fields that does not brake the structure or corrections40*/41const AP_FWVersion AP_FWVersion::fwver{42// Version header struct43.header = 0x61706677766572fb, // First 7 MSBs: "apfwver", LSB is the checksum of the previous string: 0xfb44.header_version = 0x0200U, // Major and minor version45.pointer_size = static_cast<uint8_t>(sizeof(void*)),46.reserved = 0,47.vehicle_type = static_cast<uint8_t>(APM_BUILD_DIRECTORY),48.board_type = static_cast<uint8_t>(CONFIG_HAL_BOARD),49.board_subtype = static_cast<uint16_t>(CONFIG_HAL_BOARD_SUBTYPE),50.major = FW_MAJOR,51.minor = FW_MINOR,52.patch = FW_PATCH,53.fw_type = FW_TYPE,54#ifdef BUILD_DATE_YEAR55// encode build date in os_sw_version56.os_sw_version = (BUILD_DATE_YEAR*100*100) + (BUILD_DATE_MONTH*100) + BUILD_DATE_DAY,57#else58.os_sw_version = 0,59#endif60#ifndef GIT_VERSION61.fw_string = ACTIVE_FWSTR,62.fw_hash_str = "",63#else64.fw_string = ACTIVE_FWSTR " (" GIT_VERSION ")",65.fw_hash_str = GIT_VERSION,66#endif67#ifndef GIT_VERSION_INT68.fw_hash = 0,69#else70.fw_hash = GIT_VERSION_INT,71#endif72.fw_string_original = ORIGINAL_FWSTR,73.fw_short_string = ACTIVE_FWSTR,74.middleware_name = nullptr,75.middleware_hash_str = nullptr,76#ifdef CHIBIOS_GIT_VERSION77.os_name = "ChibiOS",78.os_hash_str = CHIBIOS_GIT_VERSION,79#else80.os_name = nullptr,81.os_hash_str = nullptr,82#endif83};848586