Using Rotary Encoders for Engine Maps, etc.

Discussion in 'Technical & Support' started by Exigeous, Jun 29, 2021.

  1. Exigeous

    Exigeous Registered

    Joined:
    Jun 26, 2021
    Messages:
    17
    Likes Received:
    1
    Is it possible to use rotary encoders to set things like engine maps, traction control, ABS, etc? I have a Fanatec Formula V2 with 2 12 position rotary encoders and I know ACC supports them (and I think iRacing) but I don't see anything to map in RF2.

    Would I need to setup some kind of macros or something to change multiple parameters at once? Sorry if this is a dumb question, not new to sim racing but fairly new to RF2.

    ~X
     
  2. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,004
    Likes Received:
    1,058
    turn it one way to increase, turn it the other to decrease. There will be mappings to increase and decrease I think.
     
  3. Exigeous

    Exigeous Registered

    Joined:
    Jun 26, 2021
    Messages:
    17
    Likes Received:
    1
    You're completely missing the point - I just switched them from +/- to actually encoder positions so I can have 12 individual settings and select them based on the rotary position. This works wonderfully in ACC (as it has bindings built in for this) and I've been told by a few rFactor 2 veterans that this can be done here too.

    Make more sense?
     
  4. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,345
    Likes Received:
    6,572
    I've seen this asked a few times but don't think I've seen a solution posted. If your rF2 veteran friends can help you it might be helpful to post it here for others...
     
  5. Bill Worrel

    Bill Worrel Registered

    Joined:
    May 1, 2019
    Messages:
    456
    Likes Received:
    325
    Yeah I don't think it will work because there aren't discrete inputs for each value.
    I think it will work for the transmission - gears 1 through 9.
     
  6. Lenniepen

    Lenniepen Registered

    Joined:
    Oct 5, 2010
    Messages:
    225
    Likes Received:
    38
    Hi, I'm using the app JoyToKey for this (also using Fanatec Formula V2)
    With JoyToKey you can combine two buttons into one: MultiPositionSwitch in position x, combined with a separate +/- button (for instance the red sticks on the wheel) -> virtually presses a key on the keyboard, which is mapped in rF2 to a specific function.
    For instance:
    MultiPositionSwitch 1 + 'red stick up' = ABS+
    MultiPositionSwitch 1 + 'red stick down' = ABS-
    MultiPositionSwitch 2 + 'red stick up' = TC+
    MultiPositionSwitch 2 + 'red stick down' = TC-
    Etc...
    With the two 12-ways rotaries, and two +/- sticks, it's possible to map 24 different functions with +/- option.
    I've mapped my whole keyboard using this.
    Then you only have the problem how to remember which rotaty position is used for what function :D
    (I've made something in my SimHub dashboard, where it's shows which mode is currently selected)

    If you want to use one Rotary encoder for let's say 12 unique TC positions, that's not possible I think, because rF2 only let's you map Increase/Decrease, not the unique positions (like with gears)
     
    Last edited: Jun 30, 2021
    Emery likes this.
  7. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,345
    Likes Received:
    6,572
    That's cool, but it's not setting positions/values for things like engine mixture, which can't be assigned individually in the game. I presume a macro approach would probably work, but could be cumbersome and potentially cause issues depending what it's modifying.
     
  8. marmagas

    marmagas Registered

    Joined:
    Jan 11, 2012
    Messages:
    167
    Likes Received:
    110
  9. Lenniepen

    Lenniepen Registered

    Joined:
    Oct 5, 2010
    Messages:
    225
    Likes Received:
    38
    Correct. I'm not exactly sure if OP wants one rotary encoder for one purpose (ABS with 12 fixed positions), or if he's looking for using the encoder as a 'mode' switch (like I use it)
     
  10. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,004
    Likes Received:
    1,058
    Maybe I am misunderstanding the hardware.... do you mean these types of switches?

    upload_2021-6-30_11-18-59.png
    Because I use these for going up and down engine mixture or TC modes. Will check my control mappings in game if this is similar to what you want.
     
  11. Exigeous

    Exigeous Registered

    Joined:
    Jun 26, 2021
    Messages:
    17
    Likes Received:
    1
    Absolutely will do

    That would be HYSTERICAL! HAHA!

    I've used JoyToKey for YEARS now and am a HUGE fan - but as stated I'm looking to change engine maps, etc. - so basically I'd likely need to use a macro as I don't think 4 keystrokes would be enough (the max in J2K)

    Yep, looking for a "mode" switch. So for example:

    Position 1
    - ABS: 4
    - TC: 7
    - Engine: 3

    Position 2
    - ABS: 7
    - TC: 2
    - Engine: 7
    (making up BS values just for example)

    I can't tell but it doesn't look like those are full rotary encoders - IE they either only have a few position or are literally just left/right - and yes, most wheel will offer a "fake" rotary encoder that isn't a number of discrete position but rather, like you said, just plus/minus. That's how mine defaults but I can set it for 12 individual positions as in a actual car where position 1 is a setting, 2 is another, 3 and so no. Rather than cycling through - which is what you're doing, I can go directly to position 4 and that's a specific setting, separate from position 9.

    Thanks for all the input everyone, I'm guessing with rFactor I'm gonna just have to look at macros. Nothing new at all for me just wanted to see if there was a more elegant solution.

    ~X
     
  12. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,004
    Likes Received:
    1,058
    oh I see.
     
  13. woochoo

    woochoo Registered

    Joined:
    Nov 3, 2010
    Messages:
    1,339
    Likes Received:
    3,112
    on a technical note, there are rotary encoders, and rotary switches. They're different things.
    A rotary encoder is an infinite rotation anti-clockwise/clockwise switch. So you'd bind anti-clockwise to decrement a value, and clockwise to increment a value (or bind them to anything you want (and even unrelated functions, but only two). The absolute rotational position is irrelevant. It only matters which direction they turn.
    Functionally it's a centre-off two-way momentary rocker/toggle switch (I - O - II) , but in a different form.

    A rotary switch has a finite number of positions, and is unlikely to have infinite rotation (probably less that 360deg). They commonly have 2, 3, 4, 6, 12 positions. They point to separate outputs, so can bind to different things.
    That is what you could use in rF2 to select the LCD page, which i think each have a dedicated button binding option, or as mentioned they could be used for gears which also have a binding each.

    I'd guess F1 wheels etc are using rotary switches when changing engine modes etc, or a bunch of settings based on just the position of one knob.
    So if the rotary has numbers on it, or they point to numbers, it's likely a rotary switch, not a rotary encoder. Also likely to be a rotary switch if it points to a variety of different functions.

    A rotary encoder's labels might be like "BB- BB+" for brake bias etc. because it can only do two things.

    For what you want, it sounds like rF2 would need some sort of car settings scripting built in.
    Something like a virtual ECU i guess? That would be a nice thing.
    The car's available functions (like you mentioned for ABS/TC/Engine) could be bundled with custom user values and mapped to a single binding. There would be a UI page with those listed where the player could add/change the values for each. Multiples of those would be user-presets that a rotary switch could point to (or a rotary encoder could scroll between them).
     
    Last edited: Jun 30, 2021
    Emery, lagg and Bill Worrel like this.
  14. smbrm

    smbrm Registered

    Joined:
    Nov 11, 2010
    Messages:
    440
    Likes Received:
    50
    Based on what I am reading in this thread it sounds like a rotary encoder could be used/ adapted to adjust pit stop fuel fill levels for Rfactor 2, turning the encoder left or right to adjust fuel level up or down in preparation for the next stop.
     
  15. Coutie

    Coutie Moderator Staff Member

    Joined:
    Oct 5, 2010
    Messages:
    3,779
    Likes Received:
    2,241
    Yep, it's basically a two way switch. I had a few, but they never worked right, always skipped a bunch of presses. I think I saw a video of how to fix that with an arduino, I'll try to find it.
     
  16. smbrm

    smbrm Registered

    Joined:
    Nov 11, 2010
    Messages:
    440
    Likes Received:
    50
    I look forward to seeing that.

    cheers
     
  17. Coutie

    Coutie Moderator Staff Member

    Joined:
    Oct 5, 2010
    Messages:
    3,779
    Likes Received:
    2,241
    Actually, the video didn't say anything special about them. When I used them, I tried them with the SLI-Pro, and they never worked well, maybe it's better with an Arduino or something.
     

Share This Page