Adjustable Variable at run time

i have a function that has a variable passed into it, as a correction factor.

let say it looks like this:

float Base = 123456

MyFunction.MyReference(Base);

by setting the Base value (my correction factor), it gives me an accurate MyFunction value.

How can i use the Rotary dial w 20 steps in it, to increase or decrease the Base number during run time, or at startup, i am only finding references to use ++ or -- to increment or decrements 1 at a time.

or is there a better way,

Need guidance where to look for my answers please

Robert

Increments or decrements don’t have to be unity.

i am only finding references to use ++ or -- to increment or decrements 1 at a time.

Base = Base + 10;

or

Base += 10;

Will both add 10 to Base

So, read the encode and when you get a step add or subtract a suitable number from Base

does it have to be a rotary dial?