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( store_address_t ParameterMessage::getParameterLoadCommand(
const CommandMessage *message, ParameterId_t* parameterId, uint8_t *ptc, const CommandMessage *message, ParameterId_t* parameterId, uint8_t *ptc,
uint8_t *pfc, uint8_t *rows, uint8_t *columns) { uint8_t *pfc, uint8_t *rows, uint8_t *columns) {
*parameterId = message->getParameter2(); *parameterId = message->getParameter();
uint32_t packedParamSettings = message->getParameter3(); uint32_t packedParamSettings = message->getParameter3();
*ptc = packedParamSettings >> 24 & 0xff; *ptc = packedParamSettings >> 24 & 0xff;
*pfc = packedParamSettings >> 16 & 0xff; *pfc = packedParamSettings >> 16 & 0xff;

View File

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