that should get the job done
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good

This commit is contained in:
2023-10-02 14:47:41 +02:00
parent 9c1eee075c
commit 404a1009ed
3 changed files with 22 additions and 6 deletions

View File

@ -19,11 +19,20 @@ ReturnValue_t XiphosWdtHandler::initialize() {
<< " seconds failed with code " << result << ": " << strerror(result) << std::endl;
return ObjectManagerIF::CHILD_INIT_FAILED;
}
result = xsc_watchdog_enable(wdtHandle);
if (result != 0) {
sif::error << "XiphosWdtHandler: Enabling WDT failed with code " << result << ": "
<< strerror(result) << std::endl;
return ObjectManagerIF::CHILD_INIT_FAILED;
int nowayout = 0;
int status = 0;
result = xsc_watchdog_get_status(&nowayout, &status);
if (result == 0) {
if (status == 0) {
result = xsc_watchdog_enable(wdtHandle);
if (result != 0) {
sif::error << "XiphosWdtHandler: Enabling WDT failed with code " << result << ": "
<< strerror(result) << std::endl;
return ObjectManagerIF::CHILD_INIT_FAILED;
}
}
} else {
sif::warning << "XiphosWdtHandler: Getting WDT status failed" << std::endl;
}
return returnvalue::OK;
}