bugfixes and improvements
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
- Tests finished
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
|
||||
#include "utility.h"
|
||||
|
||||
#include <cstring>
|
||||
@ -5,6 +6,7 @@
|
||||
#include "FSFWConfig.h"
|
||||
#include "OBSWConfig.h"
|
||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||
#include "fsfw/timemanager/Clock.h"
|
||||
|
||||
void utility::handleSystemError(int retcode, std::string function) {
|
||||
#if OBSW_VERBOSE_LEVEL >= 1
|
||||
@ -12,3 +14,14 @@ void utility::handleSystemError(int retcode, std::string function) {
|
||||
<< strerror(retcode) << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool utility::timeSanityCheck() {
|
||||
timeval currentTime = {};
|
||||
Clock::getUptime(¤tTime);
|
||||
Clock::TimeOfDay_t currTimeOfDay = {};
|
||||
Clock::convertTimevalToTimeOfDay(¤tTime, &currTimeOfDay);
|
||||
if (currTimeOfDay.year == 2000) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -9,6 +9,8 @@ namespace utility {
|
||||
|
||||
void handleSystemError(int retcode, std::string function);
|
||||
|
||||
}
|
||||
bool timeSanityCheck();
|
||||
|
||||
} // namespace utility
|
||||
|
||||
#endif /* LINUX_UTILITY_UTILITY_H_ */
|
||||
|
Reference in New Issue
Block a user