Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases

need help with a plugin

Place your requests for plugins here

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo

Post Reply
clunk1986
Posts: 2
Joined: October 6th, 2010, 2:25 am

need help with a plugin

Post by clunk1986 »

i play this game live for speed i would a plugin that will pull info from the game like rpm , speed , fuel , etc , etc an display it on a usb lcd through lcd smartie i have made a couple of programs that receives the data from the game an displays it on the programs labels etc an i have created a plugin before for lcd smartie its just merging the two together even if someone here could be kind enough to write a working source code i can compile it myself or a starting base i could add features to it thank you for taking the time to read this post thanks in advance for any help i can get :)

here is a example how the data is pulled from the game
to a vb.net application

Code: Select all

Imports LFS_External
Imports LFS_External.OutGauge
Imports LFS_External.OutGauge.Flags

Namespace LFS_External_Client
    Partial Public Class Form1
        Inherits Form
        Private OutGauge As OutGaugeInterface
        Dim Form1 As Windows.Forms.FormBorderStyle
        Private Property Form As Windows.Forms.FormBorderStyle
        Private Delegate Sub dlgOutGauge(ByVal og As Packets.OutGaugePack)
        Public Sub New()
            InitializeComponent()
        End Sub

        Private Sub OutGauge_Received(ByVal og As Packets.OutGaugePack)
            Try
                If DoInvoke() Then
                    Dim p As Object = og
                    Me.Invoke(New dlgOutGauge(AddressOf OutGauge_Received), p)
                    Return
                End If
            Catch e1 As Exception
                Return
            End Try

            Label3.Text = og.RPM.ToString

            Dim TXTgear As String
            TXTgear = "7"
            If (og.Gear > 7) Then
                TXTgear = Convert.ToString(og.Gear)
            Else
                Select Case og.Gear
                    Case 7
                        TXTgear = "6"
                    Case 6
                        TXTgear = "5"
                    Case 5
                        TXTgear = "4"
                    Case 4
                        TXTgear = "3"
                    Case 3
                        TXTgear = "2"
                    Case 2
                        TXTgear = "1"
                    Case 1
                        TXTgear = "N"
                    Case 0
                        TXTgear = "R"
                End Select
            End If
            Me.Label8.Text = TXTgear

            TextBox2.Text = og.Fuel.ToString("0.00L")
            TextBox3.Text = og.Throttle.ToString()
            Label1.Text = og.Car.ToString()
            TextBox6.Text = og.Speed.ToString("000")

        Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As FormClosingEventArgs) Handles MyBase.FormClosing
            OutGauge.Close()
        End Sub

        Private Function DoInvoke() As Boolean
            For Each c As Control In Me.Controls
                If c.InvokeRequired Then
                    Return True
                End If
                Exit For
            Next c
            Return False
        End Function

        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Try
                Dim outgauge_reply_port As UShort = 35555
                OutGauge = New OutGaugeInterface(outgauge_reply_port)
                AddHandler OutGauge.OutGauge_Received, AddressOf OutGauge_Received
                OutGauge.Listen()
            Catch ex As Exception
                MessageBox.Show(ex.Message)
            End Try
        End Sub

        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
            OutGauge.Close()
        End Sub
        Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
            Me.FormBorderStyle = FormBorderStyle.None
        End Sub
        Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
            Me.FormBorderStyle = FormBorderStyle.Fixed3D
        End Sub

        Private Function p() As Object
            Throw New NotImplementedException
        End Function

    End Class
End Namespace
the lcd is a hd44780 http://lcdmodkit.com/lcd/U204MB-B1.html
which interfaced this usb module http://lcdmodkit.com/module/BPU204A-1.html it uses a dll called lcd2usb.dll in lcd smartie
Post Reply