diff --git a/Sts1CobcSw/CobcSoftware/EduCommunicationErrorThread.cpp b/Sts1CobcSw/CobcSoftware/EduCommunicationErrorThread.cpp index 0c1512ca..d463c1b1 100644 --- a/Sts1CobcSw/CobcSoftware/EduCommunicationErrorThread.cpp +++ b/Sts1CobcSw/CobcSoftware/EduCommunicationErrorThread.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include diff --git a/Sts1CobcSw/CobcSoftware/EduHeartbeatThread.cpp b/Sts1CobcSw/CobcSoftware/EduHeartbeatThread.cpp index 3d632f36..74f8c7b9 100644 --- a/Sts1CobcSw/CobcSoftware/EduHeartbeatThread.cpp +++ b/Sts1CobcSw/CobcSoftware/EduHeartbeatThread.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include #include diff --git a/Sts1CobcSw/CobcSoftware/EduListenerThread.cpp b/Sts1CobcSw/CobcSoftware/EduListenerThread.cpp index 2f9431f2..48c08331 100644 --- a/Sts1CobcSw/CobcSoftware/EduListenerThread.cpp +++ b/Sts1CobcSw/CobcSoftware/EduListenerThread.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include diff --git a/Sts1CobcSw/CobcSoftware/EduPowerManagementThread.cpp b/Sts1CobcSw/CobcSoftware/EduPowerManagementThread.cpp index c0db4929..fc02768a 100644 --- a/Sts1CobcSw/CobcSoftware/EduPowerManagementThread.cpp +++ b/Sts1CobcSw/CobcSoftware/EduPowerManagementThread.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include diff --git a/Sts1CobcSw/CobcSoftware/EduProgramQueueThread.cpp b/Sts1CobcSw/CobcSoftware/EduProgramQueueThread.cpp index ff484c50..4aaa750c 100644 --- a/Sts1CobcSw/CobcSoftware/EduProgramQueueThread.cpp +++ b/Sts1CobcSw/CobcSoftware/EduProgramQueueThread.cpp @@ -8,7 +8,8 @@ #include #include // IWYU pragma: keep #include -#include +#include +#include #include #include diff --git a/Sts1CobcSw/CobcSoftware/FlashStartupTestThread.cpp b/Sts1CobcSw/CobcSoftware/FlashStartupTestThread.cpp index 781f7379..0df2acca 100644 --- a/Sts1CobcSw/CobcSoftware/FlashStartupTestThread.cpp +++ b/Sts1CobcSw/CobcSoftware/FlashStartupTestThread.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include diff --git a/Sts1CobcSw/CobcSoftware/FramEpsStartupTestThread.cpp b/Sts1CobcSw/CobcSoftware/FramEpsStartupTestThread.cpp index 86d6c7c1..2acd72bc 100644 --- a/Sts1CobcSw/CobcSoftware/FramEpsStartupTestThread.cpp +++ b/Sts1CobcSw/CobcSoftware/FramEpsStartupTestThread.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include diff --git a/Sts1CobcSw/CobcSoftware/RfStartupTestThread.cpp b/Sts1CobcSw/CobcSoftware/RfStartupTestThread.cpp index f86c3072..aba0b998 100644 --- a/Sts1CobcSw/CobcSoftware/RfStartupTestThread.cpp +++ b/Sts1CobcSw/CobcSoftware/RfStartupTestThread.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include diff --git a/Sts1CobcSw/CobcSoftware/SpiStartupTestAndSupervisorThread.cpp b/Sts1CobcSw/CobcSoftware/SpiStartupTestAndSupervisorThread.cpp index b37653ba..6724629c 100644 --- a/Sts1CobcSw/CobcSoftware/SpiStartupTestAndSupervisorThread.cpp +++ b/Sts1CobcSw/CobcSoftware/SpiStartupTestAndSupervisorThread.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include diff --git a/Sts1CobcSw/Edu/Edu.cpp b/Sts1CobcSw/Edu/Edu.cpp index 9806ddd4..94d7fce1 100644 --- a/Sts1CobcSw/Edu/Edu.cpp +++ b/Sts1CobcSw/Edu/Edu.cpp @@ -10,8 +10,8 @@ #include #include #include +#include #include -#include #include diff --git a/Sts1CobcSw/Edu/Types.hpp b/Sts1CobcSw/Edu/Types.hpp index ce7fea7a..98e635a5 100644 --- a/Sts1CobcSw/Edu/Types.hpp +++ b/Sts1CobcSw/Edu/Types.hpp @@ -4,7 +4,6 @@ #include #include #include -#include #include #include diff --git a/Sts1CobcSw/FileSystem/FileSystem.cpp b/Sts1CobcSw/FileSystem/FileSystem.cpp index 0ac0b0cc..833ec0c7 100644 --- a/Sts1CobcSw/FileSystem/FileSystem.cpp +++ b/Sts1CobcSw/FileSystem/FileSystem.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include diff --git a/Sts1CobcSw/FileSystem/LfsFlash.cpp b/Sts1CobcSw/FileSystem/LfsFlash.cpp index 67426749..f45e7cb6 100644 --- a/Sts1CobcSw/FileSystem/LfsFlash.cpp +++ b/Sts1CobcSw/FileSystem/LfsFlash.cpp @@ -4,7 +4,7 @@ #include // IWYU pragma: associated #include #include -#include +#include #include diff --git a/Sts1CobcSw/FramSections/PersistentVariables.hpp b/Sts1CobcSw/FramSections/PersistentVariables.hpp index 8f23fcf3..dcd7f2b1 100644 --- a/Sts1CobcSw/FramSections/PersistentVariables.hpp +++ b/Sts1CobcSw/FramSections/PersistentVariables.hpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include @@ -61,7 +61,7 @@ class PersistentVariables Subsections(), PersistentVariableInfos...>(); // With a baud rate of 48 MHz we can read 6000 bytes in 1 ms, which should be more than enough - static constexpr auto spiTimeout = 1 * Duration(RODOS::MILLISECONDS); + static constexpr auto spiTimeout = 1 * ms; static RODOS::Semaphore semaphore; }; diff --git a/Sts1CobcSw/FramSections/RingArray.hpp b/Sts1CobcSw/FramSections/RingArray.hpp index 499b142b..44aaf226 100644 --- a/Sts1CobcSw/FramSections/RingArray.hpp +++ b/Sts1CobcSw/FramSections/RingArray.hpp @@ -8,9 +8,8 @@ #include #include #include +#include #include -#include -#include #include diff --git a/Sts1CobcSw/Hal/Uart.ipp b/Sts1CobcSw/Hal/Uart.ipp index ceda1f55..7ae6a6b6 100644 --- a/Sts1CobcSw/Hal/Uart.ipp +++ b/Sts1CobcSw/Hal/Uart.ipp @@ -2,7 +2,7 @@ #include -#include +#include namespace sts1cobcsw::hal diff --git a/Sts1CobcSw/Periphery/Eps.cpp b/Sts1CobcSw/Periphery/Eps.cpp index 4f984087..92842e65 100644 --- a/Sts1CobcSw/Periphery/Eps.cpp +++ b/Sts1CobcSw/Periphery/Eps.cpp @@ -6,8 +6,8 @@ #include #include #include +#include #include -#include #include diff --git a/Sts1CobcSw/Periphery/Flash.cpp b/Sts1CobcSw/Periphery/Flash.cpp index d4c37c81..e0610bdc 100644 --- a/Sts1CobcSw/Periphery/Flash.cpp +++ b/Sts1CobcSw/Periphery/Flash.cpp @@ -3,8 +3,8 @@ #include #include #include +#include #include -#include #include #include diff --git a/Sts1CobcSw/Periphery/Fram.cpp b/Sts1CobcSw/Periphery/Fram.cpp index 23268109..8e45dcc8 100644 --- a/Sts1CobcSw/Periphery/Fram.cpp +++ b/Sts1CobcSw/Periphery/Fram.cpp @@ -7,10 +7,9 @@ #include #include #include +#include #include -#include - #include @@ -23,7 +22,7 @@ EdacVariable framIsWorking(true); // --- Private globals --- -constexpr auto spiTimeout = 1 * Duration(RODOS::MILLISECONDS); +constexpr auto spiTimeout = 1 * ms; constexpr auto endianness = std::endian::big; // Command opcodes according to section 4.1 in CY15B108QN-40SXI datasheet. I couldn't use an enum diff --git a/Sts1CobcSw/Periphery/Rf.cpp b/Sts1CobcSw/Periphery/Rf.cpp index 94f31f8f..0332743a 100644 --- a/Sts1CobcSw/Periphery/Rf.cpp +++ b/Sts1CobcSw/Periphery/Rf.cpp @@ -10,8 +10,8 @@ #include #include #include +#include #include -#include #include diff --git a/Sts1CobcSw/Utility/Debug.hpp b/Sts1CobcSw/Utility/Debug.hpp index a9646a8d..37a14962 100644 --- a/Sts1CobcSw/Utility/Debug.hpp +++ b/Sts1CobcSw/Utility/Debug.hpp @@ -1,7 +1,7 @@ #pragma once -#include +#include #include diff --git a/Tests/HardwareTests/EduCommands.test.cpp b/Tests/HardwareTests/EduCommands.test.cpp index 4a0ceeb6..4c49b110 100644 --- a/Tests/HardwareTests/EduCommands.test.cpp +++ b/Tests/HardwareTests/EduCommands.test.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include diff --git a/Tests/HardwareTests/Flash.test.cpp b/Tests/HardwareTests/Flash.test.cpp index d58aea61..c8915591 100644 --- a/Tests/HardwareTests/Flash.test.cpp +++ b/Tests/HardwareTests/Flash.test.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #include diff --git a/Tests/HardwareTests/MaxPower.test.cpp b/Tests/HardwareTests/MaxPower.test.cpp index 80522ef4..16bc2e13 100644 --- a/Tests/HardwareTests/MaxPower.test.cpp +++ b/Tests/HardwareTests/MaxPower.test.cpp @@ -5,8 +5,8 @@ #include #include #include +#include #include -#include #include #include diff --git a/Tests/HardwareTests/SpiSupervisor.test.cpp b/Tests/HardwareTests/SpiSupervisor.test.cpp index f492a7d2..c4f6fa70 100644 --- a/Tests/HardwareTests/SpiSupervisor.test.cpp +++ b/Tests/HardwareTests/SpiSupervisor.test.cpp @@ -4,8 +4,8 @@ #include #include #include +#include #include -#include #include diff --git a/Tests/HardwareTests/Uart.test.cpp b/Tests/HardwareTests/Uart.test.cpp index a805eb38..582849cd 100644 --- a/Tests/HardwareTests/Uart.test.cpp +++ b/Tests/HardwareTests/Uart.test.cpp @@ -12,8 +12,8 @@ #include #include #include +#include #include -#include #include #include diff --git a/Tests/HardwareTests/Watchdog.test.cpp b/Tests/HardwareTests/Watchdog.test.cpp index d5b07134..e634c2ab 100644 --- a/Tests/HardwareTests/Watchdog.test.cpp +++ b/Tests/HardwareTests/Watchdog.test.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include #include diff --git a/Tests/UnitTests/Fram.test.cpp b/Tests/UnitTests/Fram.test.cpp index 66e48c77..182a76a9 100644 --- a/Tests/UnitTests/Fram.test.cpp +++ b/Tests/UnitTests/Fram.test.cpp @@ -1,8 +1,8 @@ #include #include #include +#include #include -#include #include #include @@ -21,9 +21,7 @@ namespace fram = sts1cobcsw::fram; using sts1cobcsw::Byte; using sts1cobcsw::Span; using sts1cobcsw::operator""_b; // NOLINT(misc-unused-using-decls) -// For some reason including Time.hpp causes the test to fail with "Program ERROR topic deleted!!", -// etc. Therefore, we define ms here again. -constexpr auto ms = sts1cobcsw::Duration(RODOS::MILLISECONDS); +using sts1cobcsw::ms; auto WriteAndReadTestData(sts1cobcsw::fram::Address address) -> void; diff --git a/iwyu.imp b/iwyu.imp index f59d448a..9882ed9e 100644 --- a/iwyu.imp +++ b/iwyu.imp @@ -58,10 +58,11 @@ { include: ["\"Sts1CobcSw/Serial/Byte.ipp\"", "private", "", "public"] }, { include: ["\"Sts1CobcSw/Serial/Serial.ipp\"", "private", "", "public"] }, { include: ["\"Sts1CobcSw/Utility/ErrorDetectionAndCorrection.ipp\"", "private", "", "public"] }, + { include: ["\"Sts1CobcSw/Utility/RealTime.ipp\"", "private", "", "public"] }, + { include: ["\"Sts1CobcSw/Utility/RodosTime.ipp\"", "private", "", "public"] }, { include: ["\"Sts1CobcSw/Utility/Span.ipp\"", "private", "", "public"] }, { include: ["\"Sts1CobcSw/Utility/StringLiteral.ipp\"", "private", "", "public"] }, - { include: ["\"Sts1CobcSw/Utility/RodosTime.ipp\"", "private", "", "public"] }, - { include: ["\"Sts1CobcSw/Utility/RealTime.ipp\"", "private", "", "public"] }, + { include: ["\"Sts1CobcSw/Utility/TimeTypes.ipp\"", "private", "", "public"] }, # Include all our headers with <> instead of "" { include: ["\"Sts1CobcSw/Edu/Edu.hpp\"", "public", "", "public"] }, @@ -99,10 +100,11 @@ { include: ["\"Sts1CobcSw/Utility/Debug.hpp\"", "public", "", "public"] }, { include: ["\"Sts1CobcSw/Utility/ErrorDetectionAndCorrection.hpp\"", "public", "", "public"] }, { include: ["\"Sts1CobcSw/Utility/FlatArray.hpp\"", "public", "", "public"] }, + { include: ["\"Sts1CobcSw/Utility/RealTime.hpp\"", "public", "", "public"] }, + { include: ["\"Sts1CobcSw/Utility/RodosTime.hpp\"", "public", "", "public"] }, { include: ["\"Sts1CobcSw/Utility/Span.hpp\"", "public", "", "public"] }, { include: ["\"Sts1CobcSw/Utility/StringLiteral.hpp\"", "public", "", "public"] }, - { include: ["\"Sts1CobcSw/Utility/RodosTime.hpp\"", "public", "", "public"] }, - { include: ["\"Sts1CobcSw/Utility/RealTime.hpp\"", "public", "", "public"] }, + { include: ["\"Sts1CobcSw/Utility/TimeTypes.hpp\"", "public", "", "public"] }, { include: ["\"Sts1CobcSw/CommandParser.hpp\"", "public", "", "public"] }, { include: ["\"Sts1CobcSw/EduCommunicationErrorThread.hpp\"", "public", "", "public"] }, { include: ["\"Sts1CobcSw/EduListenerThread.hpp\"", "public", "", "public"] },