LUA: show protocol2 only on receivers with serial1_TX or PWM pins defined (#2999)
[ExpressLRS.git] / src / lib / StubbornReceiver / stubborn_receiver.h
blobf4b5a33a32086f4a900f11619b429b0acdb3ece4
1 #pragma once
3 #include <cstdint>
5 class StubbornReceiver
7 public:
8 StubbornReceiver();
9 void setMaxPackageIndex(uint8_t maxPackageIndex);
10 void ResetState();
11 void SetDataToReceive(uint8_t* dataToReceive, uint8_t maxLength);
12 void ReceiveData(uint8_t const packageIndex, uint8_t const * const receiveData, uint8_t dataLen);
13 bool HasFinishedData();
14 void Unlock();
15 bool GetCurrentConfirm();
16 private:
17 uint8_t *data;
18 bool finishedData;
19 uint8_t length;
20 uint8_t currentOffset;
21 uint8_t currentPackage;
22 bool telemetryConfirm;
23 uint8_t maxPackageIndex;