Skip to content

Commit 4d90f76

Browse files
authoredApr 19, 2019
Update Robot.cpp
1 parent 2a70d2a commit 4d90f76

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed
 

‎main/cpp/Robot.cpp

+13-3
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,23 @@ void Robot::RobotPeriodic() {
162162
m_rightIntake.Set(0);
163163
}
164164
// defense system
165-
if(fightStick.GetRawAxis(2) == 1)
165+
if(fightStick.GetRawAxis(2) == 1) //no promisesz
166166
{
167-
for(int i = 0; i < kdnf; i++)
167+
isPressed = true;
168+
while(isPressed == true)
168169
{
169-
double xVal = accel.GetX();
170+
m_left.Set(accel.GetX());//One of these needs to be negative...
171+
m_right.Set(accel.GetX());
172+
if(fightStick.GetRawAxis(2) == 0)
173+
{
174+
isPressed = false;
175+
}
170176
}
171177
}
178+
else
179+
{
180+
isPressed = false;
181+
}
172182

173183
//Hatch Panel Launcher
174184
//They are set backwards if timerr is avaible would like to switch them around in both the code and wiring

0 commit comments

Comments
 (0)
Please sign in to comment.