error message transmission now happens via uarthandler

This commit is contained in:
Leonetienne
2025-12-15 20:22:28 +01:00
parent ace1b9ef66
commit f1e45d886e
3 changed files with 40 additions and 11 deletions
+7 -4
View File
@@ -7,7 +7,7 @@
class UartHandler
{
public:
static UartHandler& getInstance();
static UartHandler& getInstance() noexcept;
// Will attempt to initialize the serial port, returns status.
// May block up to 1000ms.
@@ -15,14 +15,17 @@ class UartHandler
void close();
void poll();
void poll() noexcept;
// Will write the next available whole line into char* (provide at least 16 bytes!)
// Returns whether any data was written.
// If data available is longer than 16 bytes, an error will be raised.
bool getNextPacket(char* dest);
bool getNextPacket(char* dest) noexcept;
size_t send(const char* buf, size_t nbytes);
size_t send(const String& str);
// Returns how many packets are ready for reading
uint8_t getNumAvailablePackets() const;
uint8_t getNumAvailablePackets() const noexcept;
bool isOpen() const noexcept;