mirror of https://github.com/ArduPilot/ardupilot
Tracker: add constant structure holding firmware version
This commit is contained in:
parent
ae9891d291
commit
0177e959c9
|
@ -125,7 +125,7 @@ void Tracker::ten_hz_logging_loop()
|
|||
const AP_HAL::HAL& hal = AP_HAL::get_HAL();
|
||||
|
||||
Tracker::Tracker(void)
|
||||
: DataFlash{FIRMWARE_STRING, g.log_bitmask}
|
||||
: DataFlash{fwver.fw_string, g.log_bitmask}
|
||||
{
|
||||
memset(¤t_loc, 0, sizeof(current_loc));
|
||||
memset(&vehicle, 0, sizeof(vehicle));
|
||||
|
|
|
@ -70,6 +70,7 @@
|
|||
#include "Parameters.h"
|
||||
#include "GCS_Mavlink.h"
|
||||
#include "GCS_Tracker.h"
|
||||
#include "version.h"
|
||||
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
|
||||
#include <SITL/SITL.h>
|
||||
|
@ -83,6 +84,18 @@ public:
|
|||
|
||||
Tracker(void);
|
||||
|
||||
const AP_FWVersion fwver {
|
||||
major: FW_MAJOR,
|
||||
minor: FW_MINOR,
|
||||
patch: FW_PATCH,
|
||||
fw_type: FW_TYPE,
|
||||
#ifndef GIT_VERSION
|
||||
fw_string: THISFIRMWARE
|
||||
#else
|
||||
fw_string: THISFIRMWARE " (" GIT_VERSION ")"
|
||||
#endif
|
||||
};
|
||||
|
||||
// HAL::Callbacks implementation.
|
||||
void setup() override;
|
||||
void loop() override;
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
#include "ap_version.h"
|
||||
#include "AP_Common/AP_FWVersion.h"
|
||||
|
||||
#define THISFIRMWARE "AntennaTracker V1.0.0"
|
||||
|
||||
// the following line is parsed by the autotest scripts
|
||||
#define FIRMWARE_VERSION 1,0,0,FIRMWARE_VERSION_TYPE_BETA
|
||||
|
||||
#ifndef GIT_VERSION
|
||||
#define FIRMWARE_STRING THISFIRMWARE
|
||||
#else
|
||||
#define FIRMWARE_STRING THISFIRMWARE " (" GIT_VERSION ")"
|
||||
#endif
|
||||
#define FW_MAJOR 1
|
||||
#define FW_MINOR 0
|
||||
#define FW_PATCH 0
|
||||
#define FW_TYPE FIRMWARE_VERSION_TYPE_BETA
|
||||
|
|
Loading…
Reference in New Issue