WinLirc problem, Sends stuff two time???

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • BadOmen

    #1

    WinLirc problem, Sends stuff two time???

    I am using winLirc to receive date from my Packard Bell Fast media IR
    remote. The problem I have is that Winsock1_DataAr rival(ByVal bytesTotal As
    Long) Is called two times almost every time I press a button on my
    remote.Way is it doing that???


    This is the code I am using but I don't know how has made it...
    It works fine and i can make WinAmp5 play, stop, Next and back etc with a
    few adds to it. The problem is that the Winsock1_DataAr rival some times, not
    always, think that I have pressed a button on my remote two times... This
    makes WinAmp Next and back not that good...

    WinLirc shows with a green button when I press the remote and it blink green
    ones each time I press a button.

    Is it something in WinLirc or is it how WinLirc translate my remote that is
    wrong?
    Or is it in this code???

    Plz help me I wold be so happy if I could program my remote with the use of
    winLirc

    Option Explicit
    Dim Counter As Integer

    Private Sub Form_Load()
    Counter = 1
    Dim strLocalIP As String

    strLocalIP = Winsock1.LocalI P
    Winsock1.Protoc ol = sckTCPProtocol
    Winsock1.Remote Host = strLocalIP
    Winsock1.Remote Port = 8765
    Winsock1.Connec t

    End Sub

    Private Sub Winsock1_DataAr rival(ByVal bytesTotal As Long)

    Dim strData As String
    Dim strRemoteHex, strRemoteName, strRemoteKey As String
    Dim intRemoteIdx, intSeperatorOne , intSeperatorTwo As Integer

    Winsock1.GetDat a strData, vbString
    Text1.Text = strData 'Messagestring from WinLirc

    strRemoteHex = Left(strData, 16)
    intRemoteIdx = Val(Mid$(strDat a, 18, 2))

    intSeperatorOne = InStr(21, strData, " ", vbBinaryCompare )
    strRemoteKey = Mid$(strData, 21, intSeperatorOne - 21) 'Code of the Key
    from Remote Control

    intSeperatorTwo = InStr(intSepera torOne, strData, Chr(10),
    vbBinaryCompare )
    strRemoteName = Mid$(strData, intSeperatorOne + 1, (intSeperatorTw o -
    intSeperatorOne ) - 1) 'Name of the Key - defined in WinLircServer

    Text2.Text = "KEY:" & strRemoteKey & " Control:" & strRemoteName

    End Sub

    Yours, Jonas


  • BadOmen

    #2
    Re: WinLirc problem, Sends stuff two time???


    There was a repeat in the WinLirc Config file that I deleted to solve that
    problem...

    But I need to be able to hold down the Volume button on my remote so it will
    repeat but sens I have deleted the repeat from the config file it will of
    cause not work... :(

    Instead I need to have the repeat in the config file and be able to just
    take out the Initial signal from the remote and not the repeat signal.

    How do I do that?


    "BadOmen" <badomen02@hotm ail.com> skrev i meddelandet
    news:vN7Xb.8262 9$dP1.219811@ne wsc.telia.net.. .[color=blue]
    > I am using winLirc to receive date from my Packard Bell Fast media IR
    > remote. The problem I have is that Winsock1_DataAr rival(ByVal bytesTotal[/color]
    As[color=blue]
    > Long) Is called two times almost every time I press a button on my
    > remote.Way is it doing that???
    >
    >
    > This is the code I am using but I don't know how has made it...
    > It works fine and i can make WinAmp5 play, stop, Next and back etc with a
    > few adds to it. The problem is that the Winsock1_DataAr rival some times,[/color]
    not[color=blue]
    > always, think that I have pressed a button on my remote two times... This
    > makes WinAmp Next and back not that good...
    >
    > WinLirc shows with a green button when I press the remote and it blink[/color]
    green[color=blue]
    > ones each time I press a button.
    >
    > Is it something in WinLirc or is it how WinLirc translate my remote that[/color]
    is[color=blue]
    > wrong?
    > Or is it in this code???
    >
    > Plz help me I wold be so happy if I could program my remote with the use[/color]
    of[color=blue]
    > winLirc
    >
    > Option Explicit
    > Dim Counter As Integer
    >
    > Private Sub Form_Load()
    > Counter = 1
    > Dim strLocalIP As String
    >
    > strLocalIP = Winsock1.LocalI P
    > Winsock1.Protoc ol = sckTCPProtocol
    > Winsock1.Remote Host = strLocalIP
    > Winsock1.Remote Port = 8765
    > Winsock1.Connec t
    >
    > End Sub
    >
    > Private Sub Winsock1_DataAr rival(ByVal bytesTotal As Long)
    >
    > Dim strData As String
    > Dim strRemoteHex, strRemoteName, strRemoteKey As String
    > Dim intRemoteIdx, intSeperatorOne , intSeperatorTwo As Integer
    >
    > Winsock1.GetDat a strData, vbString
    > Text1.Text = strData 'Messagestring from WinLirc
    >
    > strRemoteHex = Left(strData, 16)
    > intRemoteIdx = Val(Mid$(strDat a, 18, 2))
    >
    > intSeperatorOne = InStr(21, strData, " ", vbBinaryCompare )
    > strRemoteKey = Mid$(strData, 21, intSeperatorOne - 21) 'Code of the[/color]
    Key[color=blue]
    > from Remote Control
    >
    > intSeperatorTwo = InStr(intSepera torOne, strData, Chr(10),
    > vbBinaryCompare )
    > strRemoteName = Mid$(strData, intSeperatorOne + 1, (intSeperatorTw o -
    > intSeperatorOne ) - 1) 'Name of the Key - defined in WinLircServer
    >
    > Text2.Text = "KEY:" & strRemoteKey & " Control:" & strRemoteName
    >
    > End Sub
    >
    > Yours, Jonas
    >
    >[/color]


    Comment

    Working...