Skip to content

Commit

Permalink
Fix includes
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickKa committed Sep 23, 2024
1 parent 8675043 commit 54f7c8a
Show file tree
Hide file tree
Showing 29 changed files with 37 additions and 39 deletions.
2 changes: 1 addition & 1 deletion Sts1CobcSw/CobcSoftware/EduCommunicationErrorThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <Sts1CobcSw/FramSections/FramLayout.hpp>
#include <Sts1CobcSw/FramSections/PersistentVariables.hpp>
#include <Sts1CobcSw/Utility/Debug.hpp>
#include <Sts1CobcSw/Utility/Time.hpp>
#include <Sts1CobcSw/Utility/RodosTime.hpp>

#include <strong_type/difference.hpp>

Expand Down
2 changes: 1 addition & 1 deletion Sts1CobcSw/CobcSoftware/EduHeartbeatThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <Sts1CobcSw/Hal/GpioPin.hpp>
#include <Sts1CobcSw/Hal/IoNames.hpp>
#include <Sts1CobcSw/Utility/Debug.hpp>
#include <Sts1CobcSw/Utility/Time.hpp>
#include <Sts1CobcSw/Utility/RodosTime.hpp>
#include <Sts1CobcSw/Utility/TimeTypes.hpp>

#include <strong_type/affine_point.hpp>
Expand Down
2 changes: 1 addition & 1 deletion Sts1CobcSw/CobcSoftware/EduListenerThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <Sts1CobcSw/Edu/ProgramStatusHistory.hpp>
#include <Sts1CobcSw/Edu/Types.hpp>
#include <Sts1CobcSw/Hal/IoNames.hpp>
#include <Sts1CobcSw/Utility/Time.hpp>
#include <Sts1CobcSw/Utility/RodosTime.hpp>

#include <strong_type/difference.hpp>
#include <strong_type/type.hpp>
Expand Down
2 changes: 1 addition & 1 deletion Sts1CobcSw/CobcSoftware/EduPowerManagementThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <Sts1CobcSw/Hal/GpioPin.hpp>
#include <Sts1CobcSw/Hal/IoNames.hpp>
#include <Sts1CobcSw/Utility/Debug.hpp>
#include <Sts1CobcSw/Utility/Time.hpp>
#include <Sts1CobcSw/Utility/RodosTime.hpp>
#include <Sts1CobcSw/Utility/TimeTypes.hpp>

#include <strong_type/difference.hpp>
Expand Down
3 changes: 2 additions & 1 deletion Sts1CobcSw/CobcSoftware/EduProgramQueueThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
#include <Sts1CobcSw/Edu/Types.hpp>
#include <Sts1CobcSw/ProgramId/ProgramId.hpp> // IWYU pragma: keep
#include <Sts1CobcSw/Utility/Debug.hpp>
#include <Sts1CobcSw/Utility/Time.hpp>
#include <Sts1CobcSw/Utility/RealTime.hpp>
#include <Sts1CobcSw/Utility/RodosTime.hpp>
#include <Sts1CobcSw/Utility/TimeTypes.hpp>

#include <strong_type/affine_point.hpp>
Expand Down
2 changes: 1 addition & 1 deletion Sts1CobcSw/CobcSoftware/FlashStartupTestThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <Sts1CobcSw/FramSections/PersistentVariables.hpp>
#include <Sts1CobcSw/Periphery/Flash.hpp>
#include <Sts1CobcSw/Utility/Debug.hpp>
#include <Sts1CobcSw/Utility/Time.hpp>
#include <Sts1CobcSw/Utility/RodosTime.hpp>

#include <rodos_no_using_namespace.h>

Expand Down
2 changes: 1 addition & 1 deletion Sts1CobcSw/CobcSoftware/FramEpsStartupTestThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <Sts1CobcSw/Periphery/Fram.hpp>
#include <Sts1CobcSw/Utility/Debug.hpp>
#include <Sts1CobcSw/Utility/ErrorDetectionAndCorrection.hpp>
#include <Sts1CobcSw/Utility/Time.hpp>
#include <Sts1CobcSw/Utility/RodosTime.hpp>

#include <rodos_no_using_namespace.h>

Expand Down
2 changes: 1 addition & 1 deletion Sts1CobcSw/CobcSoftware/RfStartupTestThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <Sts1CobcSw/FramSections/PersistentVariables.hpp>
#include <Sts1CobcSw/Periphery/Rf.hpp>
#include <Sts1CobcSw/Utility/Debug.hpp>
#include <Sts1CobcSw/Utility/Time.hpp>
#include <Sts1CobcSw/Utility/RodosTime.hpp>

#include <rodos_no_using_namespace.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <Sts1CobcSw/Periphery/Rf.hpp>
#include <Sts1CobcSw/Utility/Debug.hpp>
#include <Sts1CobcSw/Utility/ErrorDetectionAndCorrection.hpp>
#include <Sts1CobcSw/Utility/Time.hpp>
#include <Sts1CobcSw/Utility/RodosTime.hpp>
#include <Sts1CobcSw/Utility/TimeTypes.hpp>

#include <strong_type/affine_point.hpp>
Expand Down
2 changes: 1 addition & 1 deletion Sts1CobcSw/Edu/Edu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#include <Sts1CobcSw/Serial/Serial.hpp>
#include <Sts1CobcSw/Utility/Crc32Software.hpp>
#include <Sts1CobcSw/Utility/Debug.hpp>
#include <Sts1CobcSw/Utility/RodosTime.hpp>
#include <Sts1CobcSw/Utility/Span.hpp>
#include <Sts1CobcSw/Utility/Time.hpp>

#include <strong_type/difference.hpp>

Expand Down
1 change: 0 additions & 1 deletion Sts1CobcSw/Edu/Types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <Sts1CobcSw/ProgramId/ProgramId.hpp>
#include <Sts1CobcSw/Serial/Byte.hpp>
#include <Sts1CobcSw/Serial/Serial.hpp>
#include <Sts1CobcSw/Utility/Time.hpp>
#include <Sts1CobcSw/Utility/TimeTypes.hpp>

#include <cstddef>
Expand Down
2 changes: 1 addition & 1 deletion Sts1CobcSw/FileSystem/FileSystem.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <Sts1CobcSw/FileSystem/FileSystem.hpp>
#include <Sts1CobcSw/Periphery/Flash.hpp>
#include <Sts1CobcSw/Serial/Byte.hpp>
#include <Sts1CobcSw/Utility/Time.hpp>
#include <Sts1CobcSw/Utility/RodosTime.hpp>

#include <strong_type/difference.hpp>

Expand Down
2 changes: 1 addition & 1 deletion Sts1CobcSw/FileSystem/LfsFlash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <Sts1CobcSw/FileSystem/LfsStorageDevice.hpp> // IWYU pragma: associated
#include <Sts1CobcSw/Periphery/Flash.hpp>
#include <Sts1CobcSw/Serial/Byte.hpp>
#include <Sts1CobcSw/Utility/Time.hpp>
#include <Sts1CobcSw/Utility/RodosTime.hpp>

#include <strong_type/difference.hpp>

Expand Down
4 changes: 2 additions & 2 deletions Sts1CobcSw/FramSections/PersistentVariables.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <Sts1CobcSw/FramSections/Section.hpp>
#include <Sts1CobcSw/FramSections/Subsections.hpp>
#include <Sts1CobcSw/Periphery/Fram.hpp>
#include <Sts1CobcSw/Utility/TimeTypes.hpp>
#include <Sts1CobcSw/Utility/RodosTime.hpp>

#include <rodos/api/rodos-semaphore.h>
#include <rodos/api/timemodel.h>
Expand Down Expand Up @@ -61,7 +61,7 @@ class PersistentVariables
Subsections<subsections.template Get<"2">(), 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;
};
Expand Down
3 changes: 1 addition & 2 deletions Sts1CobcSw/FramSections/RingArray.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
#include <Sts1CobcSw/FramSections/Subsections.hpp>
#include <Sts1CobcSw/Periphery/Fram.hpp>
#include <Sts1CobcSw/Serial/Serial.hpp>
#include <Sts1CobcSw/Utility/RodosTime.hpp>
#include <Sts1CobcSw/Utility/Span.hpp>
#include <Sts1CobcSw/Utility/Time.hpp>
#include <Sts1CobcSw/Utility/TimeTypes.hpp>

#include <rodos/api/rodos-semaphore.h>

Expand Down
2 changes: 1 addition & 1 deletion Sts1CobcSw/Hal/Uart.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


#include <Sts1CobcSw/Hal/Uart.hpp>
#include <Sts1CobcSw/Utility/Time.hpp>
#include <Sts1CobcSw/Utility/RodosTime.hpp>


namespace sts1cobcsw::hal
Expand Down
2 changes: 1 addition & 1 deletion Sts1CobcSw/Periphery/Eps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#include <Sts1CobcSw/Serial/Byte.hpp>
#include <Sts1CobcSw/Serial/Serial.hpp>
#include <Sts1CobcSw/Utility/FlatArray.hpp>
#include <Sts1CobcSw/Utility/RodosTime.hpp>
#include <Sts1CobcSw/Utility/Span.hpp>
#include <Sts1CobcSw/Utility/Time.hpp>

#include <strong_type/difference.hpp>

Expand Down
2 changes: 1 addition & 1 deletion Sts1CobcSw/Periphery/Flash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#include <Sts1CobcSw/Periphery/Flash.hpp>
#include <Sts1CobcSw/Serial/Byte.hpp>
#include <Sts1CobcSw/Serial/Serial.hpp>
#include <Sts1CobcSw/Utility/RodosTime.hpp>
#include <Sts1CobcSw/Utility/Span.hpp>
#include <Sts1CobcSw/Utility/Time.hpp>

#include <strong_type/affine_point.hpp>
#include <strong_type/difference.hpp>
Expand Down
5 changes: 2 additions & 3 deletions Sts1CobcSw/Periphery/Fram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
#include <Sts1CobcSw/Periphery/Fram.hpp>
#include <Sts1CobcSw/Periphery/FramEpsSpi.hpp>
#include <Sts1CobcSw/Serial/Serial.hpp>
#include <Sts1CobcSw/Utility/RodosTime.hpp>
#include <Sts1CobcSw/Utility/Span.hpp>

#include <rodos_no_using_namespace.h>

#include <bit>


Expand All @@ -23,7 +22,7 @@ EdacVariable<bool> 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
Expand Down
2 changes: 1 addition & 1 deletion Sts1CobcSw/Periphery/Rf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#include <Sts1CobcSw/Serial/Byte.hpp>
#include <Sts1CobcSw/Serial/Serial.hpp>
#include <Sts1CobcSw/Utility/FlatArray.hpp>
#include <Sts1CobcSw/Utility/RodosTime.hpp>
#include <Sts1CobcSw/Utility/Span.hpp>
#include <Sts1CobcSw/Utility/Time.hpp>

#include <strong_type/difference.hpp>

Expand Down
2 changes: 1 addition & 1 deletion Sts1CobcSw/Utility/Debug.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once


#include <Sts1CobcSw/Utility/Time.hpp>
#include <Sts1CobcSw/Utility/RealTime.hpp>

#include <rodos_no_using_namespace.h>

Expand Down
2 changes: 1 addition & 1 deletion Tests/HardwareTests/EduCommands.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <Sts1CobcSw/Hal/Uart.hpp>
#include <Sts1CobcSw/ProgramId/ProgramId.hpp>
#include <Sts1CobcSw/Serial/Byte.hpp>
#include <Sts1CobcSw/Utility/Time.hpp>
#include <Sts1CobcSw/Utility/RealTime.hpp>
#include <Sts1CobcSw/Utility/TimeTypes.hpp>

#include <strong_type/type.hpp>
Expand Down
2 changes: 1 addition & 1 deletion Tests/HardwareTests/Flash.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <Sts1CobcSw/Hal/GpioPin.hpp>
#include <Sts1CobcSw/Periphery/Flash.hpp>
#include <Sts1CobcSw/Serial/Byte.hpp>
#include <Sts1CobcSw/Utility/Time.hpp>
#include <Sts1CobcSw/Utility/RodosTime.hpp>
#include <Sts1CobcSw/Utility/TimeTypes.hpp>

#include <strong_type/affine_point.hpp>
Expand Down
2 changes: 1 addition & 1 deletion Tests/HardwareTests/MaxPower.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include <Sts1CobcSw/Hal/Uart.hpp>
#include <Sts1CobcSw/Periphery/Fram.hpp>
#include <Sts1CobcSw/Serial/Byte.hpp>
#include <Sts1CobcSw/Utility/RodosTime.hpp>
#include <Sts1CobcSw/Utility/Span.hpp>
#include <Sts1CobcSw/Utility/Time.hpp>

#include <strong_type/difference.hpp>
#include <strong_type/type.hpp>
Expand Down
2 changes: 1 addition & 1 deletion Tests/HardwareTests/SpiSupervisor.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#include <Sts1CobcSw/Periphery/Flash.hpp>
#include <Sts1CobcSw/Periphery/Fram.hpp>
#include <Sts1CobcSw/Serial/Byte.hpp>
#include <Sts1CobcSw/Utility/RodosTime.hpp>
#include <Sts1CobcSw/Utility/Span.hpp>
#include <Sts1CobcSw/Utility/Time.hpp>

#include <strong_type/difference.hpp>

Expand Down
2 changes: 1 addition & 1 deletion Tests/HardwareTests/Uart.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include <Sts1CobcSw/Hal/IoNames.hpp>
#include <Sts1CobcSw/Hal/Uart.hpp>
#include <Sts1CobcSw/Serial/Byte.hpp>
#include <Sts1CobcSw/Utility/RodosTime.hpp>
#include <Sts1CobcSw/Utility/Span.hpp>
#include <Sts1CobcSw/Utility/Time.hpp>
#include <Sts1CobcSw/Utility/TimeTypes.hpp>

#include <strong_type/affine_point.hpp>
Expand Down
2 changes: 1 addition & 1 deletion Tests/HardwareTests/Watchdog.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <Sts1CobcSw/Hal/GpioPin.hpp>
#include <Sts1CobcSw/Hal/IoNames.hpp>
#include <Sts1CobcSw/Utility/Time.hpp>
#include <Sts1CobcSw/Utility/RodosTime.hpp>

#include <strong_type/difference.hpp>

Expand Down
6 changes: 2 additions & 4 deletions Tests/UnitTests/Fram.test.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include <Sts1CobcSw/Periphery/Fram.hpp>
#include <Sts1CobcSw/Periphery/FramMock.hpp>
#include <Sts1CobcSw/Serial/Byte.hpp>
#include <Sts1CobcSw/Utility/RodosTime.hpp>
#include <Sts1CobcSw/Utility/Span.hpp>
#include <Sts1CobcSw/Utility/TimeTypes.hpp>

#include <catch2/catch_test_macros.hpp>
#include <catch2/generators/catch_generators.hpp>
Expand All @@ -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;
Expand Down
10 changes: 6 additions & 4 deletions iwyu.imp
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@
{ include: ["\"Sts1CobcSw/Serial/Byte.ipp\"", "private", "<Sts1CobcSw/Serial/Byte.hpp>", "public"] },
{ include: ["\"Sts1CobcSw/Serial/Serial.ipp\"", "private", "<Sts1CobcSw/Serial/Serial.hpp>", "public"] },
{ include: ["\"Sts1CobcSw/Utility/ErrorDetectionAndCorrection.ipp\"", "private", "<Sts1CobcSw/Utility/ErrorDetectionAndCorrection.hpp>", "public"] },
{ include: ["\"Sts1CobcSw/Utility/RealTime.ipp\"", "private", "<Sts1CobcSw/Utility/RealTime.hpp>", "public"] },
{ include: ["\"Sts1CobcSw/Utility/RodosTime.ipp\"", "private", "<Sts1CobcSw/Utility/RodosTime.hpp>", "public"] },
{ include: ["\"Sts1CobcSw/Utility/Span.ipp\"", "private", "<Sts1CobcSw/Utility/Span.hpp>", "public"] },
{ include: ["\"Sts1CobcSw/Utility/StringLiteral.ipp\"", "private", "<Sts1CobcSw/Utility/StringLiteral.hpp>", "public"] },
{ include: ["\"Sts1CobcSw/Utility/RodosTime.ipp\"", "private", "<Sts1CobcSw/Utility/RodosTime.hpp>", "public"] },
{ include: ["\"Sts1CobcSw/Utility/RealTime.ipp\"", "private", "<Sts1CobcSw/Utility/RealTime.hpp>", "public"] },
{ include: ["\"Sts1CobcSw/Utility/TimeTypes.ipp\"", "private", "<Sts1CobcSw/Utility/TimeTypes.hpp>", "public"] },

# Include all our headers with <> instead of ""
{ include: ["\"Sts1CobcSw/Edu/Edu.hpp\"", "public", "<Sts1CobcSw/Edu/Edu.hpp>", "public"] },
Expand Down Expand Up @@ -99,10 +100,11 @@
{ include: ["\"Sts1CobcSw/Utility/Debug.hpp\"", "public", "<Sts1CobcSw/Utility/Debug.hpp>", "public"] },
{ include: ["\"Sts1CobcSw/Utility/ErrorDetectionAndCorrection.hpp\"", "public", "<Sts1CobcSw/Utility/ErrorDetectionAndCorrection.hpp>", "public"] },
{ include: ["\"Sts1CobcSw/Utility/FlatArray.hpp\"", "public", "<Sts1CobcSw/Utility/FlatArray.hpp>", "public"] },
{ include: ["\"Sts1CobcSw/Utility/RealTime.hpp\"", "public", "<Sts1CobcSw/Utility/RealTime.hpp>", "public"] },
{ include: ["\"Sts1CobcSw/Utility/RodosTime.hpp\"", "public", "<Sts1CobcSw/Utility/RodosTime.hpp>", "public"] },
{ include: ["\"Sts1CobcSw/Utility/Span.hpp\"", "public", "<Sts1CobcSw/Utility/Span.hpp>", "public"] },
{ include: ["\"Sts1CobcSw/Utility/StringLiteral.hpp\"", "public", "<Sts1CobcSw/Utility/StringLiteral.hpp>", "public"] },
{ include: ["\"Sts1CobcSw/Utility/RodosTime.hpp\"", "public", "<Sts1CobcSw/Utility/RodosTime.hpp>", "public"] },
{ include: ["\"Sts1CobcSw/Utility/RealTime.hpp\"", "public", "<Sts1CobcSw/Utility/RealTime.hpp>", "public"] },
{ include: ["\"Sts1CobcSw/Utility/TimeTypes.hpp\"", "public", "<Sts1CobcSw/Utility/TimeTypes.hpp>", "public"] },
{ include: ["\"Sts1CobcSw/CommandParser.hpp\"", "public", "<Sts1CobcSw/CommandParser.hpp>", "public"] },
{ include: ["\"Sts1CobcSw/EduCommunicationErrorThread.hpp\"", "public", "<Sts1CobcSw/EduCommunicationErrorThread.hpp>", "public"] },
{ include: ["\"Sts1CobcSw/EduListenerThread.hpp\"", "public", "<Sts1CobcSw/EduListenerThread.hpp>", "public"] },
Expand Down

0 comments on commit 54f7c8a

Please sign in to comment.