File tree 2 files changed +30
-0
lines changed
2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -265,6 +265,22 @@ void Robot::CompetitionJoystickInput() {
265
265
m_Bling.SetBling (m_Bling.HatchPattern );
266
266
}
267
267
268
+ if (console.GetHatchTopPositionPressed ()) {
269
+ std::cout << " Comp Joy Input: Console: Hatch Top Position Pressed" << std::endl;
270
+ m_GrabHatchFromLoadingStation->Start ();
271
+ m_Bling.SetBling (m_Bling.HatchPattern );
272
+ } else if (console.GetHatchMidPositionPressed ()) {
273
+ std::cout << " Comp Joy Input: Console: Hatch Mid Position Pressed" << std::endl;
274
+ m_ReadyHatch->Start ();
275
+ m_Bling.SetBling (m_Bling.HatchPattern );
276
+ } else if (console.GetHatchLowerPressed ()) {
277
+ std::cout << " Comp Joy Input: Console: Hatch Lower Pressed" << std::endl;
278
+ m_LowerHatch
279
+ ->Until ([]() { return Robot::m_OI.GetOperatorConsole ().GetHatchLowerReleased (); })
280
+ ->Start ();
281
+ m_Bling.SetBling (m_Bling.HatchPattern );
282
+ }
283
+
268
284
if (console.GetCargoShootRocketTwoPressed ()) {
269
285
std::cout << " Comp Joy Input: Console: Rocket Shot (Level 2)" << std::endl;
270
286
m_ShootCargoForLevelTwoRocket->Start ();
Original file line number Diff line number Diff line change 30
30
#define bCreeperCrawlForward 7
31
31
#define bCreeperCrawlBackward 8
32
32
33
+ // Hatch Buttons (PID) board 2
34
+ #define bHatchTopPosition 10
35
+ #define bHatchMidPosition 9
36
+ #define bHatchLowPosition 8
37
+
33
38
// A combo class that encapsules our button board and flight stick.
34
39
// This is only for our robot operator to use.
35
40
class OperatorHID {
@@ -44,6 +49,15 @@ class OperatorHID {
44
49
bool GetHatchGrabReleased () { return m_Board2.GetButtonReleased (bHatchGrabberUp); }
45
50
bool GetHatchReleasePressed () { return m_Board2.GetButtonPressed (bHatchGrabberDown); }
46
51
bool GetHatchReleaseReleased () { return m_Board2.GetButtonReleased (bHatchGrabberDown); }
52
+
53
+ bool GetHatchTopPositionPressed () { return m_Board2.GetButtonPressed (bHatchTopPosition); }
54
+ bool GetHatchTopPositionReleased () { return m_Board2.GetButtonReleased (bHatchTopPosition); }
55
+
56
+ bool GetHatchMidPositionPressed () { return m_Board2.GetButtonPressed (bHatchMidPosition); }
57
+ bool GetHatchMidPositionReleased () { return m_Board2.GetButtonReleased (bHatchMidPosition); }
58
+
59
+ bool GetHatchLowerPressed () { return m_Board2.GetButtonPressed (bHatchLowPosition); }
60
+ bool GetHatchLowerReleased () { return m_Board2.GetButtonReleased (bHatchLowPosition); }
47
61
48
62
bool GetCargoIntakeCargoPressed () { return m_Board2.GetButtonPressed (bCargoIntakeCargo); }
49
63
bool GetCargoShootRocketOnePressed () { return m_Board2.GetButtonPressed (bCargoShootRocketOne); }
You can’t perform that action at this time.
0 commit comments