mipko Posted October 26, 2014 Share Posted October 26, 2014 (edited) Hello, I just can't find control mappings for some cockpit functionality, like. SRZO CODES or RADIO CHANNELS for example. I'm building MIG-21 virtual cockpit and I'm stuck with quite few cockpit buttons not being mapped to kbd or any other controller. m'I not seeing it properly or something else is wrong ? Any help will be much appreciated. many thanks Mipko EDIT: I just took a look into the default.lua for MIG 21, devices.lua and commands.lua. It seems that some commands can be performed only by axis. For example Radio Channel, there is no up/down command only RadioChannel = start_command + 45; so, I have to buy controller with joystick ? No way :) This should be expanded with full kbd support so we can easily map them to simple rotary encoders. Edited October 26, 2014 by mipko Link to comment Share on other sites More sharing options...
mipko Posted October 27, 2014 Author Share Posted October 27, 2014 I hitnk I'm getting somewhere... Radio Channel is attached to clickable action in clickabledata.lua. So I just typed few lines in default.lua. clickabledata.lua: elements["PNT_211"] = multiposition_switch(LOCALIZE("Radio Channel"),devices.RADIO, device_commands.RadioChannel, 211, 20, 0.05, true) I read this code like this - 20 positions, 0.05 increment, can be inverted. default.lua {combos={{key='JOY_BTN2'}},pressed=device_commands.RadioChannel,cockpit_device_id=devices.RADIO,value_pressed=0.15,name='RADIO CHANNEL + ',category='RADIO'}, {combos={{key='JOY_BTN1'}},pressed=device_commands.RadioChannel,cockpit_device_id=devices.RADIO,value_pressed=0.10,name='RADIO CHANNEL - ',category='RADIO'}, So with button_2 I set frequencu to 3 and with button1 I set frequency to 2. The question is how to make full cycle with rotary encoder with btn1 & btn2 as encoder buttons ? many thanks Mipko Link to comment Share on other sites More sharing options...
Recommended Posts