-
Notifications
You must be signed in to change notification settings - Fork 1
/
GlobalConfig.java
73 lines (53 loc) · 2.11 KB
/
GlobalConfig.java
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package org.firstinspires.ftc.teamcode;
import androidx.annotation.NonNull;
import com.acmerobotics.dashboard.config.Config;
import com.acmerobotics.roadrunner.geometry.Pose2d;
import org.firstinspires.ftc.teamcode.drive.DriveConstants;
import org.firstinspires.ftc.teamcode.util.utilclasses.Encoder.Direction;
import org.firstinspires.ftc.teamcode.util.utilclasses.Encoder;
@Config
public class GlobalConfig {
//make all fields final
//control + click class to go to it
DriveConstants controlClickForDriveConstants;
public enum Alliance{
RED,
BLUE;
@NonNull
@Override
public String toString() {
return super.toString();
}
}
public enum PipelineResult {
//TODO: insert pipelineresults here
ONE,
TWO,
THREE
}
public enum Side {
AUDIENCE,
STAGE
}
public enum AutonomousType {
PARKING,
STACK
}
//TODO: Add more config
public static final String motorFL = "motorFL", motorFR = "motorFR", motorBL = "motorBL", motorBR = "motorBR";
public static Alliance alliance = Alliance.RED;
public static Side side = Side.AUDIENCE;
public static AutonomousType autonomousType = AutonomousType.STACK;
public static PipelineResult pipelineResult = PipelineResult.ONE;
public static class SensorFusionValues{
public static final double[] sensorFusionHeadingWeights = {0.225, 0.225, 0.225, 0.225, 0},
sensorFusionPositionWeights = {0.15, 0.15, 0.15, 0.15, 0.4};
}
public static class EncoderValues{
public static final Pose2d sideEncoder = new Pose2d(0.1965, 4.5, 0), centerEncoder = new Pose2d(-5.2, 0.75, Math.toRadians(90));
public static final String leftEncoderPort = "motorFL", rightEncoderPort = "motorBL", centerEncoderPort = "motorFR";
public static final Encoder.Direction leftEncoderDirection = Direction.REVERSE;
public static final Encoder.Direction rightEncoderDirection = Direction.FORWARD;
public static final Encoder.Direction centerEncoderDirection = Direction.REVERSE;
}
}