IMPORTant bugfix

This commit is contained in:
Robin Müller 2021-01-31 00:27:47 +01:00
parent cf945d4d34
commit 503de9ba89
2 changed files with 7 additions and 10 deletions

View File

@ -38,7 +38,7 @@ void ParameterMessage::setParameterLoadCommand(CommandMessage* message,
store_address_t ParameterMessage::getParameterLoadCommand(
const CommandMessage *message, ParameterId_t* parameterId, uint8_t *ptc,
uint8_t *pfc, uint8_t *rows, uint8_t *columns) {
*parameterId = message->getParameter2();
*parameterId = message->getParameter();
uint32_t packedParamSettings = message->getParameter3();
*ptc = packedParamSettings >> 24 & 0xff;
*pfc = packedParamSettings >> 16 & 0xff;

View File

@ -70,10 +70,8 @@ ReturnValue_t Service20ParameterManagement::checkInterfaceAndAcquireMessageQueue
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Service20ParameterManagement::checkInterfaceAndAcquire"
<<"MessageQueue: Can't access object" << std::endl;
sif::error << "Object ID: " << std::hex << objectId << std::dec
<< std::endl;
sif::error << "Make sure it implements ReceivesParameterMessagesIF!"
<< std::endl;
sif::error << "Object ID: " << std::hex << objectId << std::dec << std::endl;
sif::error << "Make sure it implements ReceivesParameterMessagesIF!" << std::endl;
#else
sif::printError("Service20ParameterManagement::checkInterfaceAndAcquire"
"MessageQueue: Can't access object\n");
@ -134,8 +132,8 @@ ReturnValue_t Service20ParameterManagement::prepareLoadCommand(
uint8_t* storePointer = nullptr;
store_address_t storeAddress;
size_t parameterDataLen = tcDataLen - sizeof(object_id_t) -
sizeof(ParameterId_t) - sizeof(uint32_t);
size_t parameterDataLen = tcDataLen - sizeof(object_id_t) - sizeof(ParameterId_t) -
sizeof(uint32_t);
ReturnValue_t result = IPCStore->getFreeElement(&storeAddress,
parameterDataLen, &storePointer);
if(result != HasReturnvaluesIF::RETURN_OK) {
@ -149,9 +147,8 @@ ReturnValue_t Service20ParameterManagement::prepareLoadCommand(
return result;
}
ParameterMessage::setParameterLoadCommand(message,
command.getParameterId(), storeAddress, command.getPtc(),
command.getPfc(), command.getRows(), command.getColumns());
ParameterMessage::setParameterLoadCommand(message, command.getParameterId(), storeAddress,
command.getPtc(), command.getPfc(), command.getRows(), command.getColumns());
return HasReturnvaluesIF::RETURN_OK;
}