Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - takai

Pages: 1 2
1
Wiimote Interactive Whiteboard / Re: Wii Motion Plus
« on: July 21, 2008, 08:01:21 PM »
The Motion Plus isnt added accelerometers, its a single axis high resolution gyroscope.

It will only be used for motion, and as such wont affect the whiteboard an iota.

2
Wiimote Interactive Whiteboard / Quick and Easy Right-click solution
« on: July 20, 2008, 08:47:29 PM »
Right, i havnt been around for a little bit as real life has been chewing up my time, but today i had need to use Windows on my Macbook which only has one mouse button. Normally i get aroudn this by plugging in a mouse, but i had left mine at home today.

After a bit of scrounging i found this program: http://livecn.huasing.org/imouse/

Basically allows for a rightclick action after 0.3s of holdingn the mouse in the same spot. I havnt tested it with the Wiimote but it could be very useful.

3
One of our testing setups involves some industrial velcro on the projector or ceiling, and then again on the bottom of the wiimote. Works a treat.

The other of our testing setups uses a 3/8" bolt through the ceiling squares and then a mic holder (clip style) screwed onto it and then the wiimote clipped into it.

Cant take photos of either of the setups as they are in secure rooms, but my home setup is similar and ill shoot a pic of that.

4
Yup, use the fix i detailed in the thread. Im interested to find out whether it works in XP 64bit as well.

P.s. understandable that you missed it, ive changed the title now so it explicitly says 64bit and XP as well as Vista.

5
IR Pens / Re: bigger range with IR Pen.
« on: June 10, 2008, 08:44:42 AM »
The IR "laser" in an optical mouse isnt really a "laser" its more of an IR led.

You could use an IR laser out of a CD drive or similar, but they are much more dangerous than simple red lasers as your pupil wont contract when its hit by it, so youll experience the full brunt of the IR laser on your cornea (same reason why doing eye tracking by reflected IR light from the coroid is so visually exhausting).

The only really safe way to do it is to use a significantly high powered IR LED (20,000mcd equivalent) and then use a couple of tiny tiny tiny Fresnel lenses to refocus the light from a wide spray to a small beam. And even then it might not work particularly well.

6
Wiimote Interactive Whiteboard / Re: Code explanation?
« on: June 10, 2008, 08:38:54 AM »
In the C# the clicks are interpreted using the input buffer in terms of the INPUT struct.

7
I use vista x32 bit, where I can introduce this code?? and Which code I have to introduce?


Thanks.

Did you actually read anything in this thread. Not only do i say in the original post multiple times that its 64bit specific, but i also say where to insert the code....

8
Uh, did you even try any of the versions. Or read the three threads immediately below this one which ALL deal with Vista?

9
Sure, it was probably ChronoGPS. I use it for datalogging in my race car, which is how i originally found out about Johnny Lee's stuff.

10
Either Vista or XP should work, need the 32bit architecture...

11
Doubly solved

Code: [Select]
//[StructLayout(LayoutKind.Explicit, Size = 28)] *make sure you remove this*
        public struct INPUT
        {
            public int type;
            public MOUSEINPUT mi;
        }

Basically im just the LayoutKind and removing all the offsets. Because we only need the mouse control part of this structure C# will automatically calculate the offset on compilation and push the MOUSEINPUT out by 8bits under 64bit.

I just need someone to confirm this under 32bit.

12
The problem is that under 32 bit systems you need a 4bit offset, but 64bit means you need an 8 bit offset. What we need is an easy way to switch between the offsets on the fly. Preferably on init.

13
Ive been noticing a fair few people having issues with WW0.2 and all the mods based on these. Its always under vista, and involves the mouse control not working but calibration does.

Now the bit which threw me for a while, is that its actually not with Vista, but with Vista64bit. Which im guessing some people dont even know that they are running due to it being preinstalled on their computer.

Anyway, the problem lies in the fact that the pointers in x64 windows are 8bit pointers, rather than 4bit in x32. The INPUT struct is therefore offset by the wrong amount, so the mouse events fall into the "type" bit, and is ignored.

The quick fix for it is to simply replace this code:
Code: [Select]
[StructLayout(LayoutKind.Explicit, Size = 28)]
        public struct INPUT
        {
            [FieldOffset(0)]
            public int type;
            [FieldOffset(4)] //*
            public MOUSEINPUT mi;
            [FieldOffset(4)] //*
            public KEYBDINPUT ki;
            [FieldOffset(4)] //*
            public HARDWAREINPUT hi;
        }
with this
Code: [Select]
[StructLayout(LayoutKind.Explicit, Size = 28)]
        public struct INPUT
        {
            [FieldOffset(0)]
            public int type;
            [FieldOffset(8)] //*
            public MOUSEINPUT mi;
            [FieldOffset(8)] //*
            public KEYBDINPUT ki;
            [FieldOffset(8)] //*
            public HARDWAREINPUT hi;
        }

The longer term solution is a bit more complex, but because of the oddness of C# you cant just declare sizeof(IntPtr), and im trying to figure out a better solution than declaring two structs and using which ever one is appropriate for the platform.
Ill try and figure out a way to modify the struct sizing on load.

14
Wiimote Smoothboard / Re: Smoothing for Wiimote Whiteboard 0.2
« on: June 06, 2008, 05:59:34 AM »
The problem is within the mouse down code for 0.2, and all of the new editions display it.

The reason not everyone is having the issue with 0.2 is that its x64 specific. Basically the offset in the INPUT struct is offset by the size of the pointer, which in x64 is 8bits rather than 4bit.

Ill start a new thread regarding it.

15
Wiimote Smoothboard / Re: Smoothing for Wiimote Whiteboard 0.2
« on: June 06, 2008, 04:43:59 AM »
Hm, just realised its a problem with 0.2, i thought i was using 0.2 but i was using 0.1

Pages: 1 2