This is an archive of G2M. Please refer to this post for more information. Archived on 2026-01-09.

Motor Brake not Holding when using okapilib motor device?

Rhett
01/05/2023 at 08:23:23 AM PST

Basically, when I try and set the motor brake type to hold it is acting as if the motor is on coast and not hold and is allowing my catapult to slowly un-prime itself, anyone have any idea why it’s doing this?

This is my code

void load()
{
    cataMotor.setBrakeMode(AbstractMotor::brakeMode::hold);
    while(limitSwitch.get_value() == false)
    {
        piston.set_value(0);
        cataMotor.moveVoltage(-12000);
    }
    cataMotor.moveVoltage(0);
}
Kyosant
01/05/2023 at 10:53:36 AM PST

Rhett
01/05/2023 at 04:12:50 PM PST

Replying to Kyosant ↩️

lol I’m just blind got it, scrolled past that at least 20 times