ZStarLib FreeFall + Auto connexion

Discussion created by Arnaud GROSJEAN on Nov 15, 2010
Latest reply on Dec 8, 2010 by Petr Gargulak

Hello, I'm trying to make the freefall detection working into my zstar app.

My app is based on the example, I added into the constructor :


m_theZStar.OnFreeFall += new ZStar3.OnFreeFallHandler(theZstar_OnFreeFallHandler );


And actually the Handler isn't called on freefall...

Note that I :

- desactivated the burst mode (using a timer instead to retrieve the values regularly)

- tried to call IonSetControlMode()

- tried to activate freefall directly onto the sensor instance


I really don't understand why I doesn't work, since I saw another post on this forum where someone did the same and succeed without any problem.


Another question :


In the ZStar GUI, a sensor which was already connected to the usb stick before is automatically detected when the app start.

In the ZStarLib example, this is not the same, the sensor has to be linked to the usb stick after the connexion on the COM port occur.

I tried to force call theZStar_OnActiveSensorsChanged(null, 0);  into  bt_OpenPort_Click(object sender, EventArgs e) but it didnt make it.

One weird thing, when the sensor is already connected to the usb stick before I start my app, the ActiveSensorsCount is equal to zero (the led on the sensor is blinking fast)

How to obtain the same result as in Zstar gui ?


Thx for your answers.