seb2007 / linux-track

Automatically exported from code.google.com/p/linux-track
MIT License
0 stars 0 forks source link

X-Plane-i686: cal.c:56: cal_init: Assertion `(iface != ((void *)0)) && (iface->device_init != ((void *)0))' failed. #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi guys,

I tested the linux-track software and got the following error in the
log.txt from XPlane:

[Thu 2009-09-03 21:54:21 CEST] Preferences read OK!
[Thu 2009-09-03 21:54:21 CEST] Custom section 'XPlane' found!
[Thu 2009-09-03 21:54:21 CEST] Device Type: Wiimote
[Thu 2009-09-03 21:54:21 CEST] Setting up Cap...
X-Plane-i686: cal.c:56: cal_init: Assertion `(iface != ((void *)0)) &&
(iface->device_init != ((void *)0))' failed.

Can anyone tell me what goes wrong. I think that if this error is fixed
everything will just work fine. 

This is what's in my .linuxtrack file:
#Global section should contain global settings (eg. Capture device type)
[Global]
Capture-device = Wiimote
Capture-device-id = Wiimote
Model-type = Cap
Cap-X = 70
Cap-Y = 50
Cap-Z = 92.5
Head-Y = 100
Head-Z = 90
[Default]
Filter-factor = 5
Pitch-multiplier = 3.0
Yaw-multiplier = 3.0
Roll-multiplier = 3.0
Xtranslation-multiplier = 3.0
Ytranslation-multiplier = 3.0
Ztranslation-multiplier = 3.0
[XPlane]
Freeze-button = 3
Recenter-button = 4

Thanks in advance!

Original issue reported on code.google.com by carlos.d...@kpnplanet.nl on 3 Sep 2009 at 8:05

GoogleCodeExporter commented 8 years ago
Hi,
looking at the message, I think the problem is, that you don't have cwiid 
installed,
so wiimote handling part is not compiled in...
You can confirm my theory by examining ./configure output.
What I see is this:
...
checking for pthread_create in -lpthread... yes
checking for usb_open in -lusb... yes
checking for cwiid_open in -lcwiid... yes
checking how to run the C preprocessor... gcc -E
...

Notice the line with cwiid - if you have 'no' on that line, install cwiid and 
you
should be good to go... 
If you have yes there, then problem is somewhere else. In that case info on what
distro you use, your ./configure output and any warnings that pop up during
compilation would be usefull.
Thanks for trying it out and I hope you make it work soon,
Michal

Original comment by f.jo...@email.cz on 3 Sep 2009 at 9:20

GoogleCodeExporter commented 8 years ago
Hi Michal,

Thanks for your quick reply and explanation. I will test this tonight to see if 
it 
works and I'll let you know.

Greets Carlos 

Original comment by carlos.d...@kpnplanet.nl on 4 Sep 2009 at 11:55

GoogleCodeExporter commented 8 years ago
Hi there,

I installed cwiid and the error was gone after compiling the linux-track 
software for
the second time. But there is more...

When I start XPlane9, the first thing I see is that the xlinuxtrack.xpl plugin 
is
loading. After Xplane9 has fully started up, pushing on the F8 button doesn't 
seems
to work. If I look in the plugin-menu, the submenu's 'Enable/Disable' and 
'Plugin
Information' are emtpy. Only the submenu 'Hotkey Admin' containts some 
information in
de 'Function' and 'Keystroke' fields (Plugin-field is empty): 

Plugin       Function                 Keystroke
             3D LinuxTrack v          F8
             Freeze 3D Linux          F9

What could be the problem? 

Original comment by carlos.d...@kpnplanet.nl on 4 Sep 2009 at 9:46

GoogleCodeExporter commented 8 years ago
Try pressing 1+2 buttons (make wiimote discoverable) just before you start 
X-Plane...
At startup it searches for a wiimote and if it doesn't find one, plugin unloads 
itself.
I just checked in a new revision, it should work better than before; just be 
aware
that .linuxtrack changed considerably and you'll have to modify it accordingly.
And by the way - when you find a problem, sometimes log.txt file (all lowercase)
contains interesting info - you can find it in your X-Plane folder.
Kind regards,
Michal

Original comment by f.jo...@email.cz on 4 Sep 2009 at 10:22

GoogleCodeExporter commented 8 years ago
Hi Michal,

It works by pressing the 1+2 buttons when starting XPlane and having the 
linux-track
software recompiled with the new version R141. The only thing is the FPS that's 
a bit
low at the moment. I don't know if I can tune this in the setup menu of 
linux-track.
Maybe the problem is my graphics card (Nvidia 8800 GT) or a setting in XPlane. 
Maybe
you have an idea how to fix this. Thank you very much for you help so far! 

Kind regards,
Carlos

Original comment by carlos.d...@kpnplanet.nl on 5 Sep 2009 at 5:11

GoogleCodeExporter commented 8 years ago
Hi Carlos,
I had an issue with framerate, but it should be gone in rev141... Could you 
confirm
that the plugin you have in X-Plane is the newly compiled one? (been there, 
done that ;-)
To find out if framerate is down thanks to linuxtrack is easy - remove it from
Resources/plugins directory, start X-Plane and switch to 3D cockpit... If you 
get
normal FPS, than linuxtrack is causing that, if FPS is low, try lowering 
rendering
options...
By the way, do you have single or multicore machine?
Kind regards,
Michal

Original comment by f.jo...@email.cz on 5 Sep 2009 at 8:58

GoogleCodeExporter commented 8 years ago
Hi Michal,

To install the new r141 revision I copied/pasted the new code into the right 
*.c and
*.h files of the linuxtrack sources. Then I did a ./configure; make; sudo make
install. After that I copied the newly created file xlinuxtrack.xpl into the 
plugin
directory of XPlane and the .linuxtrack file in my home directory. Could you 
confirm
that's the right way to do it? Then I tested with an without the plugin an 
lowering
the rendering options, but the results were the same. I have a quadcore machine.

After trying a bit I found out the following:
In think the r141 revision nor the linuxtrack software is causing the problem. 
I use
a WIImote for the headtracking and a homemade cap with IR-leds (3 leds). I 
found out
that when I'm further from the WIImote (70 cm), which is normal, the head 
movements
are recognized very badly (even with fresh batteries). The problem is gone when 
I'm
sitting closer to the WIImote (20/ 30 cm). But then it's a bit difficult to 
play, so
close to the monitor ;-) So it looks like the IR-leds are the problem now. In
Windows, with free-track there is an option (threshold) to adjust the WIImote 
to your
IR-leds. Maybe this can be achieved with wmgui also? If not I think I have to 
use
better leds.

Kind regards,
Carlos

Original comment by carlos.d...@kpnplanet.nl on 6 Sep 2009 at 3:45

GoogleCodeExporter commented 8 years ago
Hi Carlos,
the problem may be the LEDs...
Maybee their light is too faint, or you have too narrow radiation angle.
Unfortunately there is nothing I can do about it, image processing is done 
completely
by wiimote - all I get are coordinates of detected points...
Two things you can do - to get broader angle, try sanding off material off the 
tip of
diodes - instead of round make it flat... Works like a charm ;-)
The brightness can be made higher - either make the supply voltage a bit 
higher, or
lower the resistor in the series...
If I understand correctly what you are saying, the simulator framerate is good, 
but
the head movement is laggy/jumpy?
Thank you for your patience,
Michal

Original comment by f.jo...@email.cz on 7 Sep 2009 at 6:52

GoogleCodeExporter commented 8 years ago

Original comment by f.jo...@email.cz on 26 Apr 2010 at 8:47