mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
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();
|
const AP_HAL::HAL& hal = AP_HAL::get_HAL();
|
||||||
|
|
||||||
Tracker::Tracker(void)
|
Tracker::Tracker(void)
|
||||||
: DataFlash{FIRMWARE_STRING, g.log_bitmask}
|
: DataFlash{fwver.fw_string, g.log_bitmask}
|
||||||
{
|
{
|
||||||
memset(¤t_loc, 0, sizeof(current_loc));
|
memset(¤t_loc, 0, sizeof(current_loc));
|
||||||
memset(&vehicle, 0, sizeof(vehicle));
|
memset(&vehicle, 0, sizeof(vehicle));
|
||||||
|
@ -70,6 +70,7 @@
|
|||||||
#include "Parameters.h"
|
#include "Parameters.h"
|
||||||
#include "GCS_Mavlink.h"
|
#include "GCS_Mavlink.h"
|
||||||
#include "GCS_Tracker.h"
|
#include "GCS_Tracker.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
|
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
|
||||||
#include <SITL/SITL.h>
|
#include <SITL/SITL.h>
|
||||||
@ -83,6 +84,18 @@ public:
|
|||||||
|
|
||||||
Tracker(void);
|
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.
|
// HAL::Callbacks implementation.
|
||||||
void setup() override;
|
void setup() override;
|
||||||
void loop() override;
|
void loop() override;
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ap_version.h"
|
#include "AP_Common/AP_FWVersion.h"
|
||||||
|
|
||||||
#define THISFIRMWARE "AntennaTracker V1.0.0"
|
#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
|
#define FIRMWARE_VERSION 1,0,0,FIRMWARE_VERSION_TYPE_BETA
|
||||||
|
|
||||||
#ifndef GIT_VERSION
|
#define FW_MAJOR 1
|
||||||
#define FIRMWARE_STRING THISFIRMWARE
|
#define FW_MINOR 0
|
||||||
#else
|
#define FW_PATCH 0
|
||||||
#define FIRMWARE_STRING THISFIRMWARE " (" GIT_VERSION ")"
|
#define FW_TYPE FIRMWARE_VERSION_TYPE_BETA
|
||||||
#endif
|
|
||||||
|
Loading…
Reference in New Issue
Block a user