forked from frc971/971-Robot-Code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.h
53 lines (41 loc) · 1.61 KB
/
constants.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#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_