Skip to content

Change data type of step() parameter to long #51

Open
@lagabulin

Description

@lagabulin

Hello.
My Arduino Uno board cannot handle steps_to_move bigger than 32767 which is the maximum of 16bits integer.
This was simply solved by modifying the int in below two lines to long.
I would like to modify the parts below so that we can use a wider range of step numbers without changing the board.
Is there any reason that we have to use int datatype instead of long datatype?

void Stepper::step(int steps_to_move)

int steps_left = abs(steps_to_move); // how many steps to take

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: codeRelated to content of the project itselftype: enhancementProposed improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions