![]() |
2022-Robot
Robot code for 2022 FRC Season by Argos, FRC team #1756
|
Accesses swerve module home positions in a file saved on the RoboRIO. More...
#include <file_system_homing_storage.h>
Public Member Functions | |
FileSystemHomingStorage (const fs::path &swerveHomesPath) | |
Construct a new File System Homing Storage object. More... | |
bool | Save (const argos_lib::swerve::SwerveModulePositions &homePosition) override |
Save positions as new homes. More... | |
std::optional< argos_lib::swerve::SwerveModulePositions > | Load () override |
Load absolute positions that represent 0 degree module orientations. More... | |
virtual bool | Save (const SwerveModulePositions &homePosition)=0 |
Save home position to persistent storage. More... | |
virtual std::optional< SwerveModulePositions > | Load ()=0 |
Load home position from persistent storage. More... | |
Private Member Functions | |
fs::path | GetFilePath () |
Get the path of the file to load from and save to. More... | |
Private Attributes | |
const fs::path | m_swerveHomesPath |
Path of persistent storage file relative to home directory. More... | |
Accesses swerve module home positions in a file saved on the RoboRIO.
|
explicit |
Construct a new File System Homing Storage object.
swerveHomesPath | File path relative to home directory to save into and load from |
|
private |
Get the path of the file to load from and save to.
|
overridevirtual |
Load absolute positions that represent 0 degree module orientations.
Implements argos_lib::swerve::SwerveHomeStorageInterface.
|
overridevirtual |
Save positions as new homes.
homePosition | Positions that represent 0 degree module orientations |
Implements argos_lib::swerve::SwerveHomeStorageInterface.
|
private |
Path of persistent storage file relative to home directory.