-
Posts
3513 -
Joined
-
Last visited
-
Days Won
1
About Home Fries
- Birthday 03/03/1971
Personal Information
-
Flight Simulators
DCS World
IL-2 Great Battles
Total Air War 2.0
EF2000
Falcon BMS
Jane's F/A-18
EECH
X-Plane 11
MSFS 2020 -
Location
Greater Washington DC Area
-
Interests
Programming
-
Occupation
College Professor (former Naval Flight Officer)
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
TARGET question regarding Controller Aliases
Home Fries replied to Home Fries's topic in Thrustmaster
Thank you for such a great write-up. My goal in this is to allow up to two sticks and two throttles to be connected in the profile, with one being primary and the other secondary (user's choice). For example, someone can use the Warthog throttle with the F-18 Stick as a primary config, with something like HCougar as the secondary config for a F-16 throttle and side stick configuration. I'm hoping to keep this generic to add the new F-16 TQS and the AVA and any other peripherals. Then within the same profile, someone flying the F-18 can use the primary configuration, and then loading the F-16 profile can use the secondary configuration and those axes will be selected for the TM virtual controller. Ideally, the alias is what I would like to do, and you're right that I don't want to modify existing TM libraries because that's a can of worms for both myself and the end user. What I'd really like is in the database config the end user selects controllers for the primary (CJy0 and CTh0) and secondary (CJy1 and CTh1) HOTAS, then for each profile can choose to use the secondary stick or throttle instead of the primary. I also want to create consistent button mapping for both primary and secondary buttons, (so all buttons can be used), with the profile mainly changing axis assignments on the fly. With 120 buttons I can make this happen, and this is part of my strategy going forward to keep the script smaller and allow more expandability against the TM stack limit. Putting the alias into the axis mapping function may be exactly what the doctor ordered, and then I'll better figure out a static button mapping scheme. I'll give this a try. -
TARGET question regarding Controller Aliases
Home Fries replied to Home Fries's topic in Thrustmaster
Ok, I shortened the variable names to 4 characters with the last character being the number 0 or 1 as before. I was still getting the index out of bounds using "alias", but converted the variable to char (dimmed at 15) and I was able to compile without the index error. Problem is now that I cant get the commands to carry, even though it looks like it should work. I'm sure I'm missing a subtlety somewhere. I don't have a lot of experience working with alias/register logic. Here's the new code: char CJy0; char CJy1; char CTh0; char CTh1; //alias CJy0="Joystick"; //alias CJy1="HCougar"; //alias CTh0="Throttle"; //alias CTh1="HCougar"; int main() { Dim(&CJy0, 15); Dim(&CJy1, 15); Dim(&CTh0, 15); Dim(&CTh1, 15); sprintf (&CJy0, "Joystick"); sprintf (&CJy1, "HCougar"); sprintf (&CTh0, "Throttle"); sprintf (&CTh1, "HCougar"); if(Init(&EventHandle)) return 1; // declare the event handler, return on error Test_Init(0); } int Test_Init(int secondary = 0) { if (secondary) { MapAxis (&CJy1, JOYX, DX_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); MapAxis (&CJy1, JOYY, DX_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); MapAxis (&CTh1, THR_LEFT, DX_THROTTLE_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); MapAxis (&CTh1, THR_RIGHT, DX_Z_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); } else { MapAxis (&CJy0, JOYX, DX_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); MapAxis (&CJy0, JOYY, DX_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); MapAxis (&CTh0, THR_LEFT, DX_THROTTLE_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); MapAxis (&CTh0, THR_RIGHT, DX_Z_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); } } I get a good compile, but no axis response in the Device Analyzer. -
TARGET question regarding Controller Aliases
Home Fries replied to Home Fries's topic in Thrustmaster
Thanks. I'll try it out! -
I'm currently working on version 3.0 of my CTS script, and one of the things I want to do to minimize the stack size (for expandability) is to use aliases for each controller set instead of having separate routines for mapping the Warthog, Cougar, F-18 stick, etc. I tried to create the following code as a proof of concept for being able to assign aliases to the already existing aliases of &Joystick, &Throttle, and &HCougar: alias CJoy0="Joystick"; alias CJoy1="HCougar"; alias CThr0="Throttle"; alias CThr1="HCougar"; int Test_Init(int secondary = 0) { if (secondary) { MapAxis (&CJoy1, JOYX, DX_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); MapAxis (&CJoy1, JOYY, DX_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); MapAxis (&CThr1, THR_LEFT, DX_THROTTLE_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); MapAxis (&CThr1, THR_RIGHT, DX_Z_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); } else { MapAxis (&CJoy0, JOYX, DX_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); MapAxis (&CJoy0, JOYY, DX_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); MapAxis (&CThr0, THR_LEFT, DX_THROTTLE_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); MapAxis (&CThr0, THR_RIGHT, DX_Z_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); } } int main() { Test_Init(0); } The error I get is: Runtime Error: Index out of bounds for: devicedata in GetDeviceData ( line 329 in target.tmh ) and the routine in target.tmh is int GetDeviceData(alias dev) // fill global devdata alias based on device name (joy1, joy2,...) { char t; Dim(&t, 16); strname(&dev, &t); Map(&devdata, &&devicedata[t[3]-'0']); } note: Map(&devdata, &&devicedata[t[3]-'0']); is line 329. I've also tried assigning the CJoy/CThr values as chars (dim 15) and I get the same problem. I'm unsure what needs to be done because my aliases don't seem to map properly to an array. I'm open to any suggestions. Being able to crack this would go a long way to modularizing my code for version 3.0.
-
DCS World TARGET profile for TM Cougar and Warthog + MFDs
Home Fries replied to Home Fries's topic in Thrustmaster
Yes, though it may be basic to start. I'm very close to stack limits and I need to start building CTS 3.0 to take advantage of the 120 buttons. Adding a full Phantom profile may break the script. -
New "Flaming Cliffs 2024" aircraft questions (F-5E, F-86, Mig-15)
Home Fries replied to cfrag's topic in DCS: Flaming Cliffs
IMO the ideal solution would be to add a combo box in the ME to either allow both variants (e.g. F-86FC and F-86), or make the slot exclusive to one variant or the other (for servers that want to restrict it to high fidelity). This would give mission builders the flexibility without having to create extra slots for each version. Hopefully ED implements something like this, esp. with the high fidelity MiG-29A coming out as well. -
Version 1.41 is up. The flightsuits have been updated to 2.9.x and we now have custom helmets.
-
Version 1.41 is up. The flightsuits have been updated to 2.9.x and we now have custom helmets.
-
Version 1.41 is up for both skin packs. The flightsuits have been updated to 2.9.x and we now have custom helmets.
-
DCS World TARGET profile for TM Cougar and Warthog + MFDs
Home Fries replied to Home Fries's topic in Thrustmaster
Spud, I was away for a while, and just saw this. It's no doubt due to the new version of TARGET that allows up to 120 buttons. This makes the DX+.tmh file redundant and likely incompatible. I'll need to look at this, so please be patient. -
DCS World TARGET profile for TM Cougar and Warthog + MFDs
Home Fries replied to Home Fries's topic in Thrustmaster
No promises. I'm very near the stack limit of what TARGET will allow. I'm hoping I can get one more module in before I put all my effort into CTS 3.0. -
You're in! (Time late 1 week or so)
-
DCS World TARGET profile for TM Cougar and Warthog + MFDs
Home Fries replied to Home Fries's topic in Thrustmaster
Yes, the TMC file. Sorry. Also, sorry I took so long to get back. I was away all last week. -
DCS World TARGET profile for TM Cougar and Warthog + MFDs
Home Fries replied to Home Fries's topic in Thrustmaster
Once you have downloaded version.txt (and the version in the OP of this thread is correct), be sure to put it in the CTS\DB folder. You should be prompted to overwrite the original. If this doesn't work, you can always reinstall. As long as you install to the same location, it won't affect your custom profile settings. Please upload your dcs_world.cts file so I may analyze it. -
DCS World TARGET profile for TM Cougar and Warthog + MFDs
Home Fries replied to Home Fries's topic in Thrustmaster
I'll take a look at the Mirage. I haven't looked at the MiG-21 since VAICOM went freeware, so I'll take a look when I get an opportunity. Thanks for the heads-up. No promises; it may be something I need to fix in CTS 3.0. I responded to your PM, but I'll post the answer for everyone else's benefit. I noticed on the hornet in particular that you need longer keypresses than the default 60ms to get something to register. I actually increased the default keypress time for the F/A-18 in particular, though this is something you can adjust in CTS. If you go to the F/A-18C section of the values page, you'll see Keypress Duration for F/A-18 and Delay between Keypresses for F/A-18. These are set to 70 and 80ms respectively, and you can increase them by small amounts to work for your system. Regarding the diff.lua files, the R/N for the kb file is for the orientation of the numeric keypad, where N is for Normal (789 on the top, 123 on the bottom) and R is for Reverse (123 on the top, 789 on the bottom like the UFC itself). The rest of the files are for the specific controllers, e.g. WH for Warthog and HC for HOTAS Cougar. The first 2 MFDs are applied to the TARGET profile integrated into the virtual controller. The MFD3 diff.luas are for if you have a third MFD you can apply that to the individual controller in DCS (TARGET sees only the first 2 MFDs). Remember that the controls menu is a spreadsheet, where the commands are the rows and the controllers are columns, and each controller gets its own assignments (and its own diff.lua).