mirror of https://github.com/ArduPilot/ardupilot
Tracker: use AP_FWVersion singleton
This commit is contained in:
parent
485cafb343
commit
1a1ae54e07
|
@ -136,7 +136,7 @@ void Tracker::ten_hz_logging_loop()
|
|||
const AP_HAL::HAL& hal = AP_HAL::get_HAL();
|
||||
|
||||
Tracker::Tracker(void)
|
||||
: DataFlash(fwver.fw_string, g.log_bitmask)
|
||||
: DataFlash(g.log_bitmask)
|
||||
{
|
||||
memset(¤t_loc, 0, sizeof(current_loc));
|
||||
memset(&vehicle, 0, sizeof(vehicle));
|
||||
|
|
|
@ -665,11 +665,6 @@ bool GCS_MAVLINK_Tracker::set_mode(uint8_t mode)
|
|||
return false;
|
||||
}
|
||||
|
||||
const AP_FWVersion &GCS_MAVLINK_Tracker::get_fwver() const
|
||||
{
|
||||
return tracker.fwver;
|
||||
}
|
||||
|
||||
/* dummy methods to avoid having to link against AP_Camera */
|
||||
void AP_Camera::control_msg(mavlink_message_t const*) {}
|
||||
void AP_Camera::configure(float, float, float, float, float, float, float) {}
|
||||
|
|
|
@ -18,7 +18,6 @@ protected:
|
|||
AP_Mission *get_mission() override { return nullptr; };
|
||||
AP_Rally *get_rally() const override { return nullptr; };
|
||||
AP_Camera *get_camera() const override { return nullptr; };
|
||||
const AP_FWVersion &get_fwver() const override;
|
||||
|
||||
uint8_t sysid_my_gcs() const override;
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ void Tracker::init_tracker()
|
|||
serial_manager.init_console();
|
||||
|
||||
hal.console->printf("\n\nInit %s\n\nFree RAM: %u\n",
|
||||
fwver.fw_string,
|
||||
AP::fwversion().fw_string,
|
||||
(unsigned)hal.util->available_memory());
|
||||
|
||||
// Check the EEPROM format version before loading any parameters from EEPROM
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <AP_Common/AP_FWVersion.h>
|
||||
|
||||
const AP_FWVersion Tracker::fwver{
|
||||
const AP_FWVersion AP_FWVersion::fwver{
|
||||
.major = FW_MAJOR,
|
||||
.minor = FW_MINOR,
|
||||
.patch = FW_PATCH,
|
||||
|
@ -32,9 +32,16 @@ const AP_FWVersion Tracker::fwver{
|
|||
.fw_hash_str = GIT_VERSION,
|
||||
#endif
|
||||
#ifdef PX4_GIT_VERSION
|
||||
.middleware_name = "PX4",
|
||||
.middleware_hash_str = PX4_GIT_VERSION,
|
||||
#endif
|
||||
#ifdef NUTTX_GIT_VERSION
|
||||
.os_name = "NuttX",
|
||||
.os_hash_str = NUTTX_GIT_VERSION,
|
||||
#elif defined(CHIBIOS_GIT_VERSION)
|
||||
.middleware_name = nullptr,
|
||||
.middleware_hash_str = nullptr,
|
||||
.os_name = "ChibiOS",
|
||||
.os_hash_str = CHIBIOS_GIT_VERSION,
|
||||
#endif
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue