ACME_WIdgets Posted June 21, 2020 Posted June 21, 2020 Just updated my 35 year old Thrustmast FCS stick/Mk2 HOTASa with a Teensey2++ USB ($10 investment). Yes, I'm very cheap...but I like a challenge! I'm 2 months new into DCS, and like it a lot. Joysticks and Hotas throttle work great. I can land on a carrier now. All 16 buttons work great on things like flaps, gear, air brake, pulse rate.. BUT with a single button push on one of my hat buttons, to slew the TWS target designator up,dn,left,right - they slew all the way up,dn, left,right to the edge of the TWS screen, with NO small increments - like I'm pushing the button 20+ times really fast. Up/Down nose/elevator trim does the same thing. I looked on the forums but don't see anyone else w/this issue. I'm assuming DCS sees my hat (4 independent buttons now) moves without a leading or trailing edge single click only. But why only on these TWS and trim functions? Is there a .lua file setting somewhere for this? Running Windows 10 joy.cpl the buttons appear to work as single clicks. On the Teensey s/w I'm using the simple Joystick commands. I am NOT running a Delay at the end of the program. I could try to add the Millisecond "delay" (so other commands can keep working) after each button, or at the end of my program (?) If I have to, I'll complicate my Teensey s/w by replacing the simple Joystick commands and go to a detect my hat buttons rising/falling edge, debounce, delay. But that's a lot of trial and error. Any suggestions ? Thanks everyone!!! 5600x, EVGA 3070 FTW, B550 Tomahawk, M.2 Samsung, 32GB CL16, AIO 240mm VKB Gladiator Pro, Freetracker IR 3d printed, TM MkII HOTAS circa 1985 w/USB Asus 27" 2560x1440 60fps (so constrain DCS to 60fps) F-16, F-18 2021 = First year on DCS:
longuich Posted June 21, 2020 Posted June 21, 2020 If you keep it simple playing with delays should help. Sent from my iPhone using Tapatalk
ACME_WIdgets Posted June 23, 2020 Author Posted June 23, 2020 (edited) Problem Really Solved. 1- The Teensey library Joystick is not the same as the Arduino library. 2- For some reason the Teensey Joystick returns TRUE for Pin_HIGH (i.e. when internal PULL_UP is activated). So all my buttons where ON until I pressed one, then it went LOW or off. Hence my problem with "stuck" buttons in DCS (after I pressed a button one time). 3- PJRC (maker of Teensey) says to use this to trigger joystick on press (change to LOW), but this did not work for me: Joystick.button(pin_num, 1); SOLUTION - add a "!" in front of the digitalRead(pin#) to flip the Boolean logic from TRUE to FALSE. So my button read statements look like this and it works perfect: Joystick.button(pin_num, !digitalRead(pin_num)) Edited June 24, 2020 by ACME_Widgets found working solution and why it was broken 5600x, EVGA 3070 FTW, B550 Tomahawk, M.2 Samsung, 32GB CL16, AIO 240mm VKB Gladiator Pro, Freetracker IR 3d printed, TM MkII HOTAS circa 1985 w/USB Asus 27" 2560x1440 60fps (so constrain DCS to 60fps) F-16, F-18 2021 = First year on DCS:
Recommended Posts