From be4f2f0c794a5e04bbd52a2a8ee331080c6aa450 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Tue, 22 Sep 2020 19:33:34 -0300 Subject: [PATCH] AP_Periph: Use new AP_FWVersionDefine header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- Tools/AP_Periph/version.cpp | 49 ++----------------------------------- 1 file changed, 2 insertions(+), 47 deletions(-) diff --git a/Tools/AP_Periph/version.cpp b/Tools/AP_Periph/version.cpp index e616abd704..f557ce9f89 100644 --- a/Tools/AP_Periph/version.cpp +++ b/Tools/AP_Periph/version.cpp @@ -1,49 +1,4 @@ -/* - * This file is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This file is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - #define FORCE_VERSION_H_INCLUDE #include "version.h" -#undef FORCE_VERSION_H_INCLUDE - -#include - -const AP_FWVersion AP_FWVersion::fwver{ - .major = FW_MAJOR, - .minor = FW_MINOR, - .patch = FW_PATCH, - .fw_type = FW_TYPE, -#ifndef GIT_VERSION - .fw_string = THISFIRMWARE, - .fw_hash_str = "", -#else - .fw_string = THISFIRMWARE " (" GIT_VERSION ")", - .fw_hash_str = GIT_VERSION, -#endif - .middleware_name = nullptr, - .middleware_hash_str = nullptr, -#ifdef CHIBIOS_GIT_VERSION - .os_name = "ChibiOS", - .os_hash_str = CHIBIOS_GIT_VERSION, -#else - .os_name = nullptr, - .os_hash_str = nullptr, -#endif -#ifdef BUILD_DATE_YEAR - // encode build date in os_sw_version - .os_sw_version = (BUILD_DATE_YEAR*100*100) + (BUILD_DATE_MONTH*100) + BUILD_DATE_DAY, -#else - .os_sw_version = 0, -#endif -}; +#include +#undef FORCE_VERSION_H_INCLUDE \ No newline at end of file