![](/media/cache/group/Racelogic_Blue_Logo.jpg.50x50_q85.jpg)
I messed up the merge, so pushing it over to another repo so I don't lose it. Will tidy up and remove later
Dependencies: BufferedSerial FatFileSystemCpp mbed
Diff: VIPSSerialProtocol.h
- Revision:
- 69:47f800793d00
- Parent:
- 66:066b16c6c34f
- Child:
- 72:da2f1df6a50d
--- a/VIPSSerialProtocol.h Thu Jan 27 12:56:13 2022 +0000 +++ b/VIPSSerialProtocol.h Thu Feb 03 11:50:12 2022 +0000 @@ -7,6 +7,8 @@ #include "LTCApp.h" #include "LowPassFilter.h" +#define MaxBuffSize 256 + extern const char* VIPSStatusMessages[]; struct UserSettings_s; @@ -71,6 +73,14 @@ }; void bypassTx(char byte); void sendQueued(void); + bool EnableDirectTX(bool enabled) + { + directTx = enabled; + return directTx; + }; + void sendDirectTX(unsigned char* data, int dataLen); + int getWaitingBuffer(unsigned char **TXBuffer, int *bytesToSend); + void sendQuiet(void); private: @@ -94,6 +104,10 @@ RawSerial _port; unsigned char messageInBuffer[128]; unsigned char messageOutBuffer[16]; + unsigned char TXBuffer1[MaxBuffSize]; + unsigned char TXBuffer2[MaxBuffSize]; + unsigned char *txBuf; + int waitingBytes; #define posHistoryLen 3 struct posAndTime_s lastPositions[posHistoryLen]; int nextPosition; @@ -110,6 +124,7 @@ bool newFormatMsg; bool hyperSmoothEnabled; bool forcedHyperSmooth; + bool directTx; uint32_t pointCount; uint32_t _outputMask;