Browse Source

AP_HAL_Empty: convert to new AP_HAL printf

mission-4.1.18
Andrew Tridgell 12 years ago
parent
commit
4c1925b578
  1. 35
      libraries/AP_HAL_Empty/Util.cpp
  2. 5
      libraries/AP_HAL_Empty/Util.h

35
libraries/AP_HAL_Empty/Util.cpp

@ -1,35 +0,0 @@ @@ -1,35 +0,0 @@
#include "Util.h"
using namespace Empty;
int EmptyUtil::snprintf(char* str, size_t size, const char *format, ...)
{
va_list ap;
va_start(ap, format);
int res = this->vsnprintf(str, size, format, ap);
va_end(ap);
return res;
}
int EmptyUtil::snprintf_P(char* str, size_t size, const prog_char_t *format, ...)
{
va_list ap;
va_start(ap, format);
int res = this->vsnprintf_P(str, size, format, ap);
va_end(ap);
return res;
}
int EmptyUtil::vsnprintf(char* str, size_t size, const char *format, va_list ap)
{
return 0;
}
int EmptyUtil::vsnprintf_P(char* str, size_t size, const prog_char_t *format,
va_list ap)
{
return 0;
}

5
libraries/AP_HAL_Empty/Util.h

@ -7,11 +7,6 @@ @@ -7,11 +7,6 @@
class Empty::EmptyUtil : public AP_HAL::Util {
public:
int snprintf(char* str, size_t size, const char *format, ...);
int snprintf_P(char* str, size_t size, const prog_char_t *format, ...);
int vsnprintf(char* str, size_t size, const char *format, va_list ap);
int vsnprintf_P(char* str, size_t size, const prog_char_t *format,
va_list ap);
bool run_debug_shell(AP_HAL::BetterStream *stream) { return false; }
};

Loading…
Cancel
Save