-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into topic/codeowners
- Loading branch information
Showing
5 changed files
with
246 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,11 +11,19 @@ | |
#ifndef CONSTS_H | ||
#define CONSTS_H | ||
|
||
/****************************************************************************** | ||
* @brief Namespace containing all constants for autonomy software. Including | ||
* AutonomyGlobals.h will also include this namespace. | ||
* | ||
* | ||
* @author ClayJay3 ([email protected]) | ||
* @date 2023-08-05 | ||
******************************************************************************/ | ||
namespace constants | ||
{ | ||
// Drive Constants | ||
const int MAX_DRIVE_POWER = 250; | ||
const int MIN_DRIVE_POWER = 50; | ||
} // namespace constants | ||
} // namespace constants | ||
|
||
#endif // CONSTS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,10 +48,9 @@ class AutonomyThread | |
/****************************************************************************** | ||
* @brief This method is ran in a seperate thread. It is a middleware between the | ||
* class member thread and the user code that handles graceful stopping of | ||
* user code. | ||
* user code. This method is intentionally designed to not return anything. | ||
* | ||
* @param bStopThread - Atomic shared variable that signals the thread to stop interating. | ||
* @return T - Variable return type from user code. | ||
* | ||
* @author ClayJay3 ([email protected]) | ||
* @date 2023-0724 | ||
|
@@ -264,7 +263,9 @@ class AutonomyThread | |
|
||
/****************************************************************************** | ||
* @brief Accessor for the Pool Results private member. The action of getting | ||
* results will destroy and remove them from this object. | ||
* results will destroy and remove them from this object. This method blocks | ||
* if the thread is not finished, so no need to call JoinPool() before getting | ||
* results. | ||
* | ||
* @return std::vector<T> - A vector containing the returns from each thread that | ||
* ran the PooledLinearCode. | ||
|
@@ -409,7 +410,7 @@ class AutonomyThread | |
bool Joinable() const | ||
{ | ||
// Check current number of running and queued tasks. | ||
if (m_thMainThread.get_tasks_total() <= 0 && m_thPool.get_tasks_total() && m_thLoopPool.get_tasks_total()) | ||
if (m_thMainThread.get_tasks_total() <= 0 && m_thPool.get_tasks_total() <= 0 && m_thLoopPool.get_tasks_total() <= 0) | ||
{ | ||
// Threads are joinable. | ||
return true; | ||
|
Oops, something went wrong.