DLE FRAM packets can be read now
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
#ifndef LINUX_BOARDTEST_UARTTESTCLASS_H_
|
||||
#define LINUX_BOARDTEST_UARTTESTCLASS_H_
|
||||
|
||||
#include <fsfw/container/SimpleRingBuffer.h>
|
||||
#include <fsfw/globalfunctions/DleEncoder.h>
|
||||
#include <fsfw_hal/linux/uart/UartCookie.h>
|
||||
#include <termios.h> // Contains POSIX terminal control definitions
|
||||
@ -8,10 +9,11 @@
|
||||
#include <array>
|
||||
|
||||
#include "lwgps/lwgps.h"
|
||||
#include "mission/devices/devicedefinitions/SCEXDefinitions.h"
|
||||
#include "mission/devices/devicedefinitions/ScexDefinitions.h"
|
||||
#include "test/testtasks/TestTask.h"
|
||||
|
||||
class ScexUartReader;
|
||||
class ScexDleParser;
|
||||
|
||||
class UartTestClass : public TestTask {
|
||||
public:
|
||||
@ -40,6 +42,11 @@ class UartTestClass : public TestTask {
|
||||
void scexSimplePeriodic();
|
||||
void scexSimpleInit();
|
||||
|
||||
static void foundDlePacketHandler(uint8_t* packet, size_t len, void* args);
|
||||
void handleFoundDlePacket(uint8_t* packet, size_t len);
|
||||
|
||||
bool cmdSent = false;
|
||||
bool cmdDone = false;
|
||||
scex::ScexCmds currCmd = scex::ScexCmds::PING;
|
||||
TestModes mode = TestModes::GPS;
|
||||
DleEncoder dleEncoder = DleEncoder();
|
||||
@ -48,10 +55,15 @@ class UartTestClass : public TestTask {
|
||||
lwgps_t gpsData = {};
|
||||
struct termios tty = {};
|
||||
int serialPort = 0;
|
||||
std::array<uint8_t, 64> cmdBuf = {};
|
||||
std::array<uint8_t, 4096> recBuf = {};
|
||||
uint8_t recvCnt = 0;
|
||||
bool startFound = false;
|
||||
ScexUartReader* reader = nullptr;
|
||||
SimpleRingBuffer decodeRingBuf;
|
||||
std::array<uint8_t, 64> cmdBuf = {};
|
||||
std::array<uint8_t, 524> recBuf = {};
|
||||
std::array<uint8_t, 4096> encodedBuf = {};
|
||||
std::array<uint8_t, 4096> decodedBuf = {};
|
||||
ScexDleParser* dleParser;
|
||||
uint8_t recvCnt = 0;
|
||||
};
|
||||
|
||||
#endif /* LINUX_BOARDTEST_UARTTESTCLASS_H_ */
|
||||
|
Reference in New Issue
Block a user