Skip to content

Commit

Permalink
Refactor EDU code (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickKa authored Feb 10, 2024
2 parents fcb8544 + db8dc2d commit 2759332
Show file tree
Hide file tree
Showing 29 changed files with 531 additions and 688 deletions.
2 changes: 1 addition & 1 deletion Sts1CobcSw/CommandParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ auto BuildEduQueue(std::span<Byte const> commandData) -> void

edu::programQueue.clear();
ParseAndAddQueueEntries(commandData);
edu::queueIndex = 0U;
edu::queueIndex = 0;

RODOS::PRINTF("Queue index reset. Current size of EDU program queue is %d.\n",
static_cast<int>(edu::programQueue.size()));
Expand Down
8 changes: 4 additions & 4 deletions Sts1CobcSw/CommandParser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ enum CommandId : char

struct GsCommandHeader
{
char startCharacter;
std::int32_t utc;
std::int8_t commandId;
std::int16_t length;
char startCharacter = '\0';
std::int32_t utc = 0;
std::int8_t commandId = 0;
std::int16_t length = 0;
};


Expand Down
2 changes: 1 addition & 1 deletion Sts1CobcSw/CommandParserThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class CommandParserThread : public RODOS::StaticThread<stackSize>
// module
std::size_t const nReadCharacters =
RODOS::uart_stdout.read(&readCharacter, sizeof(readCharacter));
if(nReadCharacters == 0U)
if(nReadCharacters == 0)
{
RODOS::uart_stdout.suspendUntilDataReady();
continue;
Expand Down
2 changes: 1 addition & 1 deletion Sts1CobcSw/Dummy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ struct Dummy

static constexpr auto maxNameLength = 42;

etl::string<maxNameLength> name;
etl::string<maxNameLength> name = "";
};
}
1 change: 1 addition & 0 deletions Sts1CobcSw/Edu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ target_link_libraries(Sts1CobcSw_Edu PRIVATE Sts1CobcSw_Utility)
if(CMAKE_SYSTEM_NAME STREQUAL Generic)
target_sources(Sts1CobcSw_Edu PRIVATE Edu.cpp)
target_link_libraries(Sts1CobcSw_Edu PUBLIC Sts1CobcSw_Hal Sts1CobcSw_Periphery)
target_link_libraries(Sts1CobcSw_Edu PRIVATE etl::etl)
endif()
if(CMAKE_SYSTEM_NAME STREQUAL Linux)
target_sources(Sts1CobcSw_Edu PRIVATE EduMock.cpp)
Expand Down
Loading

0 comments on commit 2759332

Please sign in to comment.