@@ -175,6 +175,7 @@ void Robot::TestPeriodic() {}
175
175
void Robot::CompetitionJoystickInput () {
176
176
// DRIVER CONTROLS
177
177
if (m_OI.GetDriverJoystick ().GetBButton () && m_CanSandstormStepDrive) {
178
+ std::cout << " Comp Joy Input: Driver: B Button Down" << std::endl;
178
179
m_DriveSandstormStepWithCargo->Start ();
179
180
m_CanSandstormStepDrive = false ;
180
181
}
@@ -183,25 +184,34 @@ void Robot::CompetitionJoystickInput() {
183
184
OperatorHID& console = m_OI.GetOperatorConsole ();
184
185
// Change rotation of cargo intake
185
186
if (console.GetFloorHatchPickupPressed ()) {
187
+ std::cout << " Comp Joy Input: Console: Floor Hatch Pickup Pressed" << std::endl;
186
188
m_RotateHatchForFloor->Start ();
187
189
} else if (console.GetFloorCargoPickupPressed ()) {
190
+ std::cout << " Comp Joy Input: Console: Floor Cargo Pickup Pressed" << std::endl;
188
191
m_TakeCargoFromFloor->Start ();
189
192
} else if (console.GetHatchFeederScorePressed ()) {
193
+ std::cout << " Comp Joy Input: Console: Hatch Feeder Score Pressed" << std::endl;
190
194
m_RotateHatchForDispenser->Start ();
191
195
} else if (console.GetRocketShotPressed ()) {
196
+ std::cout << " Comp Joy Input: Console: Rocket Shot Pressed" << std::endl;
192
197
m_RotateCargoForLevelOneRocket->Start ();
193
198
} else if (m_OI.GetOperatorConsole ().GetCargoShotPressed ()) {
199
+ std::cout << " Comp Joy Input: Console: Cargo Shot Pressed" << std::endl;
194
200
m_RotateCargoForCargoShip->Start ();
195
201
} else if (console.GetGoHomePressed ()) {
202
+ std::cout << " Comp Joy Input: Console: Stowed Pressed" << std::endl;
196
203
GetCargoIntake ().GoHome (); // CHANGE TO COMMAND
197
204
}
198
205
199
206
// action command buttons, stuff happens
200
207
if (console.GetCargoCloseShotPressed ()) {
208
+ std::cout << " Comp Joy Input: Console: Cargo Close Shot Pressed" << std::endl;
201
209
m_ShootCargoForLevelOneRocket->Start ();
202
210
} else if (console.GetCargoHighShotPressed ()) {
211
+ std::cout << " Comp Joy Input: Console: Cargo High Shot Pressed" << std::endl;
203
212
m_ShootCargoForCargoShip->Start ();
204
213
} else if (console.GetCargoIntakePressed ()) {
214
+ std::cout << " Comp Joy Input: Console: Cargo Intake Pressed" << std::endl;
205
215
if (GetCargoIntake ().IsRollerRunning ()) {
206
216
m_StopCargoRoller->Start ();
207
217
} else {
@@ -210,42 +220,55 @@ void Robot::CompetitionJoystickInput() {
210
220
}
211
221
212
222
if (console.IsHatchReleaseDown () && console.IsHatchGrabDown ()) {
223
+ std::cout << " Comp Joy Input: Console: Hatch Release AND Hatch Grab Down" << std::endl;
213
224
// Stop cheesecake hatch if both buttons are down.
214
225
GetCargoIntake ().SetHatchRotateSpeed (0.0 );
215
226
} else if (console.IsHatchReleaseDown ()) {
227
+ std::cout << " Comp Joy Input: Console: Hatch Release Down" << std::endl;
216
228
GetCargoIntake ().SetHatchRotateSpeed (0.5 );
217
229
} else if (console.IsHatchGrabDown ()) {
230
+ std::cout << " Comp Joy Input: Console: Hatch Grab Down" << std::endl;
218
231
GetCargoIntake ().SetHatchRotateSpeed (-0.5 );
219
232
} else {
233
+ std::cout << " Comp Joy Input: Stop Hatch Rotate" << std::endl;
220
234
GetCargoIntake ().SetHatchRotateSpeed (0.0 );
221
235
}
222
236
223
237
if (console.GetHatchFloorPressed ()) {
238
+ std::cout << " Comp Joy Input: Console: Hatch Floor Pressed" << std::endl;
224
239
m_ShootCargoForLevelTwoRocket->Start ();
225
240
}
226
241
227
242
if (console.GetCreeperReadyArmPressed ()) {
243
+ std::cout << " Comp Joy Input: Console: Creeper Ready Arm Pressed" << std::endl;
228
244
m_ReadyCreeperArm->Start ();
229
245
} else if (console.GetClimbSequencePressed ()) {
246
+ std::cout << " Comp Joy Input: Console: Climb Sequence Pressed" << std::endl;
230
247
m_ClimbStep->Start ();
231
248
}
232
249
233
250
// manual controls
234
251
if (console.GetRetractArm ()) {
252
+ std::cout << " Comp Joy Input: Console: Retract Climb Arm Pressed" << std::endl;
235
253
Robot::GetCreeperClimb ().RotateArmToPosition (" home" );
236
254
} else if (console.GetRetractCylinder ()) {
255
+ std::cout << " Comp Joy Input: Console: Retract Climb Piston Pressed" << std::endl;
237
256
Robot::GetCreeperClimb ().PistonRetract ();
238
257
}
239
258
240
259
if (console.GetThrottle () >= 0.75 ) {
260
+ std::cout << " Comp Joy Input: Console: Rotate Intake/Creeper Forward" << std::endl;
241
261
GetCargoIntake ().SetRotateSpeed (console.GetJoystickY ());
242
262
} else if (console.GetThrottle () <= -0.75 ) {
263
+ std::cout << " Comp Joy Input: Console: Rotate Intake/Creeper Backward" << std::endl;
243
264
GetCreeperClimb ().SetArmRotateSpeed (console.GetJoystickY ());
244
265
}
245
266
246
267
if (console.GetCreeperCrawlPressed ()) {
268
+ std::cout << " Comp Joy Input: Console: Creeper Crawl Pressed" << std::endl;
247
269
Robot::GetCreeperClimb ().SetArmWheels (true );
248
270
} else if (console.GetCreeperCrawlReleased ()) {
271
+ std::cout << " Comp Joy Input: Console: Creeper Crawl Released" << std::endl;
249
272
Robot::GetCreeperClimb ().StopArmWheels ();
250
273
}
251
274
}
0 commit comments