#include "robot-config.cpp"
int main()
{
while(true)
{
LeftMotor.spin (fwd, (Controller1.Axis3.value() + Controller1.Axis4.value())/2, ::pct);
RightMotor.spin (fwd, (Controller1.Axis3.value() - Controller1.Axis4.value())/2, ::pct);
oxMotor.spin (fwd, (Controller1.Axis1.value()), ::pct);
while(Controller1.ButtonUp.pressing())
{
axMotor.spin (reverse,50,::rpm);
bxMotor.spin (reverse,50,::rpm);
LeftMotor.spin (fwd, (Controller1.Axis3.value() + Controller1.Axis4.value())/2, ::pct);
RightMotor.spin (fwd, (Controller1.Axis3.value() - Controller1.Axis4.value())/2, ::pct);
oxMotor.spin (fwd, (Controller1.Axis1.value()), ::pct);
}
while(Controller1.ButtonDown.pressing())
{
axMotor.spin (fwd,50,::rpm);
bxMotor.spin (fwd,50,::rpm);
LeftMotor.spin (fwd, (Controller1.Axis3.value() + Controller1.Axis4.value())/2, ::pct);
RightMotor.spin (fwd, (Controller1.Axis3.value() - Controller1.Axis4.value())/2, ::pct);
oxMotor.spin (fwd, (Controller1.Axis1.value()), ::pct);
}
bxMotor.stop();
axMotor.stop();
while(Controller1.ButtonX.pressing())
{
cxMotor.spin (fwd,1000,::rpm);
dxMotor.spin (fwd,1000,::rpm);
LeftMotor.spin (fwd, (Controller1.Axis3.value() + Controller1.Axis4.value())/2, ::pct);
RightMotor.spin (fwd, (Controller1.Axis3.value() - Controller1.Axis4.value())/2, ::pct);
oxMotor.spin (fwd, (Controller1.Axis1.value()), ::pct);
}
while(Controller1.ButtonY.pressing())
{
cxMotor.spin (reverse,1000,::rpm);
dxMotor.spin (reverse,1000,::rpm);
LeftMotor.spin (fwd, (Controller1.Axis3.value() + Controller1.Axis4.value())/2, ::pct);
RightMotor.spin (fwd, (Controller1.Axis3.value() - Controller1.Axis4.value())/2, ::pct);
oxMotor.spin (fwd, (Controller1.Axis1.value()), ::pct);
}
cxMotor.stop();
dxMotor.stop();
while(Controller1.ButtonLeft.pressing())
{
xxMotor.spin (fwd,60,::rpm);
LeftMotor.spin (fwd, (Controller1.Axis3.value() + Controller1.Axis4.value())/2, ::pct);
RightMotor.spin (fwd, (Controller1.Axis3.value() - Controller1.Axis4.value())/2, ::pct);
oxMotor.spin (fwd, (Controller1.Axis1.value()), ::pct);
}
xxMotor.stop();
while(Controller1.ButtonRight.pressing())
{
xxMotor.spin (reverse,60,::rpm);
LeftMotor.spin (fwd, (Controller1.Axis3.value() + Controller1.Axis4.value())/2, ::pct);
RightMotor.spin (fwd, (Controller1.Axis3.value() - Controller1.Axis4.value())/2, ::pct);
oxMotor.spin (fwd, (Controller1.Axis1.value()), ::pct);
}
xxMotor.stop();
while(Controller1.ButtonY.pressing())
{
cxMotor.spin (reverse,30,::rpm);
dxMotor.spin (reverse,30,::rpm);
LeftMotor.spin (fwd, (Controller1.Axis3.value() + Controller1.Axis4.value())/2, ::pct);
RightMotor.spin (fwd, (Controller1.Axis3.value() - Controller1.Axis4.value())/2, ::pct);
oxMotor.spin (fwd, (Controller1.Axis1.value()), ::pct);
}
cxMotor.stop();
dxMotor.stop();
while(Controller1.ButtonL1.pressing())
{
cxMotor.spin (reverse,30,::rpm);
dxMotor.spin (reverse,30,::rpm);
LeftMotor.spin (fwd, (Controller1.Axis3.value() + Controller1.Axis4.value())/2, ::pct);
RightMotor.spin (fwd, (Controller1.Axis3.value() - Controller1.Axis4.value())/2, ::pct);
oxMotor.spin (fwd, (Controller1.Axis1.value()), ::pct);
}
while(Controller1.ButtonL2.pressing())
{
cxMotor.spin (fwd,30,::rpm);
dxMotor.spin (fwd,30,::rpm);
LeftMotor.spin (fwd, (Controller1.Axis3.value() + Controller1.Axis4.value())/2, ::pct);
RightMotor.spin (fwd, (Controller1.Axis3.value() - Controller1.Axis4.value())/2, ::pct);
oxMotor.spin (fwd, (Controller1.Axis1.value()), ::pct);
}
while(Controller1.ButtonR1.pressing())
{
cxMotor.spin (reverse,30,::rpm);
dxMotor.spin (reverse,30,::rpm);
xxMotor.spin (reverse,60,::rpm);
}
while(Controller1.ButtonR2.pressing())
{
cxMotor.spin (fwd,30,::rpm);
dxMotor.spin (fwd,30,::rpm);
xxMotor.spin (fwd,60,::rpm);
}
}
}