Machsupport Forum
Mach Discussion => Mach4 General Discussion => Mach4 Plugins => Topic started by: daffyduck on December 29, 2022, 03:43:20 PM
-
Hello All,
Trying to use the plugin made by @dazthegas for the XBox 360 Controller. Have some weird issues, wondering if someone can give some advice. I have the plugin in the plugins directory. I can activate the plugin from the Configure -> Control->Plug in menu. However here is where it gets a bit weird for me. I do NOT see the plugin under Configure->Plugins. Also it does not show me that the XBox 360 Controller is active in the message bar. I am on Windows 10 running the latest version of Mach4. Another weird thing is that if I check the controller from Diagnostic->Regfile it DOES show signals from the controller. I am sure it is something simple, but I can't seem to figure this one out. I've reinstalled, restarted, etc... no joy.
Thanks!
-
I use the controller with Mach3 under Win10 and found that you need to reinstall some windows components (ActiveX?) that Win10 doesn't normally have. This came up recently and I posted a link to the fix iirc.
-
See this post...
https://www.machsupport.com/forum/index.php?topic=45733.msg290465#msg290465
-
Thank you very much for the reply JohnHaine! I am proceeding as suggested however after the DirectX install I cannot find "xbox.dll". Where is that file? Thanks.
-
Attached photo may help - it's in the Mach3 plugins folder, may be different for Mach4. There is a copy in my downloads folder so I presumably downloaded it from somewhere...
-
I can't find that file anywhere on my computer. Searching Google for the exact filename ....
-
I could send you a copy?
-
That would be awesome. Thanks for the offer. Can we do it here or in a PM?
-
I am wondering if it is a native Windows dll or something DazTheGas made?
-
I found it on the Mach3 Plugins page :-).
-
Ok. I am getting somewhere slowly. I am using some debug output messages to trace the LUA script functionality. For some reason, at least on my system, I need to explicitly define the number variable on both sides of an if statement operator.
For example, this does NOT work:
LTR_Val = GetXin("LTR_Val") --left trigger value 0-255
if LTR_Val > 0 then
mc.mcCntlSetLastError(mInst,"LTR_Val not 0")
elseif LTR_Val == 0 then
mc.mcCntlSetLastError(mInst,"LTR_Val 0")
end
However this DOES work:
LTR_Val = GetXin("LTR_Val") --left trigger value
if tonumber(LTR_Val) > tonumber(0) then
mc.mcCntlSetLastError(mInst,"LTR_Val not 0")
elseif tonumber(LTR_Val) == tonumber(0) then
mc.mcCntlSetLastError(mInst,"LTR_Val 0")
end
-
I also found that I have to first assign the trigger value to a variable before putting into a logical statement. Example:
LTR_Val = GetXin("LTR_Val")