Hello Guest it is May 29, 2024, 04:13:07 AM

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 - rcrabb

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 »
21
I've been working with the plugin wizard. My project is created in VS 2008.NET. I just added your hooks DLL to my project with no problem. Im not sure how to do it with 2003.

22
Mach SDK plugin questions and answers. / Re: Wiimote plugin
« on: December 31, 2009, 12:09:42 AM »
Thanks Art for your responses. I have all the accelerometer data and all buttons working. I also have the smoothing algorithm working. Of course all this is a part of the wiiuse dll and only needs to be called, for me it was a huge mountian to climb. A fun project.

23
Mach SDK plugin questions and answers. / Re: Wiimote plugin
« on: December 30, 2009, 04:04:15 PM »
Found my problem. I was sending an init call to the dll causing my variables to get wiped out. Now I have a new prob.

My array for the wiimote data is setup with this line.
wiimote** wiimotes;
wiimotes =  wiiuse_init(2);  <--------size of the array

But the data is gone after each pass through the code.

If i change it to this line.
static wiimote** wiimotes;
wiimotes =  wiiuse_init(2);  <--------size of the array

The data stays but the array is only one element. Now this is ok because I only plan to connect one wiimote but I would like to know the proper way to setup the arrays to work properly.

24
Mach SDK plugin questions and answers. / Re: Wiimote plugin
« on: December 30, 2009, 11:17:11 AM »
I set a breakpoint at the poll line. There is no data in the wiimotes[0]. Now my code sets the first led on the wiimote after it connects so the wiiuse dll must be working. But I cant poll any data.

25
Mach SDK plugin questions and answers. / Re: Wiimote plugin
« on: December 29, 2009, 11:16:22 PM »
This line crashed me.  wiimotes =  wiiuse_init(wiimoteconfig->maxwiimotes);

wiimoteconfig->maxwiimotes was the null. I added it and forgot that wiimoteconfig doesnt get gcnew till after postinit.

Now i need to figure out why I dont see any data after the poll. I cant get my code to run in debug so this will be a chalenge.

26
Mach SDK plugin questions and answers. / Re: Wiimote plugin
« on: December 29, 2009, 10:03:52 PM »
Thanks Art.
 
Ill try that. What kills me is that I get that 9988 error and mach blows up. I have to reboot my computer everytime. And if I dont reboot after some time I get the blue screen. I will say im just learning c++ .NET and I have a long way to go. I was very exited when I got the wiimote connected and toggled one of the wiimote's leds. Now I hit a wall and need help. 

27
Mach SDK plugin questions and answers. / Wiimote plugin
« on: December 29, 2009, 05:09:51 PM »
I'm working on a wiimote plugin for mach. Im using Ed's plugin wizard and the wiiuse lib. First I must say Ed did a fantastic job with this wizard and the videos gave my a huge leap forward with my learning curve. I have connected the wiimote to mach and displayed limited data in a dialog. Now Im stuck. The code below works great.

   WiiMoteStatus^   wiimotestatus = MG::wiimotestatus;
   WiiMoteConfig^   wiimoteconfig = MG::wiimoteconfig;
   wiimote** wiimotes;
   
   wiimotes =  wiiuse_init(wiimoteconfig->maxwiimotes);   // Send the max wiimotes to init (max of 1)
   

//--------------------------------------------------------------------
//   find and connect to the wiimotes
//--------------------------------------------------------------------

if (MG::wiimotestatus) // crashes without this line. learned the hard way
{
   if (!wiimotestatus->found)   // if we found one wiimote stop looking
   {
      wiimotestatus->found = wiiuse_find(wiimotes, wiimoteconfig->maxwiimotes, 10);   // We look for wiimotes (max of one, look for 10sec)

   }
   if (!wiimotestatus->connected)   //   if we are connected dont try to connect
   {
      wiimotestatus->connected = wiiuse_connect(wiimotes, wiimoteconfig->maxwiimotes);



Now my problem is in the next part-------------------------------------------------------------------------------------------------->>>>>>>>>>>>>>>>>>>>>>>>>>>


      wiiuse_poll(wiimotes, 1);

      wiiuse_motion_sensing(wiimotes[0], 1);

      wiimotestatus->roll = wiimotes[0]->orient.roll;

      
      if (IS_PRESSED(wiimotes[0], WIIMOTE_BUTTON_A))
      {
         wiimotestatus->debug = (true);
 



Everything compiles ok but mach crashes. Now wiiuse_poll is the function to poll the data from the wiiuse dll. it seems im having trouble getting to arrays of data returned.

I hope someone has an idea.

28
General Mach Discussion / Re: long program glitch
« on: December 06, 2009, 08:37:32 PM »
Grab your XML. I also PM you my email if you need more help.

29
General Mach Discussion / Re: long program glitch
« on: December 06, 2009, 08:23:48 PM »
Is your machine set to stop at tool change? This is a setting in general config.

30
General Mach Discussion / Re: long program glitch
« on: December 06, 2009, 08:11:12 PM »
The file is running perfect for me

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 »