Skip to content

Buggy? #3

Open
Open
@baraddur

Description

@baraddur

Hi, thank you for this library ;-) I see the following issues:

  1. function setTimerWidth (line 230):

The following block seems to have no effect (the variable "this->ticks" will never be changed) ... why is it there? What if widthDifference is negative ... do you really want to make such a bit shift?

if (widthDifference > 0)
{
    this->ticks << widthDifference;
}
else
{
    this->ticks >> widthDifference;
}
  1. Function "int Servo::attach(int pin, int min, int max)" ... there is a return value in case the first condition is ok ("if ((this->servoChannel <= MAX_SERVOS) && (this->servoChannel > 0))").

Bye,
Filip

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