AP_HAL: remove buggy write implementation
This commit is contained in:
parent
209b0300a5
commit
b902316139
@ -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));
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user