PLOC SUPV Update to newer firmware #316

Merged
muellerr merged 99 commits from mueller/tas_ploc_supv_update into develop 2022-11-18 14:27:13 +01:00
Showing only changes of commit 9163db6bcf - Show all commits

View File

@ -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"