Add full Companion OTA source builds

This commit is contained in:
mikecarper committed 2026-08-10 12:39:07 -07:00
1 parent 1bceda54a6
commit 88ba5b26cb
19 files changed
+1212 -86

No files matched your search

+13 -4
View File
@@ -7,29 +7,37 @@ class ArduinoSerialInterface : public BaseSerialInterface {
bool _isEnabled;
bool _passthroughMode;
bool _controlSequenceReceived;
bool _secondaryControlSequenceReceived;
uint8_t _state;
size_t _controlSequencePos;
size_t _secondaryControlSequencePos;
uint16_t _frame_len;
uint16_t rx_len;
Stream* _serial;
const char* _controlSequence;
const char* _secondaryControlSequence;
uint8_t rx_buf[MAX_FRAME_SIZE];
bool checkControlSequence(uint8_t c);
bool checkControlSequence(uint8_t c, const char* sequence,
size_t& position, bool& received);
void resetReceiveState();
public:
ArduinoSerialInterface()
: _isEnabled(false), _passthroughMode(false),
_controlSequenceReceived(false), _state(0), _controlSequencePos(0),
_controlSequenceReceived(false), _secondaryControlSequenceReceived(false),
_state(0), _controlSequencePos(0), _secondaryControlSequencePos(0),
_frame_len(0), rx_len(0), _serial(nullptr),
_controlSequence(nullptr) {}
_controlSequence(nullptr), _secondaryControlSequence(nullptr) {}
void begin(Stream& serial, const char* controlSequence = nullptr) {
void begin(Stream& serial, const char* controlSequence = nullptr,
const char* secondaryControlSequence = nullptr) {
_serial = &serial;
_controlSequence = controlSequence;
_secondaryControlSequence = secondaryControlSequence;
_passthroughMode = false;
_controlSequenceReceived = false;
_secondaryControlSequenceReceived = false;
resetReceiveState();
#ifdef RAK_4631
pinMode(WB_IO2, OUTPUT);
@@ -44,6 +52,7 @@ public:
// Returns true once for each complete control sequence received while the
// binary frame parser was idle.
bool takeControlSequence();
bool takeSecondaryControlSequence();
// BaseSerialInterface methods
void enable() override;