This commit is contained in:
Jakob Meier 2022-04-21 09:31:52 +02:00
parent 77870468d9
commit 73ba4a39b0

View File

@ -264,30 +264,6 @@ ReturnValue_t PlocMPSoCHandler::scanForReply(const uint8_t* start, size_t remain
SpacePacket spacePacket;
std::memcpy(spacePacket.getWholeData(), start, remainingSize);
// if (tmBuffer.length + remainingSize < SpacePacket::PACKET_MAX_SIZE) {
// std::memcpy(tmBuffer, start, remainingSize);
// tmBuffer.length += remainingSize;
// *foundLen = remainingSize;
// } else {
// std::memcpy(tmBuffer, start, remainingSize - (SpacePacket::PACKET_MAX_SIZE - tmBuffer.length));
// tmBuffer.length += (remainingSize - (SpacePacket::PACKET_MAX_SIZE - tmBuffer.length));
// }
//
// if (remainingSize < mpsoc::MIN_SPACE_PACKET_LENGTH) {
// std::memcpy(tmBuffer, start + tmBuffer.length, remainingSize);
// tmBuffer.length += remainingSize;
// return IGNORE_REPLY_DATA;
// }
// else {
// spacePacket.addWholeData(start, remainingSize);
// if (spacePacket.getPacketDataLength() + 1 != remainingSize - mpsoc::SPACE_PACKET_HEADER_SIZE) {
// std::memcpy(tmBuffer, start + tmBuffer.length, remainingSize);
// tmBuffer.length += remainingSize;
// return IGNORE_REPLY_DATA;
// }
// }
uint16_t apid = spacePacket.getAPID();
switch (apid) {
@ -805,7 +781,8 @@ size_t PlocMPSoCHandler::getNextReplyLength(DeviceCommandId_t commandId) {
break;
}
case mpsoc::TM_CAM_CMD_RPT:
// Read ACK, TM and EXE report in one go
// Read acknowledgment, camera and execution report in one go because length of camera
// report is not fixed
replyLen = SpacePacket::PACKET_MAX_SIZE;
break;
default: {