2022-Robot
Robot code for 2022 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
10#include "swerve_utils.h"
11
12namespace argos_lib {
13 namespace swerve {
18 public:
28 NetworkTablesHomingStorage(const std::string& tableName,
29 const std::string& frontLeftPath,
30 const std::string& frontRightPath,
31 const std::string& rearRightPath,
32 const std::string& rearLeftPath);
33
40 bool Save(const argos_lib::swerve::SwerveModulePositions& homePosition) override;
46 [[nodiscard]] std::optional<argos_lib::swerve::SwerveModulePositions> Load() override;
47
48 private:
49 const std::string m_tableName;
50 const std::string m_frontLeftPath;
51 const std::string m_frontRightPath;
52 const std::string m_rearRightPath;
53 const std::string m_rearLeftPath;
54 };
55 } // namespace swerve
56} // namespace argos_lib
Saves and loads swerve module homes to networkTables.
Definition: network_tables_homing_storage.h:17
const std::string m_tableName
Definition: network_tables_homing_storage.h:49
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:53
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:51
const std::string m_frontLeftPath
Definition: network_tables_homing_storage.h:50
const std::string m_rearRightPath
Definition: network_tables_homing_storage.h:52
Interface capable of saving and loading module home positions from persistent storage.
Definition: swerve_utils.h:115
Definition: swap_controllers_command.h:12
Representation of the absolute encoder position of each module at home position.
Definition: swerve_utils.h:77