Jump to content

Sioc to replicate Joystick/Keypress commands?


memento10

Recommended Posts

Well I've been trying to get this working without any luck but I wonder if I'm making any silly mistakes.

 

First I added this code to the ExportSupport.lua:

 

-- Calls non-clickable commands without parameters for two-position switch

function TwoPositionSwitch_NCC_noparam(pDevice, pCommandNumber)

GetDevice(pDevice):SetCommand(pCommandNumber)

end

 

Then I created the Sioc variable on the client PC as follows with the physical switch 136 and using variable 485. I created this as a switch:

 

Var 485 , name ShkvalCenter, Link IOCARD_SW, Input 136

 

Then I added the following code to SiocConfig.lua:

 

inputsTable = {

...

[485] = {TwoPositionSwitch_NCC_noparam, 8, 92},

...

}

 

Is there anything obvious I'm doing that you think would be a problem? I checked the Error Log but saw no problems regarding this code. When I press the button... the Shkval doesn't center.

 

Really appreciate everyone's help with this, I'm sure many others will also appreciate this solution!

 

 

hello ,i had the same problem and

 

i have the solution and it work now , just put pValue in the function :

 

-- Calls non-clickable commands without parameters for two-position switch

function TwoPositionSwitch_NCC_noparam(pValue, pDevice, pCommandNumber)

GetDevice(pDevice):SetCommand(pCommandNumber, pValue)

end

 

;) ;)

Link to comment
Share on other sites

in the script for touchpal, in export.lua, you have in case you send 'S' (Setcommand) and not C (performclickableaction), in the input function, two parameters for setcommand... so it should be as said by TheBest.

 

have not tested personnaly because my office is out of order for some handwork to upgrade it ... so I have only one screen in order and don't want to rewrite all stuff for just some days... will test later... in some days.

Link to comment
Share on other sites

hum... what about the value to put in pValue ? where find it ?

 

could upgrade my exelsheat but don't know or don't find any pValue ... ???

put nothing in pValue , just add in the function and change nothing in siocconfig.lua.

 

it work for me but not without pValue in the function

i have add it because i saw here : http://en.wiki.eagle.ru/wiki/Export_1_0_1 ,

 

 

  • Sending command:

local dev = GetDevice(id_of_device) -- id_of_device unsigned number

dev:SetCommand(command_id,command_value) -- send command to device

dev:performClickableAction(command_id,command_value) -- send command to device

 

ps pour hellfrog : si tu trouve des infos pour les setcommand d autres fonctions comme accélérer le temps , mettre en pause ect , ca m interresse car je n en trouve pas hélas , j essais de me passer de mon clavier , voila pourquoi lol sinon j acheterais un petit clavier s il fo.


Edited by thebestttttttt
Link to comment
Share on other sites

hello ,i had the same problem and

 

i have the solution and it work now , just put pValue in the function :

 

-- Calls non-clickable commands without parameters for two-position switch

function TwoPositionSwitch_NCC_noparam(pValue, pDevice, pCommandNumber)

GetDevice(pDevice):SetCommand(pCommandNumber, pValue)

end

 

;) ;)

 

Yes some commands require a value, which is why I named the function TwoPositionSwitch_NCC_noparam

 

The idea being that you create another function like TwoPositionSwitch_NCC_param where you do pass parameters

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...