config word functions pass value now by reference and return returnvalue
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main This commit looks good
EIVE/eive-obsw/pipeline/head Build started...

This commit is contained in:
Jakob Meier
2023-08-11 16:15:56 +02:00
parent c3bca9bb54
commit d28ec2c31a
3 changed files with 61 additions and 30 deletions

View File

@ -579,8 +579,24 @@ void PdecHandler::handleIReason(uint32_t pdecFar, ReturnValue_t parameter1) {
}
void PdecHandler::checkConfig() {
uint32_t firstWord = pdecConfig.createFirstWord();
uint32_t secondWord = pdecConfig.createSecondWord();
uint32_t firstWord = 0;
ReturnValue_t result = pdecConfig.createFirstWord(&firstWord);
if (result != returnvalue::OK) {
// This should normally never happen during runtime. So here is just
// output a warning
sif::warning << "PdecHandler::checkConfig: Failed to create first word"
<< std::endl;
return;
}
uint32_t secondWord = 0;
result = pdecConfig.createSecondWord(&secondWord);
if (result != returnvalue::OK) {
// This should normally never happen during runtime. So here is just
// output a warning
sif::warning << "PdecHandler::checkConfig: Failed to create second word"
<< std::endl;
return;
}
if (firstWord != pdecConfig.readbackFirstWord() or
secondWord != pdecConfig.readbackSecondWord()) {
triggerEvent(PDEC_CONFIG_CORRUPTED, firstWord, secondWord);