diff --git a/Tools/AP_Periph/version.cpp b/Tools/AP_Periph/version.cpp index f557ce9f89..e38ffded0c 100644 --- a/Tools/AP_Periph/version.cpp +++ b/Tools/AP_Periph/version.cpp @@ -1,4 +1,3 @@ #define FORCE_VERSION_H_INCLUDE #include "version.h" -#include -#undef FORCE_VERSION_H_INCLUDE \ No newline at end of file +#undef FORCE_VERSION_H_INCLUDE diff --git a/Tools/AP_Periph/version.h b/Tools/AP_Periph/version.h index 090841e1d5..6166fba32d 100644 --- a/Tools/AP_Periph/version.h +++ b/Tools/AP_Periph/version.h @@ -1,9 +1,19 @@ #pragma once -#include +#ifndef FORCE_VERSION_H_INCLUDE +#error version.h should never be included directly. You probably want to include AP_Common/AP_FWVersion.h +#endif + +#include "ap_version.h" #define THISFIRMWARE "AP_Periph V1.7.0-dev" +// defines needed due to lack of GCS includes +#define FIRMWARE_VERSION_TYPE_DEV 0 +#define FIRMWARE_VERSION_TYPE_BETA 255 +#define FIRMWARE_VERSION_TYPE_OFFICIAL 255 + + // the following line is parsed by the autotest scripts #define FIRMWARE_VERSION 1,7,0,FIRMWARE_VERSION_TYPE_DEV @@ -12,7 +22,4 @@ #define FW_PATCH 0 #define FW_TYPE FIRMWARE_VERSION_TYPE_DEV - - - - +#include