Skip to content

getServoPulseLength miscalculation (or bug report if it's the right place) #13

@JagV12

Description

@JagV12

Considering:
//Convert the servo pulse length into timer ticks.
//Each timer tick is 8 microseconds.
int16_t newLengthInClockTicks = newLengthInMicroseconds / 8;
//subtract the pulse offset
newLengthInClockTicks -= 64;

uint16_t ServoSequencer::getServoPulseLength(uint8_t servoNumber)
is calculated as
pulseLength = (servoRegistry[servoNumber].pulseLengthInTicks * 8) + 64;
Shouldn't it be
pulseLength = (servoRegistry[servoNumber].pulseLengthInTicks + 64) * 8; ?

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