Joystick and Windows sleep...

I'm using the Joystick Library version 2, after a load of tweaking to get it just right it's now running my button box just fine.

But, it keeps Windows awake. I tell Windows to sleep, it does, but immediately wakes up. If I unplug the micro Windows sleeps just fine.

Now, you could say unplugging the cable before sleeping isn't the greatest 1st world problem, but it bothers me, what is the joystick library, or my code doing that other hids isn't.

All the serial debugging has been turned off, the Serial line isn't even opened. There are no calls to the Joystick unless something is pressed or released. Nothing is cleared, reset, defaulted, nothing at all. So while the code is running and the box isn't being used there isn't (or shouldn't be) a single bit of data going anywhere.

Still Windows doesn't sleep.

Have I missed something about how the Joystick thing works? Or is there something I've misunderstood?
Any ideas?
Thanks.

I know nothing about the library. But, I suggest it does send something occasionally, to be sure the PC is able to respond when you REALLY want to use the library. Is there any call to the library to disable the library code?

Paul

No, I create the object and it runs in the main loop, there are no exists, just power off. Unless I write a pc driver for the unit, (which I REALLY don't want to do) I can't see how I can get around the workings of the joystick library.

Or, does Windows send an instruction to all connected HIDs to shutdown on power off or sleep? I have to admit I know nothing of the Windows side of things here. But, other joysticks, controllers etc. don't power off when Windows sleeps.

So, urgh!

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.