From 44dad72dd982576478b76ba3cb1614c7f3788eac Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 25 Feb 2023 11:40:28 +1100 Subject: [PATCH] AP_Common: correct example for BufferPrinter changes --- libraries/AP_Common/tests/test_expandingstring_failure.cpp | 2 +- libraries/AP_Common/tests/test_nmea_print.cpp | 2 +- libraries/AP_Common/tests/test_nmea_vaprint.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/AP_Common/tests/test_expandingstring_failure.cpp b/libraries/AP_Common/tests/test_expandingstring_failure.cpp index f95d3d9210..98702789f4 100644 --- a/libraries/AP_Common/tests/test_expandingstring_failure.cpp +++ b/libraries/AP_Common/tests/test_expandingstring_failure.cpp @@ -47,7 +47,7 @@ public: const size_t _size; uint32_t available() override { return 0; } - int16_t read() override { return -1; } + bool read(uint8_t &b) override { return false; } uint32_t txspace() override { return 0; } bool discard_input() override { return false; } }; diff --git a/libraries/AP_Common/tests/test_nmea_print.cpp b/libraries/AP_Common/tests/test_nmea_print.cpp index 85bc0a886d..58e232804f 100644 --- a/libraries/AP_Common/tests/test_nmea_print.cpp +++ b/libraries/AP_Common/tests/test_nmea_print.cpp @@ -15,7 +15,7 @@ public: bool tx_pending() override { return false; }; uint32_t available() override { return 1; }; uint32_t txspace() override { return _txspace; }; - int16_t read() override { return 1; }; + bool read(uint8_t &c) override { return false; }; bool discard_input() override { return true; }; size_t write(uint8_t c) override { return 1; }; diff --git a/libraries/AP_Common/tests/test_nmea_vaprint.cpp b/libraries/AP_Common/tests/test_nmea_vaprint.cpp index 3df9f06063..ba719234a5 100644 --- a/libraries/AP_Common/tests/test_nmea_vaprint.cpp +++ b/libraries/AP_Common/tests/test_nmea_vaprint.cpp @@ -26,7 +26,7 @@ public: const size_t _size; uint32_t available() override { return 0; } - int16_t read() override { return -1; } + bool read(uint8_t &c) override { return false; }; uint32_t txspace() override { return 0; } bool discard_input() override { return false; } }; @@ -53,7 +53,7 @@ public: bool tx_pending() override { return false; }; uint32_t available() override { return 1; }; uint32_t txspace() override { return _txspace; }; - int16_t read() override { return 1; }; + bool read(uint8_t &c) override { return false; }; bool discard_input() override { return true; }; size_t write(uint8_t c) override { return 1; };