Skip to content

RobotControl::motorsWritePct bug #1478

Closed
@bkmartinjr

Description

@bkmartinjr

Version 1.0.5 of the IDE. RobotControl::motorsWritePct() has an arithmetic error when computing the left/right motor speed.

Both the left/right values need to be divided by 100.

Old code:

    int16_t speedLeft=255*speedLeftPct;
    int16_t speedRight=255*speedRightPct;

I believe it should read:

    int16_t speedLeft=255*speedLeftPct / 100;
    int16_t speedRight=255*speedRightPct / 100;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Board: Arduino RobotApplies only to the Arduino RobotComponent: CoreRelated to the code for the standard Arduino API

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions