FreePIE official thread

Official forum for open source FreePIE discussion and development.
Post Reply
elbowdonkey
One Eyed Hopeful
Posts: 8
Joined: Mon Oct 07, 2013 3:21 pm

Re: FreePIE official thread

Post by elbowdonkey »

Here's the current code for the FreeIMU plugin's Read method:

Code: Select all

protected override void Read(SerialPort serialPort)
{
    var line = serialPort.ReadLine();
    var data = Data;
    newData = true;
    var values = line.Split(',');
    if (values.Length != 3)
        return;

    data.Yaw = ParseFloat(values[0]);
    data.Pitch = ParseFloat(values[1]);
    data.Roll = ParseFloat(values[2]);
    Data = data;
    newData = true;
}
I think that because newData is set to true, the OnUpdate method is called, even though it's fair to say there really is no new data.

I'm not a C# programmer, so the following might be flawed, but hopefully the idea comes across:

Code: Select all

protected override void Read(SerialPort serialPort)
{
    var line = serialPort.ReadLine();
    var data = Data;
    var values = line.Split(',');

    if (values.Length != 3)
        return;

    data.Yaw = ParseFloat(values[0]);
    data.Pitch = ParseFloat(values[1]);
    data.Roll = ParseFloat(values[2]);
    Data = data;
    newData = true;
}
I suspect that would solve it. If line.Split(',') doesn't throw an error when it can't find the delimiter to split on, then I'd assume its length would remain at 0 (or something other than 3). That'd cause the method to return without toggling the newData var, and therefore no onUpdate() would happen. Then the next Read would have a valid line of data which it would split properly, and work as expected.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: FreePIE official thread

Post by CyberVillain »

elbowdonkey wrote:When you say Sparkfun, what exactly does that mean? Are you talking about an Arduino clone or some sensor that Sparkfun sells?
The code is written and verified to work against this IMU

https://www.sparkfun.com/products/10736
elbowdonkey wrote:Here's the current code for the FreeIMU plugin's Read method:

Code: Select all

protected override void Read(SerialPort serialPort)
{
    var line = serialPort.ReadLine();
    var data = Data;
    newData = true;
    var values = line.Split(',');
    if (values.Length != 3)
        return;

    data.Yaw = ParseFloat(values[0]);
    data.Pitch = ParseFloat(values[1]);
    data.Roll = ParseFloat(values[2]);
    Data = data;
    newData = true;
}
I think that because newData is set to true, the OnUpdate method is called, even though it's fair to say there really is no new data.
Good catch thats a bug, it wont create the bug you see though, all it does is that it calles the update function even if its only junk in the serial buffer. Will have it fixed though, thanks.
elbowdonkey wrote: I'm not a C# programmer, so the following might be flawed, but hopefully the idea comes across:

Code: Select all

protected override void Read(SerialPort serialPort)
{
    var line = serialPort.ReadLine();
    var data = Data;
    var values = line.Split(',');

    if (values.Length != 3)
        return;

    data.Yaw = ParseFloat(values[0]);
    data.Pitch = ParseFloat(values[1]);
    data.Roll = ParseFloat(values[2]);
    Data = data;
    newData = true;
}
I suspect that would solve it. If line.Split(',') doesn't throw an error when it can't find the delimiter to split on, then I'd assume its length would remain at 0 (or something other than 3). That'd cause the method to return without toggling the newData var, and therefore no onUpdate() would happen. Then the next Read would have a valid line of data which it would split properly, and work as expected.

The code will only try to parse the floats if there are exactly 3 comma seperates values, if there are no commas it will return zero thus it will return before it will try to parse the values. The error you get is when one of below lines are executed and the float is not a float

Code: Select all

    data.Yaw = ParseFloat(values[0]);
    data.Pitch = ParseFloat(values[1]);
    data.Roll = ParseFloat(values[2]);
I can compile a special debug version for you that will output the malformated line to see whats going on
You do not have the required permissions to view the files attached to this post.
seggybop
One Eyed Hopeful
Posts: 7
Joined: Wed Jan 29, 2014 1:05 am

Re: FreePIE official thread

Post by seggybop »

I'm having some trouble getting FreePIE to work and I'm not sure what to try next. This machine is running Windows 8.1 x64. I had no difficulty getting it working on another computer running Win 8.0 x64.

Installed the latest .msi from the website. The FreePIE GUI opens fine, but when I try to run a script, it immediately crashes ("FreePIE.GUI has stopped working").

Tried reinstalling the .net and Visual Studio runtimes, but no effect. They were already up to date.

Next, I tried installing Visual Studio 2013 and compiling the source to see if it would make any difference, but on trying that I received a multitude of errors that looked like they related to path issues. "Looked like" because I haven't actually used VS for anything in many years and I'm not really sure what's going on there. Rather than spend more time trying to sort that out, I thought I'd ask here if anyone has suggestions for getting FreePIE running. Thanks in advance for any help.
User avatar
baggyg
Vireio Perception Developer
Vireio Perception Developer
Posts: 491
Joined: Sat May 19, 2012 5:20 am
Location: BB, Slovakia

Re: FreePIE official thread

Post by baggyg »

seggybop wrote:I'm having some trouble getting FreePIE to work and I'm not sure what to try next. This machine is running Windows 8.1 x64. I had no difficulty getting it working on another computer running Win 8.0 x64.

Installed the latest .msi from the website. The FreePIE GUI opens fine, but when I try to run a script, it immediately crashes ("FreePIE.GUI has stopped working").

Tried reinstalling the .net and Visual Studio runtimes, but no effect. They were already up to date.

Next, I tried installing Visual Studio 2013 and compiling the source to see if it would make any difference, but on trying that I received a multitude of errors that looked like they related to path issues. "Looked like" because I haven't actually used VS for anything in many years and I'm not really sure what's going on there. Rather than spend more time trying to sort that out, I thought I'd ask here if anyone has suggestions for getting FreePIE running. Thanks in advance for any help.
What is the script you are trying to run?
Can you run a very simple script just outputting something?
seggybop
One Eyed Hopeful
Posts: 7
Joined: Wed Jan 29, 2014 1:05 am

Re: FreePIE official thread

Post by seggybop »

I've been trying to run the basic android -> mouse script example from here.

It looks like the problem is actually related to the mouse emulation somehow. I commented out the mouse commands from the aforementioned script, and it executed without crashing. Then I tried a basic script for trackIR emulation instead, and it works fine. Tested a few more and it seems so far that everything works except mouse.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: FreePIE official thread

Post by CyberVillain »

Hmm, i doubt it but maybe MS have broken something when it comes to win32. Usually they are really good on not breaking backward compatibility. I havent tried 8.1 only 8.0 and that works, will have to install 8.1 in my VM.

If you run a one line script like this, does that crash?

Code: Select all

mouse.deltaX = 1
seggybop
One Eyed Hopeful
Posts: 7
Joined: Wed Jan 29, 2014 1:05 am

Re: FreePIE official thread

Post by seggybop »

Yeah, that's enough to crash it.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: FreePIE official thread

Post by CyberVillain »

Okay, strange, sounds like something has changed in the win32 SDK then. I'll have to look into this. will take some time, need to install 8.1 of win 8 etc.

About your problem with compiling FreePIE, sometimes the version info file gets generated too late then you cant compile the project., Just compile it again and it should work
seggybop
One Eyed Hopeful
Posts: 7
Joined: Wed Jan 29, 2014 1:05 am

Re: FreePIE official thread

Post by seggybop »

Thanks for looking into it. I'll keep trying different things seeing if I can determine a particular cause. I'll try a VM as well, since it's quite possible it's something with my setup rather than Windows 8.1 itself.

btw, I was able to compile it fine in the end, using VS 2012 instead of 2013.
User avatar
baggyg
Vireio Perception Developer
Vireio Perception Developer
Posts: 491
Joined: Sat May 19, 2012 5:20 am
Location: BB, Slovakia

Re: FreePIE official thread

Post by baggyg »

Windows 8.1 laptop tested here with the following:

Code: Select all

mouse.deltaX = 1
No problem at all. Script ran as expected so I don't think there is a problem in Win 8.1

So you have any mouse type software running?
CyberRascal
Two Eyed Hopeful
Posts: 74
Joined: Fri Sep 21, 2012 4:46 am

Re: FreePIE official thread

Post by CyberRascal »

seggybop wrote:Thanks for looking into it. I'll keep trying different things seeing if I can determine a particular cause. I'll try a VM as well, since it's quite possible it's something with my setup rather than Windows 8.1 itself.

btw, I was able to compile it fine in the end, using VS 2012 instead of 2013.
The issue you are experiencing seems like a larger issue with how the native DLL is loaded / used. If you run FreePIE in VS2012, do you get any further errors messages? Probably something like a debug assert in user32.dll? Do you get a line number? Any further info you can give us might hint at the cause / solution. I'm not running Win 8 here either yet but it seems your unique setup might trigger the error where others does not (nothing wrong on your side necessarily, but it's easier to fix when you can reproduce the problem.. :D )
seggybop
One Eyed Hopeful
Posts: 7
Joined: Wed Jan 29, 2014 1:05 am

Re: FreePIE official thread

Post by seggybop »

A first chance exception of type 'SlimDX.DirectInput.DirectInputException' occurred in SlimDX.dll
The thread 'PythonEngine Worker' (0x1880) has exited with code 0 (0x0).
A first chance exception of type 'System.NullReferenceException' occurred in FreePIE.Core.dll
Any use?
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: FreePIE official thread

Post by CyberVillain »

Can you show me the script please?
seggybop
One Eyed Hopeful
Posts: 7
Joined: Wed Jan 29, 2014 1:05 am

Re: FreePIE official thread

Post by seggybop »

Just running "mouse.deltaX = 1"
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: FreePIE official thread

Post by CyberVillain »

That is strange SlimDX is used to read from the mouse not write, and you are writing.

what happens if you do

diagnostics.watch(mouse.deltaX)

?
seggybop
One Eyed Hopeful
Posts: 7
Joined: Wed Jan 29, 2014 1:05 am

Re: FreePIE official thread

Post by seggybop »

Same result!
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: FreePIE official thread

Post by CyberVillain »

Windows version etc?
drowhunter
One Eyed Hopeful
Posts: 22
Joined: Tue Jul 08, 2008 4:48 pm

Re: FreePIE official thread

Post by drowhunter »

I have just started writing scripts for FreePIE and would like to know something

I have written a class that i would like to place in a separate file MyClass.py

i put the file in the same directory as my main script

at the top of my main script i write import MyClass

and the error i get is "No module named MyClass"


where can i place my custom module to get it to load

secondly, is there a command i can use to clear the Error panel, its hard to debug ..
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: FreePIE official thread

Post by CyberVillain »

Hi.

Try putting the file in freepie/pylib

no, not the error panel actually. Maybe I should fix so its cleared between each run :D Will fix

edit: It works if you pu it in pylib and do

Code: Select all

from MyClass import MyClass

if starting:
	x = MyClass()
drowhunter
One Eyed Hopeful
Posts: 22
Joined: Tue Jul 08, 2008 4:48 pm

Re: FreePIE official thread

Post by drowhunter »

sorry posted this in the wrong thread earlier

but while your in there could you add line numbers to the text editor :P
drowhunter
One Eyed Hopeful
Posts: 22
Joined: Tue Jul 08, 2008 4:48 pm

Re: FreePIE official thread

Post by drowhunter »

CyberVillain wrote:Hi.

Try putting the file in freepie/pylib

no, not the error panel actually. Maybe I should fix so its cleared between each run :D Will fix

edit: It works if you pu it in pylib and do

Code: Select all

from MyClass import MyClass

if starting:
	x = MyClass()
your suggestion worked .. however

i get an error when i try to write any code in the imported file referencing global name wiimote

specifically the error im getting is

"global name 'wiimote' is not defined"

what do i have to import in my external module in order to use the built in globals
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: FreePIE official thread

Post by CyberVillain »

Hmm, I will have to investigate this. Actually this is the first time anyone wants todo this.

edit: about linenumbers, the editor we use support this, but we dont have a way of turning it on from the GUI. If you have VS you can change the setting and compile FreePIE. In the file ScriptEditorView.xaml add the ShowLineNumbers XML attribute to the AvalonEdit:BindableScriptEditor element like

Code: Select all

<AvalonEdit:BindableScriptEditor            
				x:Name="textEditor"            
				FontFamily="Consolas"
				FontSize="10pt"
				SyntaxHighlighting="Python"   
                Script="{ Binding Path=Script, Mode=TwoWay}"    
                Replacer="{ Binding Path=Replacer, Mode=TwoWay}"    
                IsEnabled="{ Binding Enabled}"
                Caret="{ Binding Path=CaretPosition, Mode=TwoWay }"
                ShowLineNumbers="True">
I need to design a Settings API for FreePIE
drowhunter
One Eyed Hopeful
Posts: 22
Joined: Tue Jul 08, 2008 4:48 pm

Re: FreePIE official thread

Post by drowhunter »

Nice, it worked.

You should leave that setting enabled by default.

its kind of pointless when you get an or line 203 of a script and have no way of finding that line except to manually try and count
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: FreePIE official thread

Post by CyberVillain »

Nah, there are people like myself that dont like linenumbers, but I should fix so you can enable it as an option.
I just need to design a engine for settings.
drowhunter
One Eyed Hopeful
Posts: 22
Joined: Tue Jul 08, 2008 4:48 pm

Re: FreePIE official thread

Post by drowhunter »

Yeah the option would be nice to have... when you do get around to it, an option to Find and Replace would be nice as well (i sound like i'm nagging :lol: ...it's just that i see so much potential)


I noticed in the latest revision that you were able to clear the error panel on start ..which is great

i was able to do a similar update to the console panel by implementing IHandle<ScriptStateChangedEvent>

and adding this

Code: Select all

      public void Handle(ScriptStateChangedEvent message)
      {
            if (message.Running && CanClear)
            {
                Clear();
            }
       }
i write debug messages to the console when my script starts, and it helps to start with a clear console 8-)

how can i submit a patch?
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: FreePIE official thread

Post by CyberVillain »

FreePIE as an IDE will never be as good as Visual Studio ;) But yeah we can add small stuff down the road but Plugins and support for hardware will always be higer priotized.

You are never interested so see errors from the last run (Since if the error is still there you will get it again). But the console window is up to the user what he wants to go there, so we cant clear that each run). But you can use the context menu (right click) to clear it.
drowhunter
One Eyed Hopeful
Posts: 22
Joined: Tue Jul 08, 2008 4:48 pm

Re: FreePIE official thread

Post by drowhunter »

So i was fooling around with the code and noticed that every time you run a script (even if it hasn't changed) your method PreProcessScript()
takes 3.7 seconds to run on my machine (and my machine is fast :? ).


What I have managed to do is .... before calling PreProcessScript() in the PythonScriptEngine.Start() Method

Code: Select all

   1) I create i md5 hash of the unmodified script variable
   2) and then check to see if there is a temp file in "[temp folder]/freepie/[scriptfile_withoutextension]_[hash].py"
        a. on first run there isn't a temp file there,so it runs script = PreProcessScript() 
             
        b.  I  erase previous versions of the temp file with the same [scriptfile] prefix, so that the temp folder doesn't explode  :)  

        c.  Saves the modified script to a file named "[scriptfile_withoutextension]_[hash].py"

   3) on subsequent runs the tempfile is there so it ReadsAllText from it into the script variable. 
       - loading this cached version, happens nearly instantly as it doesn't have to run PreProcessScript() if the file hasn't been modified
         subsequent runs of an unmodified script drops from 3.7 seconds to .00000587 seconds 
the code looks like this which is added to PythonScriptEngine.Start()

Code: Select all

string tempfolder = Path.Combine(Path.GetTempPath(),"freepie");
                try
                {
                    if (!Directory.Exists(tempfolder))
                        Directory.CreateDirectory(tempfolder);

                    string tempfile = Path.Combine(tempfolder, String.Format("{0}_{1}.py", Path.GetFileNameWithoutExtension(_scriptfile), GetHashString(script)));

                    Common.FileSystem fs = new FileSystem();
                    if (!File.Exists(tempfile))
                    {
                        script = PreProcessScript(script, usedGlobalEnums, globals);
                        
                        //Delete old cached versions before writing the new one
                        string[] files = Directory.GetFiles(tempfolder,Path.GetFileNameWithoutExtension(_scriptfile)+"_*.py");
                        files.ToList().ForEach(f => File.Delete(f));

                        fs.WriteAllText(tempfile, script);
                    }
                    else
                        script = fs.ReadAllText(tempfile);
                    
                }
                catch
                {
                    tempfolder = "";
                }
                finally
                {
                    if(String.IsNullOrEmpty(tempfolder))
                        script = PreProcessScript(script, usedGlobalEnums, globals);
                }
md5 hashing uses this method i created

Code: Select all

string GetHashString(string str)
        {
            String md5Result;
            StringBuilder sb = new StringBuilder();
            MD5 md5Hasher = MD5.Create();
            byte[] ba = Encoding.UTF8.GetBytes(str);
            using (MemoryStream ms = new MemoryStream(ba))
            {
                foreach (Byte b in md5Hasher.ComputeHash(ms))
                    sb.Append(b.ToString("x2").ToLower());
            }
            md5Result = sb.ToString();
            return md5Result;
        }
Now i realize that you have a class called UacCompliantPaths under freepie core project, where you store the system paths used by FreePie.
I could have added it here, but as this was a quick fix, i didn't do it.
I couldn't find anywhere that you store general purpose static utility functions, so I wasn't sure where the best place to put the GetHashString() Method.

In order to get the file name of the original script i had to add one more method to the IScriptEngine Interface called void StartWithFile(string script);

in the implementation i store the filename into a private variable _scriptFile, read the text from the file , and call Start(script) with it

anyway what do you think?
is a good idea is it worth adding to the project?

would you like me to submit my modified Start Method for you to code review?

P.S. by the way it seems that VersionInfo.cs is missing from the github repo
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: FreePIE official thread

Post by CyberVillain »

Hi, I think what you are seeing is debug hook overhead, try press ctrl+f5 when you run FreePIE from VS (No debugger will be attached) Still taking 3.7 seconds? You gain even more speed when built in release mode.

We try not to use static classes other than extension classes since it's hard to abstract. We use dependecy injection for all our domain logic this way its easy to replace it with other concrete types, like with the UacCompliantPaths, it implements IPaths and the domain code only have dependency to this interface, we can change from UacCompliantPaths to any other concrete class without changing a line of code from domain. Also this increases testability

Please let me know if you still have a performance problem after trying my above tips, if you do I need to get to the bottom of it. Caching shouldn't be needed, if we really get to that then we can check your code out, sounds good?

About VersionInfo.cs its a dynamic file that is created by the build process, it contains the version and build number of FreePIE, there for we dont want it checked in to git. It should be created each time you build FreePIE, but sometimes it fails (Havent investigated why). If it fails just build again and it should work.

Also you can build FreePIE into release mode (and installer) if you run build_installer.bat from the BuildTools folder, also this is a dead certain way of creating the VersionInfo.cs file. The scripts require WIX if you want the installer to build, download here http://wixtoolset.org/. If you just want to build FreePIE into release mode and do not care about the intaller just run the bat and ignore the errors.. FreePIE will be built into a folder called Output
drowhunter
One Eyed Hopeful
Posts: 22
Joined: Tue Jul 08, 2008 4:48 pm

Re: FreePIE official thread

Post by drowhunter »

I'll try to build in release mode and measure the performance.

Also i was making a script last night and i wanted to bind a button on my controller to scroll the mouse wheel up and down
and noticed that there was no mouse wheel support. :shock: (am i wrong was i not looking in the right place)

I was able to add it in simply enough. 8-) made a method called setMouseWheel (int) and added it to the globals
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: FreePIE official thread

Post by CyberVillain »

drowhunter
One Eyed Hopeful
Posts: 22
Joined: Tue Jul 08, 2008 4:48 pm

Re: FreePIE official thread

Post by drowhunter »

Nice wheel support, you pretty much did the same thing i did, i can erase mine now :)

when might we see this merged into the master?


I just tried building in release mode, and when running a script PreProcessScripts still takes almost 4 seconds
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: FreePIE official thread

Post by CyberVillain »

That is really strange, for me it takes no time at all, how ever it does take some time to load the python egine (That we cant build away). Its only the first time). What script are you running?
drowhunter
One Eyed Hopeful
Posts: 22
Joined: Tue Jul 08, 2008 4:48 pm

Re: FreePIE official thread

Post by drowhunter »

Here is my script.

https://code.google.com/p/freepie-wiimo ... ionplus.py (should work, first time using google code)

I created a couple of python classes to handle the wiimote and buttons easily

I plan to use it to play freelancer right now, but its flexible enough to do some very neat tricks for almost any configuration i can think of


this was why i was asking last week for import support so i could move my classes into a separate module and not have to duplicate it with every script

(I have an idea for that by the way)...:)

anyway the script works, but i think it takes a while while loading the used assemblies when pre-processing the script
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: FreePIE official thread

Post by CyberVillain »

Thanks, will have a look at it.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: FreePIE official thread

Post by CyberVillain »

Hmm by the way, code like this
diagnostics.watch(self.pressDuration)
will not work that well currently.

The Script parser parses out the argument, in this case "self.pressDuration", and uses that as name for the watch.

If you have two class instances they will show as one in the watch window and constantly overwriting eachother
drowhunter
One Eyed Hopeful
Posts: 22
Joined: Tue Jul 08, 2008 4:48 pm

Re: FreePIE official thread

Post by drowhunter »

how hard would it be to add an option to get motion plus coordinates relative to world space?


in other words Up would always be up, regardless of how you tilt the wiimote
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: FreePIE official thread

Post by CyberVillain »

Gyroscope it relative, so when youre starting and the mote is flat and point the mote upwards up will be up. But after a while this will drift and will no longer be correct. This can be improved using sensor fusion, in the motes case fuse accelerometer and gyro data. We tried doing this with the mahony fusion but never got it to work correctly so currently you only get gyro data.

You can check the fusion code out here

https://github.com/AndersMalmgren/FreeP ... ser.cs#L35

Currently it uses SimpleIntegrationMotionPlusFuser you can replace it with MahonyMotionPlusFuser and it will go all crazy :D If you find anything wrong with it please let me know! :D
drowhunter
One Eyed Hopeful
Posts: 22
Joined: Tue Jul 08, 2008 4:48 pm

Re: FreePIE official thread

Post by drowhunter »

That mahony fuser definetely reduces the drift in the gyro

but when i move the mouse with it, everything is reversed
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: FreePIE official thread

Post by CyberVillain »

So everything is working fine for you with mahony?
A minus in front of yaw and pitch should solve that?
drowhunter
One Eyed Hopeful
Posts: 22
Joined: Tue Jul 08, 2008 4:48 pm

Re: FreePIE official thread

Post by drowhunter »

yeah it works fine, putting the minus in front worked too

as for the acceleration values,

when the wiimote is flat you get readings like 0.04, 0.04, 11

but it can vary from wiimote to wiimote

perhaps the object should expose the normalized values for consistency

then the values go from 0 - 1

or even better provide 3 additional normalized properties, so the raw values can still be accessed
Post Reply

Return to “FreePIE”