Driver gMobilabPlus under Windows

Making & changing hardware drivers in Acquisition Server
keldon7
Posts: 12
Joined: Fri Nov 25, 2011 11:31 am

Re: Driver gMobilabPlus under Windows

Post by keldon7 »

Here the Driver!!!!
It's not the Final, i'd like to insert the set of number channel in the parameter shell. Now, like before, if you want change the number of sensor used you must recompile-it.

Also , I think, i've found a mistake on the conversion value in the Linux's driver.
According to the guide in pdf the factor of conversion is not
data = (value 16bit) * (0.5 / 32768)
but
data = (value 16bit) * (2 * 5 * 500)/(65536 * 4)

Sorry, I'm Late...i know....T_T
Andrea
Attachments
gtec-gmobilabplus.zip
Here my Driver
(5.02 KiB) Downloaded 531 times

lbonnet
Site Admin
Posts: 417
Joined: Wed Oct 07, 2009 12:11 pm

Re: Driver gMobilabPlus under Windows

Post by lbonnet »

Hi andrea!

Sorry for the long wait...
The team have been very busy lately with projects deadlines and we simply could not manage the official support; we are now getting back in business...
We have a lot of contributions to handle for the next release (hopefully by the end of may).

First, many thanks for your contribution !
Indeed the idea is to merge the two drivers, so it is compatible with both Windows and Linux OS.

I'll first check the source code to see if it follows our contribution rules.
Then I'll merge it with the driver currently in the SVN, in a new branch.

As I don't have the amplifier, the only test I can do on my side is compilation on windows and Linux.
Could you test the acquisition when the branch is ready ?

Best regards,

Laurent-
Follow us on twitter >> openvibebci

Checkout my (old) blog for some OpenViBE tips & tricks : here !

lbonnet
Site Admin
Posts: 417
Joined: Wed Oct 07, 2009 12:11 pm

Re: Driver gMobilabPlus under Windows

Post by lbonnet »

Hi Andrea !

I took some time to review the source code of your driver.

From what I understand your driver is a complete new version for windows.
The "Linux part" as been removed, which is not really suitable.

The OS-dependent code is usually guarded by :

Code: Select all

#ifdef OV_OS_Windows
    ...
    //Windows code
    ...
#endif

#ifdef OV_OS_Linux
    ...
    //Linux code
    ...
#endif
There are also some pieces of code that do not comply with the contribution rules.
For example, there is a member unsigned long a; defined and never used in the driver class.

Some of these errors were already in the first version of the driver on which you based your work, I'm afraid (multiple members for the same header object for example).
They are not critical but it's just not clean :)
The only critical part is the merge between the two version (linux/windows).

I would help you with that but the thing is... I stupidly said that I could test the compilation of the driver, but as I don't have the g.Tec libs I can't even do that.
Would you have some spare time to do that for us ?

I can basically tell you how and what to do, or giving you untested modification of the code, but I really need someone to test and debug.
I'm quiet sure it's not much more work to do, but I can't integrate the driver in its current state.

Best regards
Laurent-
Follow us on twitter >> openvibebci

Checkout my (old) blog for some OpenViBE tips & tricks : here !

jlegeny
Posts: 239
Joined: Tue Nov 02, 2010 8:51 am
Location: Mensia Technologies Paris FR
Contact:

Re: Driver gMobilabPlus under Windows

Post by jlegeny »

Hello Andrea,

a new release of OpenViBE is approaching (it will be probably released around december) and we would like to integrate your contribution into the software if possible.

As we do not have the device of our own (and the g.Tec API), we would like to know if you have finalized the driver (along with merging it with the Linux version and testing of compilation).

Many thanks
Jozef

benry
Posts: 12
Joined: Thu Sep 22, 2011 3:59 pm
Location: Milan, Italy
Contact:

Re: Driver gMobilabPlus under Windows

Post by benry »

Hi all,
Andrea was a student working with me; he graduated some months ago... I don't think he to be still working on this driver, also beacuse we have the g.tec device here at the lab and I have not seen him recently.

In case, I can go on with this work trying to merge the two drivers and do some compilation/run test for you.


Bye,

Enrico

benry
Posts: 12
Joined: Thu Sep 22, 2011 3:59 pm
Location: Milan, Italy
Contact:

Re: Driver gMobilabPlus under Windows

Post by benry »

Ok,
I did not forget about this driver... I am working on it and at the time I have a full working driver designed for both Linux and Windows, but tested only on windows... as soon as possible I will test it also on Linux and I will post here the source code.

p.s.
I changed the driver a lot... both the initial versions (linux and windows) were not suitable for the multi-purpose version of the g.tec mobilab+, since in that device the sensitivity of the channels is not the same for all of them, thus the digits conversion to microvolts has to be adapted according to the channel sensitivity "dynamically".
I also added in the graphical interface a checkbox to enable and disable the mobilab+ test mode.

i tried to be compliant to the "coding standard" you used, but since I am not too familiar with it does someone is willing to review the code for me before I post it here?

Thanks in advance,

Enrico

toncho11
Posts: 124
Joined: Tue Apr 19, 2011 7:58 pm

Re: Driver gMobilabPlus under Windows

Post by toncho11 »

Hi Benry,

Please post your code for the g.mobilab plus here. This way people can download, compile and use it.

Thanks,

Anton
Gipsa-lab

benry
Posts: 12
Joined: Thu Sep 22, 2011 3:59 pm
Location: Milan, Italy
Contact:

Re: Driver gMobilabPlus under Windows

Post by benry »

Hi,
sorry for the late answer, but recently I am having huge time problems ;) ...I did not succeeded to test the driver also on Linux and it probably still have some issues for that OS since I changed it a lot to let it work also on the "multi-purpose" version of this device.

Anyway I tried to let it work on both the operating systems, consequently if there are some issues on Linux they should be easily tackled with small code modifications.

Here is attached the latest driver source code version I produced that is working for me (tested on openvibe-0.14.2-svn3326-src).

Hope to have included all the files that I have modified... If you have any problems, let me know.

p.s.
To use it you need the C API for this device provided by g.tec (unfortunately I can't share it due to its licence)... the path to the g.tec library has to be listed in FindThirdPartyGMobiLabPlusAPI.cmake
g.TecMobilabPlus.zip
g.Tec gMobilab+ acquisition server driver
(22.77 KiB) Downloaded 515 times
Bye

Enrico

Athan
Posts: 12
Joined: Wed Oct 03, 2012 12:18 pm

Re: Driver gMobilabPlus under Windows

Post by Athan »

Hi,

Can you upload a build version?
I get a bunch of errors on win 7 x64 trying build the cmake and research is pushing.

Thanks.

Post Reply