When I was working with my team, only motor 3 was working of the ones declared below:
okapi::MotorGroup intake = MotorGroup({5,7});
okapi::MotorGroup rollers = MotorGroup({3,4});
Does anyone know why? I am seriously confused as to why this is happening, for not even motor 4 is moving, only 3.
EDIT: Adding opcontrol
EDIT 2: got rid of unnecessary comments
void opcontrol()
{
okapi::Controller controller;
//Button inputs
okapi::ControllerButton intakeButton(okapi::ControllerDigital::R2, false);
okapi::ControllerButton outtakeButton(okapi::ControllerDigital::R1, false);
std::shared_ptr<okapi::OdomChassisController> drive = okapi::ChassisControllerBuilder().withMotors({1,-12},{11,-2}).withDimensions(okapi::AbstractMotor::gearset::green, scales).withOdometry(scales).buildOdometry();
std::shared_ptr<okapi::ChassisModel> model = std::dynamic_pointer_cast<okapi::ChassisModel>(drive->getModel());
while(1){
drive->getModel()->arcade(controller.getAnalog(ControllerAnalog::leftY),
controller.getAnalog(ControllerAnalog::leftX));
if(intakeButton.isPressed()){
intake.moveVelocity(160); //Test motor velocities
rollers.moveVelocity(120);
}
else if(outtakeButton.isPressed()){
intake.moveVelocity(-90); //More testing here, too
rollers.moveVelocity(-50); //test
}
else {
intake.moveVelocity(0);
rollers.moveVelocity(0);
}
pros::delay(10);
}
}