GCS_MAVLink: allow replay to use GCS_Dummy
This commit is contained in:
parent
ac566763fe
commit
147df12eb8
24
libraries/GCS_MAVLink/GCS_Dummy.cpp
Normal file
24
libraries/GCS_MAVLink/GCS_Dummy.cpp
Normal file
@ -0,0 +1,24 @@
|
||||
#include "GCS_Dummy.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#define FORCE_VERSION_H_INCLUDE
|
||||
#include <AP_Common/AP_FWVersionDefine.h>
|
||||
#undef FORCE_VERSION_H_INCLUDE
|
||||
|
||||
const struct GCS_MAVLINK::stream_entries GCS_MAVLINK::all_stream_entries[] {};
|
||||
|
||||
/*
|
||||
send_text implementation for dummy GCS
|
||||
*/
|
||||
void GCS_Dummy::send_textv(MAV_SEVERITY severity, const char *fmt, va_list arg_list, uint8_t dest_bitmask)
|
||||
{
|
||||
#if !APM_BUILD_TYPE(APM_BUILD_Replay)
|
||||
hal.console->printf("TOGCS: ");
|
||||
hal.console->vprintf(fmt, arg_list);
|
||||
hal.console->printf("\n");
|
||||
#else
|
||||
::printf("TOGCS: ");
|
||||
::vprintf(fmt, arg_list);
|
||||
::printf("\n");
|
||||
#endif
|
||||
}
|
@ -8,12 +8,6 @@
|
||||
#define FW_PATCH 4
|
||||
#define FW_TYPE FIRMWARE_VERSION_TYPE_DEV
|
||||
|
||||
#define FORCE_VERSION_H_INCLUDE
|
||||
#include <AP_Common/AP_FWVersionDefine.h>
|
||||
#undef FORCE_VERSION_H_INCLUDE
|
||||
|
||||
const struct GCS_MAVLINK::stream_entries GCS_MAVLINK::all_stream_entries[] {};
|
||||
|
||||
/*
|
||||
* GCS backend used for many examples and tools
|
||||
*/
|
||||
@ -83,11 +77,7 @@ private:
|
||||
return (GCS_MAVLINK_Dummy *)_chan[ofs];
|
||||
};
|
||||
|
||||
void send_textv(MAV_SEVERITY severity, const char *fmt, va_list arg_list, uint8_t dest_bitmask) override {
|
||||
hal.console->printf("TOGCS: ");
|
||||
hal.console->vprintf(fmt, arg_list);
|
||||
hal.console->printf("\n");
|
||||
}
|
||||
void send_textv(MAV_SEVERITY severity, const char *fmt, va_list arg_list, uint8_t dest_bitmask) override;
|
||||
|
||||
MAV_TYPE frame_type() const override { return MAV_TYPE_FIXED_WING; }
|
||||
uint32_t custom_mode() const override { return 3; } // magic number
|
||||
|
Loading…
Reference in New Issue
Block a user