mirror of https://github.com/ArduPilot/ardupilot
22 lines
405 B
C++
22 lines
405 B
C++
|
#include "BetterStream.h"
|
||
|
|
||
|
#include "print_vprintf.h"
|
||
|
|
||
|
void AP_HAL::BetterStream::printf(const char *fmt, ...)
|
||
|
{
|
||
|
va_list ap;
|
||
|
va_start(ap, fmt);
|
||
|
vprintf(fmt, ap);
|
||
|
va_end(ap);
|
||
|
}
|
||
|
|
||
|
void AP_HAL::BetterStream::vprintf(const char *fmt, va_list ap)
|
||
|
{
|
||
|
print_vprintf(this, fmt, ap);
|
||
|
}
|
||
|
|
||
|
size_t AP_HAL::BetterStream::write(const char *str)
|
||
|
{
|
||
|
return write((const uint8_t *)str, strlen(str));
|
||
|
}
|