2022-Robot
Robot code for 2022 FRC Season by Argos, FRC team #1756
Loading...
Searching...
No Matches
file_system_homing_storage.h
Go to the documentation of this file.
1
4
5#pragma once
6
8#include "wpi/fs.h"
9
14 public:
20 explicit FileSystemHomingStorage(const fs::path& swerveHomesPath);
27 bool Save(const argos_lib::swerve::SwerveModulePositions& homePosition) override;
33 std::optional<argos_lib::swerve::SwerveModulePositions> Load() override;
34
35 private:
41 fs::path GetFilePath();
42 const fs::path m_swerveHomesPath;
43};
Accesses swerve module home positions in a file saved on the RoboRIO.
Definition: file_system_homing_storage.h:13
std::optional< argos_lib::swerve::SwerveModulePositions > Load() override
Load absolute positions that represent 0 degree module orientations.
Definition: file_system_homing_storage.cpp:30
bool Save(const argos_lib::swerve::SwerveModulePositions &homePosition) override
Save positions as new homes.
Definition: file_system_homing_storage.cpp:16
const fs::path m_swerveHomesPath
Path of persistent storage file relative to home directory.
Definition: file_system_homing_storage.h:42
fs::path GetFilePath()
Get the path of the file to load from and save to.
Definition: file_system_homing_storage.cpp:48
Interface capable of saving and loading module home positions from persistent storage.
Definition: swerve_utils.h:115
Representation of the absolute encoder position of each module at home position.
Definition: swerve_utils.h:77