PLOC SUPV Update to newer firmware #316
@ -3,6 +3,8 @@
|
|||||||
#include <fsfw/filesystem/HasFileSystemIF.h>
|
#include <fsfw/filesystem/HasFileSystemIF.h>
|
||||||
#include <fsfw/tasks/SemaphoreFactory.h>
|
#include <fsfw/tasks/SemaphoreFactory.h>
|
||||||
#include <linux/devices/ploc/PlocSupvUartMan.h>
|
#include <linux/devices/ploc/PlocSupvUartMan.h>
|
||||||
|
|
||||||
|
#include <fsfw/globalfunctions/arrayprinter.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
@ -99,6 +101,7 @@ ReturnValue_t PlocSupvUartManager::performOperation(uint8_t operationCode) {
|
|||||||
lock->unlockMutex();
|
lock->unlockMutex();
|
||||||
semaphore->acquire();
|
semaphore->acquire();
|
||||||
while (true) {
|
while (true) {
|
||||||
|
sif::debug << "SUPV UART MAN: Running.." << std::endl;
|
||||||
putTaskToSleep = handleUartReception();
|
putTaskToSleep = handleUartReception();
|
||||||
if (putTaskToSleep) {
|
if (putTaskToSleep) {
|
||||||
performUartShutdown();
|
performUartShutdown();
|
||||||
@ -968,6 +971,8 @@ ReturnValue_t PlocSupvUartManager::handleRunningLongerRequest() {
|
|||||||
ReturnValue_t PlocSupvUartManager::encodeAndSendPacket(const uint8_t* sendData, size_t sendLen) {
|
ReturnValue_t PlocSupvUartManager::encodeAndSendPacket(const uint8_t* sendData, size_t sendLen) {
|
||||||
size_t encodedLen = 0;
|
size_t encodedLen = 0;
|
||||||
hdlc_add_framing(sendData, sendLen, encodedSendBuf.data(), &encodedLen);
|
hdlc_add_framing(sendData, sendLen, encodedSendBuf.data(), &encodedLen);
|
||||||
|
sif::debug << "Sending TC" << std::endl;
|
||||||
|
arrayprinter::print(encodedSendBuf.data(), encodedLen);
|
||||||
size_t bytesWritten = write(serialPort, encodedSendBuf.data(), encodedLen);
|
size_t bytesWritten = write(serialPort, encodedSendBuf.data(), encodedLen);
|
||||||
if (bytesWritten != encodedLen) {
|
if (bytesWritten != encodedLen) {
|
||||||
sif::warning << "ScexUartReader::sendMessage: Sending ping command to solar experiment failed"
|
sif::warning << "ScexUartReader::sendMessage: Sending ping command to solar experiment failed"
|
||||||
|
Loading…
Reference in New Issue
Block a user