From 9ed4ea04e34e9f1ebb0dd0682cfb41e913d8c6ad Mon Sep 17 00:00:00 2001 From: Rodrigo Alfonso Date: Mon, 26 Oct 2020 03:35:16 -0300 Subject: [PATCH] FIX: Now baud rate is always set --- src/lib/LinkConnection.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/lib/LinkConnection.h b/src/lib/LinkConnection.h index 6c09f1a..bf4b436 100644 --- a/src/lib/LinkConnection.h +++ b/src/lib/LinkConnection.h @@ -53,17 +53,13 @@ class LinkConnection { }; struct LinkState _linkState; - LinkConnection() { + explicit LinkConnection(BaudRate baudRate = BAUD_RATE_0) { REG_RCNT = 0; REG_SIOCNT = (u8)baudRate; this->setBitHigh(LINK_BIT_MULTIPLAYER); this->setBitHigh(LINK_BIT_IRQ); } - LinkConnection(BaudRate baudRate) : LinkConnection() { - this->baudRate = baudRate; - } - LinkState tick(u16 data) { REG_SIOMLT_SEND = data; @@ -87,7 +83,6 @@ class LinkConnection { } private: - BaudRate baudRate = BaudRate::BAUD_RATE_0; bool isWaiting = false; bool isBitHigh(u8 bit) { return (REG_SIOCNT & (1 << bit)) != 0; }