-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e9847f5
commit ac72dc6
Showing
68 changed files
with
1,264 additions
and
1,048 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
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include "frc846/robot/RobotState.h" | ||
|
||
namespace frc846::robot { | ||
|
||
RSTable::RSTable(std::string table_name) | ||
: frc846::base::Loggable{table_name}, table_{} {} | ||
|
||
std::vector<std::string> RSTable::ListKeys() { | ||
std::vector<std::string> keys; | ||
for (const auto& [key, value] : table_) { | ||
keys.push_back(key); | ||
} | ||
return keys; | ||
} | ||
|
||
std::unordered_map<std::string, RSTable*> RobotState::tables_{}; | ||
|
||
RSTable* RobotState::getTable(std::string table_name) { | ||
if (tables_.find(table_name) == tables_.end()) { | ||
tables_.insert({table_name, new RSTable{table_name}}); | ||
} | ||
return tables_[table_name]; | ||
} | ||
|
||
}; // namespace frc846::robot |
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
Oops, something went wrong.