fixed conflicts
This commit is contained in:
@ -110,12 +110,12 @@ void GPSHyperionLinuxController::readGpsDataFromGpsd() {
|
||||
// The data from the device will generally be read all at once. Therefore, we
|
||||
// can set all field here
|
||||
if (not myGpsmm.is_open()) {
|
||||
if(gpsNotOpenSwitch) {
|
||||
if (gpsNotOpenSwitch) {
|
||||
// Opening failed
|
||||
#if FSFW_VERBOSE_LEVEL >= 1
|
||||
sif::warning << "GPSHyperionHandler::readGpsDataFromGpsd: Opening GPSMM failed | " <<
|
||||
"Error " << errno << " | " << gps_errstr(errno) << std::endl;
|
||||
#endif
|
||||
#if FSFW_VERBOSE_LEVEL >= 1
|
||||
sif::warning << "GPSHyperionHandler::readGpsDataFromGpsd: Opening GPSMM failed | "
|
||||
<< "Error " << errno << " | " << gps_errstr(errno) << std::endl;
|
||||
#endif
|
||||
|
||||
gpsNotOpenSwitch = false;
|
||||
}
|
||||
@ -124,9 +124,10 @@ void GPSHyperionLinuxController::readGpsDataFromGpsd() {
|
||||
gps_data_t *gps = nullptr;
|
||||
gps = myGpsmm.read();
|
||||
if (gps == nullptr) {
|
||||
if(gpsReadFailedSwitch) {
|
||||
if (gpsReadFailedSwitch) {
|
||||
gpsReadFailedSwitch = false;
|
||||
sif::warning << "GPSHyperionHandler::readGpsDataFromGpsd: Reading GPS data failed" << std::endl;
|
||||
sif::warning << "GPSHyperionHandler::readGpsDataFromGpsd: Reading GPS data failed"
|
||||
<< std::endl;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -646,24 +646,24 @@ class TcModeIdle : public TcBase {
|
||||
};
|
||||
|
||||
class TcCamcmdSend : public TcBase {
|
||||
public:
|
||||
public:
|
||||
TcCamcmdSend(uint16_t sequenceCount) : TcBase(apid::TC_CAM_CMD_SEND, sequenceCount) {}
|
||||
|
||||
protected:
|
||||
ReturnValue_t initPacket(const uint8_t* commandData, size_t commandDataLen) {
|
||||
if (commandDataLen > MAX_DATA_LENGTH) {
|
||||
return INVALID_LENGTH;
|
||||
}
|
||||
std::memcpy(this->getPacketData(), commandData, commandDataLen);
|
||||
*(this->getPacketData() + commandDataLen) = CARRIAGE_RETURN;
|
||||
uint16_t trueLength = commandDataLen + sizeof(CARRIAGE_RETURN) + CRC_SIZE;
|
||||
this->setPacketDataLength(trueLength - 1);
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
protected:
|
||||
ReturnValue_t initPacket(const uint8_t* commandData, size_t commandDataLen) {
|
||||
if (commandDataLen > MAX_DATA_LENGTH) {
|
||||
return INVALID_LENGTH;
|
||||
}
|
||||
private:
|
||||
static const uint8_t MAX_DATA_LENGTH = 10;
|
||||
static const uint8_t CARRIAGE_RETURN = 0xD;
|
||||
std::memcpy(this->getPacketData(), commandData, commandDataLen);
|
||||
*(this->getPacketData() + commandDataLen) = CARRIAGE_RETURN;
|
||||
uint16_t trueLength = commandDataLen + sizeof(CARRIAGE_RETURN) + CRC_SIZE;
|
||||
this->setPacketDataLength(trueLength - 1);
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
private:
|
||||
static const uint8_t MAX_DATA_LENGTH = 10;
|
||||
static const uint8_t CARRIAGE_RETURN = 0xD;
|
||||
};
|
||||
|
||||
} // namespace mpsoc
|
||||
|
@ -255,7 +255,7 @@ void PlocMPSoCHandler::fillCommandAndReplyMap() {
|
||||
this->insertInReplyMap(mpsoc::ACK_REPORT, 3, nullptr, mpsoc::SIZE_ACK_REPORT);
|
||||
this->insertInReplyMap(mpsoc::EXE_REPORT, 3, nullptr, mpsoc::SIZE_EXE_REPORT);
|
||||
this->insertInReplyMap(mpsoc::TM_MEMORY_READ_REPORT, 2, nullptr, mpsoc::SIZE_TM_MEM_READ_REPORT);
|
||||
this->insertInReplyMap(mpsoc::TM_CAM_CMD_RPT, 2, nullptr, SpacePacket::PACKET_MAX_SIZE);
|
||||
this->insertInReplyMap(mpsoc::TM_CAM_CMD_RPT, 2, nullptr, SpacePacket::PACKET_MAX_SIZE);
|
||||
}
|
||||
|
||||
ReturnValue_t PlocMPSoCHandler::scanForReply(const uint8_t* start, size_t remainingSize,
|
||||
@ -653,8 +653,9 @@ ReturnValue_t PlocMPSoCHandler::handleCamCmdRpt(const uint8_t* data) {
|
||||
sif::warning << "PlocMPSoCHandler::handleCamCmdRpt: CRC failure" << std::endl;
|
||||
}
|
||||
const uint8_t* dataFieldPtr = data + mpsoc::SPACE_PACKET_HEADER_SIZE;
|
||||
std::string camCmdRptMsg(reinterpret_cast<const char*>(
|
||||
dataFieldPtr), tmCamCmdRpt.rememberSpacePacketSize - mpsoc::SPACE_PACKET_HEADER_SIZE - 3);
|
||||
std::string camCmdRptMsg(
|
||||
reinterpret_cast<const char*>(dataFieldPtr),
|
||||
tmCamCmdRpt.rememberSpacePacketSize - mpsoc::SPACE_PACKET_HEADER_SIZE - 3);
|
||||
uint8_t ackValue = *(packet.getPacketData() + packet.getPacketDataLength() - 2);
|
||||
sif::info << "CamCmdRpt message: " << camCmdRptMsg << std::endl;
|
||||
sif::info << "CamCmdRpt Ack value: 0x" << std::hex << static_cast<unsigned int>(ackValue)
|
||||
|
@ -4,11 +4,11 @@
|
||||
#include <string>
|
||||
|
||||
#include "PlocMPSoCHelper.h"
|
||||
#include "fsfw/tmtcpacket/SpacePacket.h"
|
||||
#include "fsfw/action/CommandActionHelper.h"
|
||||
#include "fsfw/action/CommandsActionsIF.h"
|
||||
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
|
||||
#include "fsfw/ipc/QueueFactory.h"
|
||||
#include "fsfw/tmtcpacket/SpacePacket.h"
|
||||
#include "fsfw/tmtcservices/SourceSequenceCounter.h"
|
||||
#include "fsfw_hal/linux/gpio/Gpio.h"
|
||||
#include "fsfw_hal/linux/uart/UartComIF.h"
|
||||
|
Reference in New Issue
Block a user