Skip to content

Commit

Permalink
Make requested PR changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ClayJay3 committed Mar 18, 2024
1 parent 53bafc8 commit 2d0190c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ The **src** directory serves as the main source code directory and contains the

There are two primary run modes for our Autonomy Codebase.

1) **Standard Mode:** Which operates using the Onboard Rover System and communicates using that standard RoveComm manifest and IP Addresses. To build and run Autonomy in this mode use the following commands:
1) **Standard Mode:** Which operates using the Onboard Rover System and communicates using the standard RoveComm manifest and IP Addresses. To build and run Autonomy in this mode use the following commands:

```
mkdir -p <Autonomy Install Location>/build
Expand Down
2 changes: 1 addition & 1 deletion src/AutonomyLogging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ namespace logging

// Set Handler Filters
qFileHandler->add_filter(std::make_unique<LoggingFilter>("FileFilter", quill::LogLevel::TraceL3));
qConsoleHandler->add_filter(std::make_unique<LoggingFilter>("StdoutFilter", quill::LogLevel::Info));
qConsoleHandler->add_filter(std::make_unique<LoggingFilter>("ConsoleFilter", quill::LogLevel::Info));

// Create Loggers
g_qFileLogger = quill::create_logger("FILE_LOGGER", {qFileHandler});
Expand Down
2 changes: 1 addition & 1 deletion src/AutonomyLogging.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ namespace logging
(void) log_message_timestamp;
(void) formatted_record;

// Log only WARNINGS or higher to stdout.
// Log only m_eMinLogLevel or higher to stdout.
return metadata.level() >= m_eMinLogLevel;
}
};
Expand Down
9 changes: 7 additions & 2 deletions src/handlers/StateMachineHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,13 @@ StateMachineHandler::StateMachineHandler()
* @date 2024-03-15
******************************************************************************/
StateMachineHandler::~StateMachineHandler()
{ // Stop state machine.
this->StopStateMachine();
{
// Check if state machine is running.
if (this->GetThreadState() == AutonomyThreadState::eRunning)
{
// Stop state machine.
this->StopStateMachine();
}
}

/******************************************************************************
Expand Down
5 changes: 3 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ int main()
{
// Submit logger message.
LOG_WARNING(logging::g_qSharedLogger,
"Autonomy_Software is running in SIM mode! If you aren't currently using the WeBots sim, disable SIM mode in constants");
"Autonomy_Software is running in SIM mode! If you aren't currently using the WeBots sim, disable SIM mode in CMakeLists.txt or in your build "
"arguments!");
}

// Sleep for 3 seconds to make sure it's seen.
Expand All @@ -111,7 +112,7 @@ int main()
globals::g_pRoveCommTCPNode = new rovecomm::RoveCommTCP();
// Start RoveComm instances bound on ports.
bool bRoveCommUDPInitSuccess = globals::g_pRoveCommUDPNode->InitUDPSocket(manifest::General::ETHERNET_UDP_PORT);
bool bRoveCommTCPInitSuccess = globals::g_pRoveCommTCPNode->InitTCPSocket(constants::ROVECOMM_TCP_INTERFACE_IP.c_str(), manifest::General::ETHERNET_UDP_PORT);
bool bRoveCommTCPInitSuccess = globals::g_pRoveCommTCPNode->InitTCPSocket(constants::ROVECOMM_TCP_INTERFACE_IP.c_str(), manifest::General::ETHERNET_TCP_PORT);
// Check if RoveComm was successfully initialized.
if (!bRoveCommUDPInitSuccess || !bRoveCommTCPInitSuccess)
{
Expand Down

0 comments on commit 2d0190c

Please sign in to comment.