blob: 31d104ffa7ccda7a25c6bc2fe8126335167aa4ef [file] [log] [blame]
#ifndef Y2024_BOT3_CONSTANTS_H_
#define Y2024_BOT3_CONSTANTS_H_
#include <array>
#include <cmath>
#include <cstdint>
#include "frc971/constants.h"
#include "frc971/control_loops/pose.h"
#include "frc971/control_loops/static_zeroing_single_dof_profiled_subsystem.h"
#include "frc971/zeroing/absolute_encoder.h"
#include "frc971/zeroing/pot_and_absolute_encoder.h"
#include "y2024_bot3/constants/constants_generated.h"
namespace y2024_bot3::constants {
constexpr uint16_t kThirdRobotTeamNumber = 9971;
struct Values {
static const int kSuperstructureCANWriterPriority = 35;
struct PotAndAbsEncoderConstants {
::frc971::control_loops::StaticZeroingSingleDOFProfiledSubsystemParams<
::frc971::zeroing::PotAndAbsoluteEncoderZeroingEstimator>
subsystem_params;
double potentiometer_offset;
};
struct AbsoluteEncoderConstants {
::frc971::control_loops::StaticZeroingSingleDOFProfiledSubsystemParams<
::frc971::zeroing::AbsoluteEncoderZeroingEstimator>
subsystem_params;
};
struct PotConstants {
::frc971::control_loops::StaticZeroingSingleDOFProfiledSubsystemParams<
::frc971::zeroing::RelativeEncoderZeroingEstimator>
subsystem_params;
double potentiometer_offset;
};
};
// Creates and returns a Values instance for the constants.
// Should be called before realtime because this allocates memory.
// Only the first call to either of these will be used.
constants::Values MakeValues(uint16_t team);
// Calls MakeValues with aos::network::GetTeamNumber()
constants::Values MakeValues();
} // namespace y2024_bot3::constants
#endif // Y2024_BOT3_CONSTANTS_H_