![]() |
2022-Robot
Robot code for 2022 FRC Season by Argos, FRC team #1756
|
Saves and loads home positions from filesystem. More...
#include <homing_storage_interface.h>
Public Member Functions | |
| FSHomingStorage (const fs::path &homeFilePath) | |
| Construct a new FSHomingStorage object. More... | |
| bool | Save (const T &homePosition) override |
| Save home position to persistent storage. More... | |
| std::optional< T > | Load () override |
| Load home position from persistent storage. More... | |
| virtual bool | Save (const T &homePosition)=0 |
| Save home position to persistent storage. More... | |
| virtual std::optional< T > | Load ()=0 |
| Load home position from persistent storage. More... | |
Private Member Functions | |
| fs::path | GetFilePath () |
Private Attributes | |
| const fs::path | m_homesPath |
Saves and loads home positions from filesystem.
| T | Type of the home position. Should be a units type |
|
inlineexplicit |
Construct a new FSHomingStorage object.
| homeFilePath | Path to save homes to relative to internally-managed root directory |
|
inlineprivate |
|
inlineoverridevirtual |
Load home position from persistent storage.
Implements HomingStorageInterface< T >.
|
inlineoverridevirtual |
Save home position to persistent storage.
| homePosition | Position to store |
Implements HomingStorageInterface< T >.
|
private |