bugfix
This commit is contained in:
parent
b39e448ab5
commit
468fa01650
@ -1,3 +1,4 @@
|
|||||||
|
#include <fsfw/globalfunctions/arrayprinter.h>
|
||||||
#include <linux/payload/PlocMpsocSpecialComHelper.h>
|
#include <linux/payload/PlocMpsocSpecialComHelper.h>
|
||||||
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
@ -249,10 +250,6 @@ ReturnValue_t PlocMpsocSpecialComHelper::flashfclose() {
|
|||||||
spParams.buf = commandBuffer;
|
spParams.buf = commandBuffer;
|
||||||
(*sequenceCount)++;
|
(*sequenceCount)++;
|
||||||
mpsoc::FlashFclose flashFclose(spParams, *sequenceCount);
|
mpsoc::FlashFclose flashFclose(spParams, *sequenceCount);
|
||||||
ReturnValue_t result = flashFclose.createPacket(flashReadAndWrite.mpsocFile);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
return handlePacketTransmissionNoReply(flashFclose);
|
return handlePacketTransmissionNoReply(flashFclose);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -287,6 +284,7 @@ ReturnValue_t PlocMpsocSpecialComHelper::handlePacketTransmissionNoReply(ploc::S
|
|||||||
|
|
||||||
ReturnValue_t PlocMpsocSpecialComHelper::sendCommand(ploc::SpTcBase& tc) {
|
ReturnValue_t PlocMpsocSpecialComHelper::sendCommand(ploc::SpTcBase& tc) {
|
||||||
ReturnValue_t result = returnvalue::OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
arrayprinter::print(tc.getFullPacket(), tc.getFullPacketLen());
|
||||||
result = uartComIF->sendMessage(comCookie, tc.getFullPacket(), tc.getFullPacketLen());
|
result = uartComIF->sendMessage(comCookie, tc.getFullPacket(), tc.getFullPacketLen());
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "PlocMPSoCHelper::sendCommand: Failed to send command" << std::endl;
|
sif::warning << "PlocMPSoCHelper::sendCommand: Failed to send command" << std::endl;
|
||||||
|
@ -387,10 +387,10 @@ class TcMemWrite : public TcBase {
|
|||||||
/**
|
/**
|
||||||
* @brief Class to help creation of flash fopen command.
|
* @brief Class to help creation of flash fopen command.
|
||||||
*/
|
*/
|
||||||
class FlashFopen : public ploc::SpTcBase {
|
class FlashFopen : public TcBase {
|
||||||
public:
|
public:
|
||||||
FlashFopen(ploc::SpTcParams params, uint16_t sequenceCount)
|
FlashFopen(ploc::SpTcParams params, uint16_t sequenceCount)
|
||||||
: ploc::SpTcBase(params, apid::TC_FLASHFOPEN, sequenceCount) {}
|
: TcBase(params, apid::TC_FLASHFOPEN, sequenceCount) {}
|
||||||
|
|
||||||
ReturnValue_t createPacket(std::string filename, FileAccessMode mode) {
|
ReturnValue_t createPacket(std::string filename, FileAccessMode mode) {
|
||||||
accessMode = mode;
|
accessMode = mode;
|
||||||
@ -415,19 +415,19 @@ class FlashFopen : public ploc::SpTcBase {
|
|||||||
/**
|
/**
|
||||||
* @brief Class to help creation of flash fclose command.
|
* @brief Class to help creation of flash fclose command.
|
||||||
*/
|
*/
|
||||||
class FlashFclose : public ploc::SpTcBase {
|
class FlashFclose : public TcBase {
|
||||||
public:
|
public:
|
||||||
FlashFclose(ploc::SpTcParams params, uint16_t sequenceCount)
|
FlashFclose(ploc::SpTcParams params, uint16_t sequenceCount)
|
||||||
: ploc::SpTcBase(params, apid::TC_FLASHFCLOSE, sequenceCount) {}
|
: TcBase(params, apid::TC_FLASHFCLOSE, sequenceCount) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Class to build flash write space packet.
|
* @brief Class to build flash write space packet.
|
||||||
*/
|
*/
|
||||||
class TcFlashWrite : public ploc::SpTcBase {
|
class TcFlashWrite : public TcBase {
|
||||||
public:
|
public:
|
||||||
TcFlashWrite(ploc::SpTcParams params, uint16_t sequenceCount)
|
TcFlashWrite(ploc::SpTcParams params, uint16_t sequenceCount)
|
||||||
: ploc::SpTcBase(params, apid::TC_FLASHWRITE, sequenceCount) {}
|
: TcBase(params, apid::TC_FLASHWRITE, sequenceCount) {}
|
||||||
|
|
||||||
ReturnValue_t buildPacket(const uint8_t* writeData, uint32_t writeLen_) {
|
ReturnValue_t buildPacket(const uint8_t* writeData, uint32_t writeLen_) {
|
||||||
ReturnValue_t result = returnvalue::OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
@ -460,10 +460,10 @@ class TcFlashWrite : public ploc::SpTcBase {
|
|||||||
uint32_t writeLen = 0;
|
uint32_t writeLen = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class TcFlashRead : public ploc::SpTcBase {
|
class TcFlashRead : public TcBase {
|
||||||
public:
|
public:
|
||||||
TcFlashRead(ploc::SpTcParams params, uint16_t sequenceCount)
|
TcFlashRead(ploc::SpTcParams params, uint16_t sequenceCount)
|
||||||
: ploc::SpTcBase(params, apid::TC_FLASHWRITE, sequenceCount) {}
|
: TcBase(params, apid::TC_FLASHWRITE, sequenceCount) {}
|
||||||
|
|
||||||
ReturnValue_t buildPacket(uint32_t readLen) {
|
ReturnValue_t buildPacket(uint32_t readLen) {
|
||||||
if (readLen > MAX_FLASH_READ_DATA_SIZE) {
|
if (readLen > MAX_FLASH_READ_DATA_SIZE) {
|
||||||
@ -500,10 +500,10 @@ class TcFlashRead : public ploc::SpTcBase {
|
|||||||
/**
|
/**
|
||||||
* @brief Class to help creation of flash delete command.
|
* @brief Class to help creation of flash delete command.
|
||||||
*/
|
*/
|
||||||
class TcFlashDelete : public ploc::SpTcBase {
|
class TcFlashDelete : public TcBase {
|
||||||
public:
|
public:
|
||||||
TcFlashDelete(ploc::SpTcParams params, uint16_t sequenceCount)
|
TcFlashDelete(ploc::SpTcParams params, uint16_t sequenceCount)
|
||||||
: ploc::SpTcBase(params, apid::TC_FLASHDELETE, sequenceCount) {}
|
: TcBase(params, apid::TC_FLASHDELETE, sequenceCount) {}
|
||||||
|
|
||||||
ReturnValue_t buildPacket(std::string filename) {
|
ReturnValue_t buildPacket(std::string filename) {
|
||||||
size_t nameSize = filename.size();
|
size_t nameSize = filename.size();
|
||||||
|
Loading…
Reference in New Issue
Block a user