16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 22:59:19 +02:00

(uart, debug) add UART debug panel with connection information

This commit is contained in:
Marcin Nowak
2021-10-16 02:16:17 +02:00
parent 0c1bcdcadf
commit a0153b1d7b
7 changed files with 93 additions and 10 deletions

10
uart.h
View File

@@ -3,6 +3,14 @@
#include <libserialport.h>
#include "command.h"
class UartStatus {
public:
bool is_connected = false;
bool is_synced = false;
unsigned long packets_sent = 0;
unsigned long packets_received = 0;
};
class uart_input
{
public:
@@ -52,6 +60,8 @@ public:
recall_bindings();
void
poll();
bool
is_connected();
private:
// types