Skip to content

Commit

Permalink
Wiki updates, changelog to the correct url.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tumppi066 committed Jan 31, 2024
1 parent 007508b commit eebfe71
Show file tree
Hide file tree
Showing 16 changed files with 168 additions and 29 deletions.
2 changes: 1 addition & 1 deletion WIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors:
avatar: https://avatars.githubusercontent.com/u/83072683?v=4
date: 2024-1-31
icon: gear
order: 1
order: 2
---

!!! Info Info
Expand Down
3 changes: 3 additions & 0 deletions blog/V1.9.Minor.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ order: 1 # The V1.9.0 changelog was released on the same day. So we want to make
This changelog will contain all change from 1.9.0 onwards before the next major version.
!!!

==- Version 1.9.16
- Changelog will now open to the correct url.

==- Version 1.9.15
- Add the new wiki you are on right now!

Expand Down
3 changes: 1 addition & 2 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Added new wiki @ docs.tumppi066.fi
This is still under construction.
Update changelog url
6 changes: 3 additions & 3 deletions plugins/BetterCamScreenCapture/BetterCamScreenCapture.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ Display : The display to capture from

### Installation
This plugin will install the following python packages:
```
bettercam
```
=== bettercam
Used for capturing the display.
===

### Debugging
##### 'The specified device interface or feature level is not supported on this system.'
Expand Down
2 changes: 1 addition & 1 deletion plugins/Changelog/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def exampleFunction(self):


if CHANGE_LOG_SHOWN == False:
helpers.OpenWebView("Changelog", "https://github.com/Tumppi066/Euro-Truck-Simulator-2-Lane-Assist/releases")
helpers.OpenWebView("Changelog", "https://wiki.tumppi066.fi/blog/", width=800, height=600)
CHANGE_LOG_SHOWN = True

helpers.MakeLabel(self.root, "Close this window by middle clicking on the tab.", 0, 0)
Expand Down
69 changes: 69 additions & 0 deletions plugins/DefaultSteering/DefaultSteering.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
# https://retype.com/configuration/page/
# please also see the docs for components
# https://retype.com/components/alert/
authors:
- name: Tumppi066
link: https://github.com/Tumppi066
avatar: https://avatars.githubusercontent.com/u/83072683?v=4
date: 2024-1-31
icon: stack
tags:
- plugin
---
[!button Developer Documentation](Docs.md)

### Description
This plugin handles converting the steering offset from the lane detection models into a usable output for the game.

### Usage
This plugin will just work when it's enabled.
**It is however important to note that this plugin won't do anything without a lane detection model, or a way of outputting the steering offset to the game.**

### Configuration / UI

+++ General
==- Steering Offset
Will control how much the steering will be offset from the center of the lane detection model. This is useful if you find the truck driving too far to the right or left.
==- Control Smoothness
Will control how many frames the steering offset will be averaged over. This will control how "smooth" the steering will be.
!!!warning Warning
Setting this value too high, especially on low FPS, will cause "bouncing" between the lanes.
!!!
==- Sensitivity
Will control the multiplier on the steering. Essentially changing how much the app is responding to the input commands from the lane detection model.
==- Maximum Control
The maximum control the app is allowed to output. 1 is the maximum, 0 is the minimum.
==-
+++ Gamepad
==- Gamepad mode
Will smooth the input from the controller to the app. If you are using a gamepad then this is basically required.
==- Control Smoothness
Will control how many frames the steering offset will be averaged over. This will control how "smooth" the steering will be.
==-
!!! Note
This page is only necessary if you are using vgamepad to replace the main steering axis in game.
!!!
+++ Keyboard
==- Keyboard Mode
Will listen to keyboard inputs instead of controller inputs.
==- Keyboard Sensitivity
How fast the steering will react to the keyboard inputs.
==- Keyboard Return Sensitivity
How fast the steering will return to the center when no keyboard inputs are detected.
==-
!!! Note
This page is only necessary if you are using vgamepad to replace the main steering axis in game.
!!!
+++


### Installation
This plugin will install the following python packages:
=== opencv-python
Used for image processing, in this case we use it to draw text on the output frame.
=== pygame
Used for gamepad input
=== keyboard
Used for keyboard input
===
39 changes: 39 additions & 0 deletions plugins/DefaultSteering/Docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
# https://retype.com/configuration/page/
# please also see the docs for components
# https://retype.com/components/alert/
authors:
- name: Tumppi066
link: https://github.com/Tumppi066
avatar: https://avatars.githubusercontent.com/u/83072683?v=4
date: 2024-1-31
icon: stack
visibility: hidden
tags:
- documentation
---
!!!warning Warning
This page is meant for `developers`
!!!

## Data variable usage
The plugin will use the following data variable values:
=== [!badge variant="ghost" text="Input"] ‎ data/LaneDetection/difference
The input value from a lane detection plugin.
=== [!badge variant="ghost" text="Input"] ‎ data/api/truckFloat/speed
Input speed from the game. Used to automatically lower steering sensitivity at high speeds.
=== [!badge variant="ghost" text="Input"] ‎ data/api/truckBool/blinkerLeftActive (and right)
Used to disable the steering when indicating.
=== [!badge variant="dark" text="Output"] ‎ data/Controller/leftStick
The output value to the game. Goes from -1 to 1.
===

### Example
Copied from the BetterCamScreenCapture plugin:
```python
def plugin(data):
steeringOutput = data["Controller"]["leftStick"]
# Do something with the steeringOutput

return data
```
10 changes: 1 addition & 9 deletions plugins/DefaultSteering/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,11 @@
import src.sounds as sounds
from src.translator import Translate
import os
import pygame
import cv2
import keyboard as kb
from tkinter import messagebox
import src.controls as controls

pygame.joystick.init()
pygame.display.init()

controls.RegisterKeybind("Enable/Disable Steering",
defaultButtonIndex="n",
notBoundInfo="You should bind this. It's useful to have on hand.",
Expand Down Expand Up @@ -213,7 +209,6 @@ def plugin(data):
sounds.PlaysoundFromLocalPath("assets/sounds/start.mp3")

try:
pygame.event.pump() # Update the controller values

# Main controller update loop.
if(enabled):
Expand Down Expand Up @@ -305,7 +300,6 @@ def plugin(data):
sounds.PlaysoundFromLocalPath("assets/sounds/start.mp3")

try:
pygame.event.pump() # Update the controller values
steeringAxisValue = controls.GetKeybindValue("Steering Axis")
# Check if the SDK controller is enabled and vgamepad is not
try:
Expand Down Expand Up @@ -443,7 +437,7 @@ def plugin(data):
wheelValue = lastFrame
else:
try:
wheelValue = wheel.get_axis(steeringAxis)
wheelValue = controls.GetKeybindValue("Steering Axis")
except:
wheelValue = 0
else:
Expand Down Expand Up @@ -613,8 +607,6 @@ def save(self):


def update(self, data): # When the panel is open this function is called each frame
pygame.event.pump()

self.root.update()


Expand Down
1 change: 1 addition & 0 deletions plugins/Examples/Panel/Docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ authors:
avatar: https://retype.com/static/retype-logo-dark.svg
date: 2024-1-30
icon: gear
visibility: hidden
tags:
- documentation
---
Expand Down
10 changes: 5 additions & 5 deletions plugins/Examples/Panel/Panel.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ Tab3 content

### Installation
This panel will install the following python packages:
```
PLEASE FILL IN WITH YOUR PANEL'S PACKAGES.
bettercam
```
=== a python package
Used for something
=== another python package
Used for something else
===

OTHER NOTES HERE

Expand Down
1 change: 1 addition & 0 deletions plugins/Examples/Plugin/Docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ authors:
avatar: https://retype.com/static/retype-logo-dark.svg
date: 2024-1-30
icon: stack
visibility: hidden
tags:
- documentation
---
Expand Down
12 changes: 6 additions & 6 deletions plugins/Examples/Plugin/Plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ Tab3 content


### Installation
This plugin will install the following python packages:
```
PLEASE FILL IN WITH YOUR PLUGIN'S PACKAGES.
bettercam
```
This panel will install the following python packages:
=== a python package
Used for something
=== another python package
Used for something else
===

OTHER NOTES HERE

Expand Down
20 changes: 19 additions & 1 deletion retype.manifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "3.5.0",
"created": "2024-01-31T15.04.31Z",
"created": "2024-01-31T17.00.58Z",
"files": [
{
"path": ".nojekyll"
Expand Down Expand Up @@ -1421,6 +1421,12 @@
{
"path": "plugins\\deeptranslator\\index.html"
},
{
"path": "plugins\\defaultsteering\\docs\\index.html"
},
{
"path": "plugins\\defaultsteering\\index.html"
},
{
"path": "plugins\\firsttimesetup\\image.png"
},
Expand Down Expand Up @@ -1977,6 +1983,12 @@
{
"path": "tags\\panel\\index.html"
},
{
"path": "tags\\plugin\\index.html"
},
{
"path": "tags\\tutorial\\index.html"
},
{
"path": "themes\\forest\\forest\\border-accent-hover.png"
},
Expand Down Expand Up @@ -2397,6 +2409,12 @@
{
"path": "themes\\forestred\\forestred\\vert-hover.png"
},
{
"path": "tutorials\\index.html"
},
{
"path": "tutorials\\installation\\index.html"
},
{
"path": "version.txt"
},
Expand Down
5 changes: 5 additions & 0 deletions tutorials/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
order: 1
icon: book
redirect: installation.md
---
12 changes: 12 additions & 0 deletions tutorials/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
authors:
- name: Tumppi066
link: https://github.com/Tumppi066
avatar: https://avatars.githubusercontent.com/u/83072683?v=4
date: 2024-1-30
icon: stack
tags:
- tutorial
---

[!embed](https://www.youtube.com/watch?v=0pic0rzjvik)
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.9.15
1.9.16

0 comments on commit eebfe71

Please sign in to comment.