XIM Community

XIM SDK Feedback  (Read 3854 times)

Offline OBsIV

  • Administrator
  • MVP
  • *
  • Posts: 36462
  • It's obsessive.
    • View Profile
    • OBsIV's Blog
Re: XIM SDK Feedback
« Reply #30 on: 08:40 PM - 08/23/11 »
Whenever I send out an entire XIMControllerInput struct, the physical 360 controller gets disabled. I'm guessing even if I only send out stick values, everything else being zeroed out overrides any actual controller input from the XIM. I believe any buttons that are being zeroed out should be overridden by actual controller input.

Correct, unless you pass NULL for the device, what you send takes over. If you want, instead of going to rest (all zero), pass NULL for that device.
Get the most out of your XIM APEX, read the XIM APEX Support FAQ.

Offline kodek64

  • MVP
  • *
  • Posts: 502
    • View Profile
Re: XIM SDK Feedback
« Reply #31 on: 08:42 PM - 08/23/11 »
Whenever I send out an entire XIMControllerInput struct, the physical 360 controller gets disabled. I'm guessing even if I only send out stick values, everything else being zeroed out overrides any actual controller input from the XIM. I believe any buttons that are being zeroed out should be overridden by actual controller input.

Correct, unless you pass NULL for the device, what you send takes over. If you want, instead of going to rest (all zero), pass NULL for that device.

I am. The problem is that only sending stick values through XIMControllerInput also disables all the other buttons, making the XIM seem unresponsive when an app takes over controller input.
XIM Sensitivity Calculator!
http://xim3-app.heroku.com/

Offline OBsIV

  • Administrator
  • MVP
  • *
  • Posts: 36462
  • It's obsessive.
    • View Profile
    • OBsIV's Blog
Re: XIM SDK Feedback
« Reply #32 on: 08:45 PM - 08/23/11 »
Another potential bug:

If the transfer cable is disconnected from the XIM end, the app calling the API freezes. I made sure it wasn't just my app by testing it on XIMCommander.

Also, after doing all that testing, XIMCommander is now outputting a UPS of 500. I have tried restarting XIMCommander and unplugging and plugging in the cable on both ends. None of that fixed it.

Restarting the XIM fixed it, but XIMCommander had to be force-closed from the task list.

XIMCommander is a sample app with source which is lacking on error checks to keep the source simple. But, you should get getting back error info on failed calls when you yank the plug?
Get the most out of your XIM APEX, read the XIM APEX Support FAQ.

Offline kodek64

  • MVP
  • *
  • Posts: 502
    • View Profile
Re: XIM SDK Feedback
« Reply #33 on: 08:47 PM - 08/23/11 »
Another potential bug:

If the transfer cable is disconnected from the XIM end, the app calling the API freezes. I made sure it wasn't just my app by testing it on XIMCommander.

Also, after doing all that testing, XIMCommander is now outputting a UPS of 500. I have tried restarting XIMCommander and unplugging and plugging in the cable on both ends. None of that fixed it.

Restarting the XIM fixed it, but XIMCommander had to be force-closed from the task list.

XIMCommander is a sample app with source which is lacking on error checks to keep the source simple. But, you should get getting back error info on failed calls when you yank the plug?

I am actively checking for all my calls to return OK from the API, and I print out any error messages if the calls fail, but yanking the plug results in the entire app freezing :/
XIM Sensitivity Calculator!
http://xim3-app.heroku.com/

Offline OBsIV

  • Administrator
  • MVP
  • *
  • Posts: 36462
  • It's obsessive.
    • View Profile
    • OBsIV's Blog
Re: XIM SDK Feedback
« Reply #34 on: 08:49 PM - 08/23/11 »
Whenever I send out an entire XIMControllerInput struct, the physical 360 controller gets disabled. I'm guessing even if I only send out stick values, everything else being zeroed out overrides any actual controller input from the XIM. I believe any buttons that are being zeroed out should be overridden by actual controller input.

Correct, unless you pass NULL for the device, what you send takes over. If you want, instead of going to rest (all zero), pass NULL for that device.

I am. The problem is that only sending stick values through XIMControllerInput also disables all the other buttons, making the XIM seem unresponsive when an app takes over controller input.

A limitation of the API. I didn't see it as that important of a scenario though (i.e. driving the sticks with the PC and also holding the controller and pressing the buttons at the same time). Technically, if you wanted that scenario to work, you could use XIMJoystickInput as alternative stick control.

Another potential bug:

If the transfer cable is disconnected from the XIM end, the app calling the API freezes. I made sure it wasn't just my app by testing it on XIMCommander.

Also, after doing all that testing, XIMCommander is now outputting a UPS of 500. I have tried restarting XIMCommander and unplugging and plugging in the cable on both ends. None of that fixed it.

Restarting the XIM fixed it, but XIMCommander had to be force-closed from the task list.

XIMCommander is a sample app with source which is lacking on error checks to keep the source simple. But, you should get getting back error info on failed calls when you yank the plug?

I am actively checking for all my calls to return OK from the API, and I print out any error messages if the calls fail, but yanking the plug results in the entire app freezing :/

Ok, I'll need to look at that one. Will be a little lower pri than other things as the workaround is reasonable: i.e. the user needs to shut down the app when done.
Get the most out of your XIM APEX, read the XIM APEX Support FAQ.

Offline kodek64

  • MVP
  • *
  • Posts: 502
    • View Profile
Re: XIM SDK Feedback
« Reply #35 on: 08:51 PM - 08/23/11 »
Quote from: OBsIV date=1314154176
Technically, if you wanted that scenario to work, you could use XIMJoystickInput as alternative stick control.

Good idea! Will keep that in mind.
XIM Sensitivity Calculator!
http://xim3-app.heroku.com/

Offline tuffrabit

  • MVP
  • *
  • Posts: 7354
    • View Profile
    • tuffrabit's Twitch.tv channel
  • Gamertag: TuFFrabit
Re: XIM SDK Feedback
« Reply #36 on: 01:16 PM - 08/24/11 »
For those who are interested.  Here is an example of a managed c++ wrapper for ximbridge.  Its not complete, but it demonstrates the dealio.  I intend on completing it, will post a separate thread when that happens.


XIM4 Anti Aim-assist curve: http://xim4.com/community/index.php?topic=31309.msg400143#msg400143
All you ever wanted to know about headsets and chat for the 360: http://www.xim3.com/community/index.php?topic=16461.0

Offline mist4fun

  • Global Moderator
  • MVP
  • *
  • Posts: 52459
    • View Profile
Re: XIM SDK Feedback
« Reply #37 on: 01:36 PM - 08/24/11 »
Have you thought about teaming up with kodek to create the ultimate app? It would be better to have one really good app than to split the users that are interested in a pc passthrough.
Have a problem with your XIM APEX? Find a solution in the XIM APEX Support FAQ
XIM APEX Quick Start Guide   |   XIM Instructional Videos

Offline tuffrabit

  • MVP
  • *
  • Posts: 7354
    • View Profile
    • tuffrabit's Twitch.tv channel
  • Gamertag: TuFFrabit
Re: XIM SDK Feedback
« Reply #38 on: 01:46 PM - 08/24/11 »
Have you thought about teaming up with kodek to create the ultimate app? It would be better to have one really good app than to split the users that are interested in a pc passthrough.

Heh... we could team up for sure.

What I'm working on really isn't an app though.  OBsIV's API is in plain old C++, actually looks a lot more like C.  For us programmers who prefer to use a different language, C++ can be unwieldy, some sort of interface layer has to be created.  There are several ways to go about doing this.  I really don't know what method kodek chose, he hasn't specified.  I'm assuming he went with OBsIV's recommendation and chose to use the PInvoke method.  I'm simply walking down a different road.

Won't take long either way though.  If an app turns up that would benefit from multiple programmer's loving attention, I would love to help/contribute.


XIM4 Anti Aim-assist curve: http://xim4.com/community/index.php?topic=31309.msg400143#msg400143
All you ever wanted to know about headsets and chat for the 360: http://www.xim3.com/community/index.php?topic=16461.0

Offline kodek64

  • MVP
  • *
  • Posts: 502
    • View Profile
Re: XIM SDK Feedback
« Reply #39 on: 02:16 PM - 08/24/11 »
Have you thought about teaming up with kodek to create the ultimate app? It would be better to have one really good app than to split the users that are interested in a pc passthrough.

Heh... we could team up for sure.

What I'm working on really isn't an app though.  OBsIV's API is in plain old C++, actually looks a lot more like C.  For us programmers who prefer to use a different language, C++ can be unwieldy, some sort of interface layer has to be created.  There are several ways to go about doing this.  I really don't know what method kodek chose, he hasn't specified.  I'm assuming he went with OBsIV's recommendation and chose to use the PInvoke method.  I'm simply walking down a different road.

Won't take long either way though.  If an app turns up that would benefit from multiple programmer's loving attention, I would love to help/contribute.

Yup. I went with PInvoke after I got some help from OBsiV for marshalling the structures. I am working on a few different apps right now, and part of one of them is using a really nice C# wrapper I'm working on. I will release it along with the source code once the API is made public; I don't want things to break if OBsIV wants to make any big changes.

Regarding about teaming up on an app, I think the first few apps won't be big enough to be worked on as a group, but I am totally in favor of helping and bouncing ideas off each other.
XIM Sensitivity Calculator!
http://xim3-app.heroku.com/

Offline kodek64

  • MVP
  • *
  • Posts: 502
    • View Profile
Re: XIM SDK Feedback
« Reply #40 on: 02:29 PM - 08/24/11 »
Okay, I changed my mind about releasing the wrapper later, and I'm releasing what I have right now. It's pretty much the same thing as the original API, but with a few changes:

 - Connection failures now throw errors instead of returning different status codes.
 - There is a read-only property that will keep track of the XIM's connection status. In the future, I plan to actively check if the connection is lost whenever the property is used, but for now it should be used to prevent trying to connect when there's already a connection made.

You will also need a copy of the XIMBridge library (build 822) in the same directory as any executable you make with it.

Let me know if you have any questions, or if you find any bugs :)
XIM Sensitivity Calculator!
http://xim3-app.heroku.com/

Offline tuffrabit

  • MVP
  • *
  • Posts: 7354
    • View Profile
    • tuffrabit's Twitch.tv channel
  • Gamertag: TuFFrabit
Re: XIM SDK Feedback
« Reply #41 on: 02:57 PM - 08/24/11 »
Okay, I changed my mind about releasing the wrapper later, and I'm releasing what I have right now. It's pretty much the same thing as the original API, but with a few changes:

 - Connection failures now throw errors instead of returning different status codes.
 - There is a read-only property that will keep track of the XIM's connection status. In the future, I plan to actively check if the connection is lost whenever the property is used, but for now it should be used to prevent trying to connect when there's already a connection made.

You will also need a copy of the XIMBridge library (build 822) in the same directory as any executable you make with it.

Let me know if you have any questions, or if you find any bugs :)

You are officially a saint for using enums instead of magic numbers.

What version of .NET are deving against?  In 3.5 and up you have auto getters and setters.  For example:

Pre 3.5:
Code: [Select]

private int bob;
public int Bob
{
    get { return bob; }
    set { bob = value; }
}


3.5 and up:
Code: [Select]

public int Bob { get; set; }


If your getters and setters are simply returning and setting a private variable you don't have to type all that out.


XIM4 Anti Aim-assist curve: http://xim4.com/community/index.php?topic=31309.msg400143#msg400143
All you ever wanted to know about headsets and chat for the 360: http://www.xim3.com/community/index.php?topic=16461.0

Offline kodek64

  • MVP
  • *
  • Posts: 502
    • View Profile
Re: XIM SDK Feedback
« Reply #42 on: 03:25 PM - 08/24/11 »
Okay, I changed my mind about releasing the wrapper later, and I'm releasing what I have right now. It's pretty much the same thing as the original API, but with a few changes:

 - Connection failures now throw errors instead of returning different status codes.
 - There is a read-only property that will keep track of the XIM's connection status. In the future, I plan to actively check if the connection is lost whenever the property is used, but for now it should be used to prevent trying to connect when there's already a connection made.

You will also need a copy of the XIMBridge library (build 822) in the same directory as any executable you make with it.

Let me know if you have any questions, or if you find any bugs :)

You are officially a saint for using enums instead of magic numbers.

What version of .NET are deving against?  In 3.5 and up you have auto getters and setters.  For example:

Pre 3.5:
Code: [Select]

private int bob;
public int Bob
{
    get { return bob; }
    set { bob = value; }
}


3.5 and up:
Code: [Select]

public int Bob { get; set; }


If your getters and setters are simply returning and setting a private variable you don't have to type all that out.

Haha, thanks!

I'm using 4.0. I wanted to make the property read-only, so the default property template didn't work for me. Then since I'm always changing languages around, I had to look up the syntax online, and I found the older version of it. I decided to just use that one :P

But hey, look at it this way: the property is now backwards-compatible!
XIM Sensitivity Calculator!
http://xim3-app.heroku.com/

Offline kodek64

  • MVP
  • *
  • Posts: 502
    • View Profile
Re: XIM SDK Feedback
« Reply #43 on: 11:54 PM - 08/24/11 »
Quick question/bug report:

If the transfer cable is not plugged in, XIMConnect() returns an error. But if the transfer cable is plugged in to the computer, but not the XIM (or in my specific case, my XIM is off), then the app calling the function freezes up. Is this a bug in the SDK, or is there a special way to handle this type of situation?
XIM Sensitivity Calculator!
http://xim3-app.heroku.com/

Offline OBsIV

  • Administrator
  • MVP
  • *
  • Posts: 36462
  • It's obsessive.
    • View Profile
    • OBsIV's Blog
Re: XIM SDK Feedback
« Reply #44 on: 11:57 PM - 08/24/11 »
There is nothing you can do about it right now. You app is talking to the cable, but, the cable can't forward to XIM3, so, the app waits on a response. I'll need to add a timeout or something in there.
Get the most out of your XIM APEX, read the XIM APEX Support FAQ.