eaglewen Posted December 2, 2019 Share Posted December 2, 2019 Hi, I'm trying to make my throtlle (connected via a potentiometer on an OpenCockpit-analoag input) work under the F-16. I already have a lot of controls and lamps working but I have difficulties to read a potentiometer. What code I should use in SiocConfig.lua? Curently I'm using the code below but that isn't working...would be to easy I guess :music_whistling: -- CONTROLS INTERFACE [755] = {SimplePotentiometer, 0, 1},--THROTTLE In my mainPanel.lua the throttle is defined so I think I should use 0 for the device definition, correct? Problem is I can't figure out what the pNumber needs to be -- CONTROLS --------------------------------------------------- StickPitch = CreateGaugeLocal(736, {-1, 1}, {1, -1}, controllers.StickPitch) StickRoll = CreateGaugeLocal(737, {-1, 1}, {-1, 1}, controllers.StickRoll) Rudder = CreateGaugeLocal(780, {-1, 1}, {-1, 1}, controllers.Rudder) Throttle = CreateGaugeLocal(755, {0.0, 0.1, 0.775, 1.0}, {0.0, 0.1, 0.6, 1.0}, controllers.Throttle) LeftWheelBrake = CreateGaugeLocal(781, {0, 1}, {0, 1}, controllers.LeftWheelBrake) RightWheelBrake = CreateGaugeLocal(782, {0, 1}, {0, 1}, controllers.RightWheelBrake) In SIOC I'm currently sending a value between 0 and 255 to the var 755. Many thanks for helping me out in this. Greetings Werner Link to comment Share on other sites More sharing options...
eaglewen Posted December 8, 2019 Author Share Posted December 8, 2019 No one? Link to comment Share on other sites More sharing options...
iwalwila Posted January 11, 2023 Share Posted January 11, 2023 +1 Link to comment Share on other sites More sharing options...
Recommended Posts