AP_Periph: fixed version handling in periph

This commit is contained in:
Andrew Tridgell 2024-01-13 12:22:22 +11:00 committed by Tom Pittenger
parent 60c69d052b
commit c59287bf9b
2 changed files with 13 additions and 7 deletions

View File

@ -1,4 +1,3 @@
#define FORCE_VERSION_H_INCLUDE
#include "version.h"
#include <AP_Common/AP_FWVersionDefine.h>
#undef FORCE_VERSION_H_INCLUDE
#undef FORCE_VERSION_H_INCLUDE

View File

@ -1,9 +1,19 @@
#pragma once
#include <GCS_MAVLink/GCS_MAVLink.h>
#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 <AP_Common/AP_FWVersionDefine.h>