I tried with the most simple one I have, the Logitech/Saitek Rudder Pedals. Just three axis.
The issue is that
- axis 0 (left toe brake) does work. Input is received after adding the controlle, and input changes with left pedal action between (between -1.0 and +1.0)
- axis 2 (right toe brake) does not work properly. Input is received only once after adding the controller, on pedal action input is never received (no callback)
- axis 1 (rudder) does not provide any input at all. The callback function is never called for this axis. Not after adding the controller and never on rudder action.
The rudder panels have been working with different simulators for years. Windows game controller calibration tool is showing all inputs.
instrument code is:
Code: Select all
-- MSFS Game Controller
-- Saitek Pro Flight Rudder Pedals¨
local controller = "Flight Rudder Pedals"
local axis = {}
axis[0] = { event = "AXIS_LEFT_BRAKE_SET", range = 16383 }
axis[1] = { event = "AXIS_RUDDER_SET", range = 16383 }
axis[2] = { event = "AXIS_RIGHT_BRAKE_SET", range = 16383 }
function callback(type, index, input)
log("Game controller callback with type = " .. type .. ", index = " .. index .. ", input = " .. tostring(input))
if type == 0 then
event = axis[index].event
output = math.floor(axis[index].range * var_cap(input, -1.0, 1.0) )
fs2020_event( event, output )
end
end
if game_controller_add(controller, callback) then
log("Game Controller added: " .. controller)
end
-- END