AP_HAL: remove buggy write implementation

This commit is contained in:
Peter Barker 2019-06-17 14:07:44 +10:00 committed by Peter Barker
parent 209b0300a5
commit b902316139
2 changed files with 1 additions and 11 deletions

View File

@ -15,16 +15,6 @@ void AP_HAL::BetterStream::vprintf(const char *fmt, va_list ap)
print_vprintf(this, fmt, ap);
}
size_t AP_HAL::BetterStream::write(const uint8_t *buffer, size_t size)
{
for (size_t i=0; i<size;i++) {
if (write(buffer[i] == 0)) {
return i;
}
};
return size;
}
size_t AP_HAL::BetterStream::write(const char *str)
{
return write((const uint8_t *)str, strlen(str));

View File

@ -34,7 +34,7 @@ public:
void println(const char *str) { printf("%s\r\n", str); }
virtual size_t write(uint8_t) = 0;
virtual size_t write(const uint8_t *buffer, size_t size);
virtual size_t write(const uint8_t *buffer, size_t size) = 0;
size_t write(const char *str);
virtual uint32_t available() = 0;