PreenFM > preenfm2 and preenfm3

reversed encoders problem

<< < (3/3)

Xavier:

--- Quote from: Zedius on June 06, 2019, 05:40:36 PM ---Thanks, I'll give that a shot! Looking at encoders.cpp I see that the inversed encoder may already be defined here:
   int inversedEnc = (encoderType & 0x2) == 0 ? 1 : -1;

--- End quote ---

This initialized the type of encoder by the value you put in the menu setting.


--- Quote from: Zedius on June 06, 2019, 05:40:36 PM ---    Is that a different way of writing the inversedEnc = (k<2 ? -1 : 1); code that you mentioned? Or do I need to add that somewhere?

--- End quote ---

if you add that line 163, this override the initialization above.
And you'll have the 2 encoders 1 & 2 of one type and the encoders 3 and 4 of the other type.



Navigation

[0] Message Index

[*] Previous page

Go to full version