[REL] TinyPedal - open source overlay APP for rF2 (Radar,Pedal,FFB,Deltabest,Relative,Fuel calculator)

Discussion in 'Other' started by svictor, Mar 14, 2022.

Tags:
  1. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    500
    Likes Received:
    3,154
    TinyPedal v1.6.3 (2022-07-03)
    upload_2022-6-1_12-51-25.png
    Project homepage: https://github.com/s-victor/TinyPedal

    TinyPedal is a new open-source overlay application for rFactor 2. The goal is to offer a free & alternative choice of overlay App that is light weight, compact, with minimalistic visual presentation and detailed customization.

    The Iron Wolf’s rF2 Shared Memory Map Plugin & Tony Whitley’s pyRfactor2SharedMemory Library are used for displaying simulation info.

    Note: Borderless or Windowed Mode is required. Full-screen mode is not supported.


    Features & Available widgets
    See full feature list here:
    https://github.com/s-victor/TinyPedal/blob/master/docs/features.md
    All widgets are customizable, see Customization section for details.
    Note: some info, such as fuel usage, requires at least 1 or 2 completed laps to be shown correctly.


    Widget function overview:
    Fuel Widget, Pedal Widget, Steering Widget
    widget01.png

    Weather Widget, Engine Widget, Force Widget
    upload_2022-7-6_15-11-14.png

    Gear Widget
    upload_2022-7-6_15-9-32.png

    Race Countdown Timer for Gear Widget
    [​IMG]

    Startlights display for Gear Widget
    [​IMG]

    Delta best Widget
    [​IMG]

    Pressure Widget (Tyre load, Tyre pressure), Temperature Widget(Tyre, Brake), Wear Widget(Total wear, Last lap wear)
    [​IMG]

    Wheel Widget
    upload_2022-7-6_15-13-54.png

    Relative Widget
    (from left to right: overall place, driver name, last laptime, position in class, class name, relative time gap, pit status)
    [​IMG]

    Session Widget
    [​IMG]

    Stint widget
    [​IMG]

    Cruise Widget
    [​IMG]

    Radar Widget
    [​IMG]

    Instrument Widget
    [​IMG]


    Requirements
    TinyPedal requires The Iron Wolf’s rF2 Shared Memory Map Plugin, download it from here:
    https://forum.studio-397.com/index.php?threads/rf2-shared-memory-tools-for-developers.54282/

    The plugin file rFactor2SharedMemoryMapPlugin64.dll should be placed in rFactor 2\Bin64\Plugins folder. This plugin also comes with some of rF2 Apps, check rFactor 2\Bin64\Plugins folder first to see if it was installed already.

    Note:
    Some older versions of rFactor2SharedMemoryMapPlugin64.dll may have various issues, please download newer version from above link; CrewChief also comes with the lastest version of the plugin DLL. The oldest Plugin version that known to work with TinyPedal is v3.7.14.2

    If there is an error with "missing vcruntime140" or something, it is likely due to missing vcruntime, try install "Microsoft Visual C++ 2015 Redistributable".


    Usage
    1. Make sure The Iron Wolf’s rF2 Shared Memory Map Plugin is installed, as described above, and Borderless or Windowed Mode is activated in game.

    2. Download latest TinyPedal version from Release page, extract, and run tinypedal.exe.

    3. A tray icon will appear at system tray. If not shown, check hidden tray icon. Right Click on tray icon will bring up context menu.

    4. Launch rFactor 2, overlay will appear once your vehicle is on track, and auto-hide otherwise. You can turn off auto-hide by Right Click on tray icon and select Auto Hide.

    5. Click on overlay to drag around. You can Lock or Unlock overlay from tray menu.

    6. Widgets can be Enabled or Disabled by accessing Widgets menu from tray menu.

    7. To quit APP, Right Click on tray icon and select Quit.

    Performance

    On default setting, current version of TinyPedal uses roughly 5% CPU & 20MB system memory on a 3.0Ghz CPU with all widgets enabled. All widgets will stop updating (0% CPU usage) when player is not on track.

    In case of unlikely performance issue, turn off less-used widgets is advised (each widget contributes roughly 0.1-0.5% CPU usage alone); or set a higher update delay value for specific widget, see Customization section for details.

    Generally, update delay value should not be set under 20ms, as most data from rF2 shared memory plugin capped at 50 refresh rate according to shared memory plugin documents. Lower update delay value will cause significantly increase of CPU usage.


    Customization
    TinyPedal offers a wide range of customization, which is currently available by editing config.json config file with text editor. This config file will be auto-generated after first launching.
    See editing guide:
    https://github.com/s-victor/TinyPedal/wiki


    Special thanks to:
    The Iron Wolf for the permission to use rF2 Shared Memory Map Plugin in TinyPedal.
    Tony Whitley for pyRfactor2SharedMemory library.


    Changelog:
    https://github.com/s-victor/TinyPedal/blob/master/docs/changelog.txt


    Troubleshooting:
    1. If you have encountered gsync issue while using Tinypedal, try disable fullscreen optimizations for the rfactor2.exe (solution provided by @manashttu)

    Preview
    Combination use of TinyPedal with Tiny Compact HUD:
    preview02.png
     
    Last edited: Jul 6, 2022 at 8:33 AM
  2. ThomasJohansen

    ThomasJohansen Registered

    Joined:
    Dec 27, 2019
    Messages:
    586
    Likes Received:
    1,337
    @svictor
    just curious, what values do you look at to define this?
    I would love to make my own indicator for this in my simhub overlay.
     
  3. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    500
    Likes Received:
    3,154
    If you mean how to find the exact amount offset for ride height, then it is unfortunate that the game does not provide such info through sharedmemory plugin. TinyPedal simply requires user to provide known offset to do subtraction.

    However, there is a few way to find near accurate ride height offset:
    1. The easiest method is to load vehicle in DevMode (assume mod is not encrypted), then find a flat ground, press down both Ctrl+Shift, and you can get the actual ride height offset reading.

    2. Find a way to detach all 4 wheels and land on a flat surface. This is actually hard to do than it appears, but it can be done.
     
    Last edited: Apr 3, 2022
  4. ThomasJohansen

    ThomasJohansen Registered

    Joined:
    Dec 27, 2019
    Messages:
    586
    Likes Received:
    1,337
    oh boy... crazy, alternative and yet ingenious way to solve the mystery.
    Such a shame the api lacks this kind of information. Specially bottoming, it's one of those things you cant feel in a sim.
     
    yashiman, svictor and Corti like this.
  5. ebeninca

    ebeninca Registered

    Joined:
    Sep 7, 2016
    Messages:
    535
    Likes Received:
    233
    Amazing, great job, something I had been waiting since the end of dx9 support.

    - Would be interesting to have the driver position in class on the relative screen.
    - And add an option to autostart with windows.
     
    Last edited: Mar 15, 2022
    svictor likes this.
  6. EmanueleMarra15

    EmanueleMarra15 Registered

    Joined:
    Nov 29, 2020
    Messages:
    7
    Likes Received:
    4
    finally a hud done right, thanks !!
    I hope that the helicopter ride and the delta will be added
     
    svictor likes this.
  7. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    500
    Likes Received:
    3,154
    Thanks, glad you liked it, and delta best & and car radar is on todo list, will see how things progress.
     
  8. Vance Le Garde

    Vance Le Garde Registered

    Joined:
    Oct 5, 2010
    Messages:
    207
    Likes Received:
    28
    So this wont work in VR ? Great job though.
     
    svictor likes this.
  9. zxd1997

    zxd1997 Registered

    Joined:
    Sep 26, 2019
    Messages:
    292
    Likes Received:
    263
    it's a software overlay on the screen, so I don't think it could run on VR
     
    Vance Le Garde and svictor like this.
  10. Manfredk2

    Manfredk2 Registered

    Joined:
    Dec 27, 2018
    Messages:
    554
    Likes Received:
    744
    In combination with CrewChief it should also be usable in VR
     
  11. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    500
    Likes Received:
    3,154
    v1.1.0 update - Delta best now available!
    upload_2022-3-21_16-48-32.png

    Download link: see newer 1.1.3 version.

    This update adds full support for "delta best". The new Delta best widget not only automatically records player's best laptime, compares delta time, but also stores best laptime data which can be auto-loaded in future session, or to be shared and used by other players.

    How it works:
    The APP saves best laptime data every time player goes back to garage screen (ESC), and auto-reloads best laptime data when player is on track.
    Best laptime data is stored as csv data file inside deltabest subfolder.
    Each file is named based on format: [full track name] - [vehicle class name].csv

    As long as there is a matching file, the previous best laptime and delta time info will be auto-loaded. This can be very useful for quickly getting back into a practice session or doing hotlap, and the file can be shared & used by other players (similar to ghost car).

    To remove a best laptime data, first make sure you are not on track (ESC to garage screen), then simply delete the corresponding file from deltabest subfolder.

    Known limitation: Currently cutting track will not invalidate best laptime recording. This issue will mostly affect point to point tracks as they have alternative sector/finish detection, which could result wrong best laptime being saved. (hopefully will find a good solution to this issue soon)
    This issue was fixed in version 1.1.3.


    Other changes:
    upload_2022-3-21_17-17-8.png
    Timing widget now displays "estimated laptime", which accurately sync with delta best data, and has 3 different layouts.

    Customization guide is updated with large amount new adjustable options for new & old widgets:
    https://github.com/s-victor/TinyPedal/blob/master/docs/customizations.md

    The APP now automatically creates backup for config.json file in case of invalid or out-dated values.

    There are also many other improvements, see changelog.

    Changelog:
    TinyPedal 1.1.0 (2022-03-21)
    ----------------------------
    * [New]Delta best widget
    - Show delta best based on personal best laptime.
    - Show delta bar with customizable range, size and color.
    - Record, save, and load player's best laptime data automatically.
    - Best laptime file is stored in "deltabest" folder, and can be
    used by other players.
    - 2 different layouts.

    * Core
    - Add "deltatime" module, which runs in separated thread at 60fps.
    - Add "delta_timing" switch in config.json.
    - Add auto-backup function for config.json.
    - Restructured "readapi" module.
    - Sort all widgets and references in alphabetical order.

    * Timing widget
    - Add delta estimated laptime.
    - Add 3 different layouts.
    - Now reads timing data from deltatime module.

    * Temperature widget
    - Add color swap setting in config.json, which swaps heat map color
    between font & background color.

    * Fuel widget
    - Now reads mLapStartET from "Telemetry" which has higher accuracy.

    * Wear widget
    - Add unit "bar" for tyre pressure.
     
    Last edited: Mar 22, 2022
    jayarrbee36, kados, Corti and 3 others like this.
  12. EmanueleMarra15

    EmanueleMarra15 Registered

    Joined:
    Nov 29, 2020
    Messages:
    7
    Likes Received:
    4
    absolute top, they will make you a saint. hahaha THANK YOU
     
    svictor likes this.
  13. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    500
    Likes Received:
    3,154
    v1.1.3 update - Add laptime validating

    Download: https://github.com/s-victor/TinyPedal/releases/tag/v1.1.3

    Now APP will validate laptime. Any invalid laptime will no longer be saved as best laptime.
    Delta best now fully works under any track or condition. Whether cutting track, or running with point to point track, best laptime will be properly validated and saved.

    Changelog:
    TinyPedal 1.1.3 (2022-03-22)
    ----------------------------
    * Core
    - Add laptime validating function for "deltatime" module.
    Invalid laptime will no longer be saved as best laptime.
    Delta best now fully works under any track or condition.

    * Misc
    - Fixed a few typo in README.md & previous changelog.
    - Added missing contributors.md reference to build_py2exe.py.
     
    marmagas, yashiman, nolive721 and 5 others like this.
  14. nolive721

    nolive721 Registered

    Joined:
    Jan 2, 2016
    Messages:
    188
    Likes Received:
    95
    Tried it last night and it’s working great just need to learn how to resize widgets

    the FFB meter next to pedals input is very accurate and will replace my self created simhub overlay for sure

    thanks so much
     
    svictor likes this.
  15. nolive721

    nolive721 Registered

    Joined:
    Jan 2, 2016
    Messages:
    188
    Likes Received:
    95
    any chance to do widget size tweaking directly on screen, with the mouse button for example like in RRE, or clicking some widget corners like in AC?

    sorry, getting old and tweaking numbers in file you know:p
     
  16. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    500
    Likes Received:
    3,154
    Thanks for the suggestion.

    Unfortunately, direct resize is not possible atm, and is unlikely to be added. I understand the inconvenience of manual editing (I too wish things to be easy), but there are some fundamental limitation to the GUI stuff that used by the APP, and the actual underlying stuff works very differently comparing to other games that natively support HUD, which also renders in total different ways.

    Adding it would also introduce a lot functions and variables that multiply complicity of the APP code, which is a big concern for performance and resources, as there are many decisions that made to keep the APP simple and run fast without eating extra resources.

    Nevertheless, I do wish to improve the way of handling customization in the future.

    PS: also many options in config.json provide a lot flexible combinations to size & position.

    Here is a few tips for quickly edit config.json and resize widget:
    1. If a widget has "font_size" option, then widget size is determined by font_size (increase font_size value will also increase widget size).
    2. Any other widget size is controlled by "***_scale" value. For example, change scale value from 1.0 to 2.0 means the size is doubled.
    3. You can use find > replace all in notepad to quickly change all font_size to desired size.
    For example, search following keyword:
    "font_size": 15,
    and replace with:
    "font_size": 20,
    which would make most widgets larger.

    Hope helps.
     
    Last edited: Mar 23, 2022
    atomed, nolive721 and Corti like this.
  17. nolive721

    nolive721 Registered

    Joined:
    Jan 2, 2016
    Messages:
    188
    Likes Received:
    95
    Oh I hope I was not sounding like a lazy 50yrs old man not willing to spend few minutes to edit a file.

    thanks a lot for having taken the time to provide these hints, I promise to test that during the weekend

    I can easily imagine you doing this APP on your private time so I also hope I didn't sound too much pushy with my request for updates on these widgets. sorry again if you took it the wrong way:oops:
     
    Last edited: Mar 24, 2022
    Seven Smiles and svictor like this.
  18. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    500
    Likes Received:
    3,154
    Thanks, no worries, I will definitely seek any opportunities and possibilities to improve the app. There are still a lot of ideas haven't yet realized, time will tell.
     
    nolive721 likes this.
  19. Flatspotter

    Flatspotter Registered

    Joined:
    Oct 7, 2010
    Messages:
    346
    Likes Received:
    93
    Thank you for this wonderful tool! I love that you can easily turn things on or off, reposition and resize them.

    One question: Is it possible to have the Delta Best widget compare my time to the fastest driver on track instead of my own fastest lap? While it's very useful to see where I'm gaining or losing time compared with myself, it would help me more to see how I compare to the fastest car.

    Thanks again!
     
    Corti and svictor like this.
  20. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    500
    Likes Received:
    3,154
    Thanks for the idea.

    In theory, it should be possible. However, to put coding difficulty aside, that would require APP to constantly record everyone's laptime on server (since delta time data isn't provided by game, has to be recorded in real-time), then constantly saving and comparing each one's laptime data to pick a best server laptime to be able to compare with yourself, all those process would likely be a great performance hit.

    Alternatively, only select and record one player that you know he is going to set a fastest laptime, which would also require to create a window or menu for selecting player. Also player index can change if one player leaves server, so probably will have side effects.
     
    Last edited: Mar 30, 2022
    atomed and Corti like this.

Share This Page