Skip to content

Enhancement Request: active braking for PwmMotor #176

Open
@sparry0407

Description

@sparry0407

Currently PwmMotor implements a coasting stop: when you set the speed to zero or stop it sets both the forward and backward channels of the bridge to zero, allowing the motor to continue freely rotating. Other implementations seem to include an active braking approach, allowing you to set both forward and backward channels to 1.0, which causes the wheels to stop dead and also helps keep the vehicle from rolling away. Could we please have a brake function? I have implemented a variation of PwmMotor for my own use, which appears to work well. The only hitch I found was that I had to add forward and backward stop calls to the close function to stop random wheel movements during close down.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions