2023-Robot
Robot code for 2023 FRC season by Argos, FRC team #1756
Loading...
Searching...
No Matches
network_tables_homing_storage.h
Go to the documentation of this file.
1
4
5#pragma once
6
7#include <optional>
8#include <string>
9
12
13namespace argos_lib {
14 namespace swerve {
19 public:
29 NetworkTablesHomingStorage(const std::string& tableName,
30 const std::string& frontLeftPath,
31 const std::string& frontRightPath,
32 const std::string& rearRightPath,
33 const std::string& rearLeftPath);
34
41 bool Save(const argos_lib::swerve::SwerveModulePositions& homePosition) override;
47 [[nodiscard]] std::optional<argos_lib::swerve::SwerveModulePositions> Load() override;
48
49 private:
50 const std::string m_tableName;
51 const std::string m_frontLeftPath;
52 const std::string m_frontRightPath;
53 const std::string m_rearRightPath;
54 const std::string m_rearLeftPath;
55 };
56 } // namespace swerve
57} // namespace argos_lib
Interface capable of saving and loading module home positions from persistent storage.
Definition homing_interface.h:13
Saves and loads swerve module homes to networkTables.
Definition network_tables_homing_storage.h:18
const std::string m_tableName
Definition network_tables_homing_storage.h:50
std::optional< argos_lib::swerve::SwerveModulePositions > Load() override
Load home positions from network tables.
Definition network_tables_homing_storage.cpp:41
const std::string m_rearLeftPath
Definition network_tables_homing_storage.h:54
bool Save(const argos_lib::swerve::SwerveModulePositions &homePosition) override
Save home positions to network tables.
Definition network_tables_homing_storage.cpp:29
const std::string m_frontRightPath
Definition network_tables_homing_storage.h:52
const std::string m_frontLeftPath
Definition network_tables_homing_storage.h:51
const std::string m_rearRightPath
Definition network_tables_homing_storage.h:53
Definition swap_controllers_command.h:12
Representation of the absolute encoder position of each module at home position.
Definition swerve_utils.h:38