Applied clang format
All checks were successful
fsfw/fsfw/pipeline/pr-development This commit looks good
All checks were successful
fsfw/fsfw/pipeline/pr-development This commit looks good
This commit is contained in:
parent
10398855a9
commit
665d8cd479
@ -2,9 +2,9 @@
|
||||
|
||||
#include <chrono>
|
||||
|
||||
#include "fsfw/ipc/MutexGuard.h"
|
||||
#include "fsfw/platform.h"
|
||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||
#include "fsfw/ipc/MutexGuard.h"
|
||||
|
||||
#if defined(PLATFORM_WIN)
|
||||
#include <sysinfoapi.h>
|
||||
|
@ -8,8 +8,8 @@
|
||||
|
||||
#include <fstream>
|
||||
|
||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||
#include "fsfw/ipc/MutexGuard.h"
|
||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||
|
||||
uint32_t Clock::getTicksPerSecond(void) {
|
||||
uint32_t ticks = sysconf(_SC_CLK_TCK);
|
||||
|
@ -6,7 +6,6 @@
|
||||
#include "fsfw/ipc/MutexGuard.h"
|
||||
#include "fsfw/osal/rtems/RtemsBasic.h"
|
||||
|
||||
|
||||
uint32_t Clock::getTicksPerSecond(void) {
|
||||
rtems_interval ticks_per_second = rtems_clock_get_ticks_per_second();
|
||||
return static_cast<uint32_t>(ticks_per_second);
|
||||
|
@ -1,8 +1,9 @@
|
||||
#include "version.h"
|
||||
#include "fsfw/FSFWVersion.h"
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#include "fsfw/FSFWVersion.h"
|
||||
|
||||
#ifdef major
|
||||
#undef major
|
||||
#endif
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <catch2/catch_approx.hpp>
|
||||
|
||||
#include <fsfw/globalfunctions/timevalOperations.h>
|
||||
|
||||
#include <catch2/catch_approx.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
#include "fsfw_tests/unit/CatchDefinitions.h"
|
||||
|
||||
TEST_CASE("TimevalTest", "[timevalOperations]") {
|
||||
@ -121,5 +121,4 @@ TEST_CASE("TimevalTest", "[timevalOperations]"){
|
||||
REQUIRE(t1.tv_usec >= 123455);
|
||||
REQUIRE(t1.tv_usec <= 123457);
|
||||
}
|
||||
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
#include <fsfw/timemanager/Clock.h>
|
||||
#include <fsfw/globalfunctions/timevalOperations.h>
|
||||
#include <fsfw/timemanager/Clock.h>
|
||||
|
||||
#include <array>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
#include <catch2/catch_approx.hpp>
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
#include "fsfw_tests/unit/CatchDefinitions.h"
|
||||
|
||||
@ -54,7 +54,8 @@ TEST_CASE("OSAL::Clock Test", "[OSAL::Clock Test]"){
|
||||
double difference = timevalOperations::toDouble(timeAsTimeval - timeAsUsecTimeval);
|
||||
// We accept 5 ms difference
|
||||
CHECK(abs(difference) <= 0.005);
|
||||
uint64_t timevalAsUint64 = static_cast<uint64_t>(timeAsTimeval.tv_sec)*1000000ull + static_cast<uint64_t>(timeAsTimeval.tv_usec);
|
||||
uint64_t timevalAsUint64 = static_cast<uint64_t>(timeAsTimeval.tv_sec) * 1000000ull +
|
||||
static_cast<uint64_t>(timeAsTimeval.tv_usec);
|
||||
if (timeAsUsec > timevalAsUint64) {
|
||||
// This should not be the case but we can see some rounding issue sometimes
|
||||
// This is the case if used in valgrind. This might indicate an other issue
|
||||
@ -64,7 +65,6 @@ TEST_CASE("OSAL::Clock Test", "[OSAL::Clock Test]"){
|
||||
CHECK((timevalAsUint64 - timeAsUsec) >= 0);
|
||||
CHECK((timevalAsUint64 - timeAsUsec) <= (5 * 1000));
|
||||
}
|
||||
|
||||
}
|
||||
SECTION("Test j2000") {
|
||||
double j2000;
|
||||
|
@ -120,8 +120,6 @@ TEST_CASE("CCSDSTime Tests", "[TestCCSDSTime]") {
|
||||
CHECK(cdsTime.msDay_l == 0xC5);
|
||||
CHECK(cdsTime.msDay_ll == 0xC3);
|
||||
|
||||
|
||||
|
||||
// Conversion back to timeval
|
||||
timeval timeReturnAsTimeval;
|
||||
result = CCSDSTime::convertFromCDS(&timeReturnAsTimeval, &cdsTime);
|
||||
|
Loading…
Reference in New Issue
Block a user