Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

ANT_NAP( 0 )?

Rank

Total Posts: 2

Joined 0

PM

On Windows 7 - using DEMO_DLL as a starting-basis. All is coming together pretty well, but when starting as a master - I do not appear to be getting any broadcast messages out.

Looking at the DEMO_DLL code, I see that within the loop, it's doing an ANT_NAP( 0 ) call. I assume this is to give the DLL time to do its work?

Does this need its own thread? And, if so, how much time between calls? 100ms? Faster?

I'm using Qt, and am very rusty on Windows.

Any other info on integrating ANT with Qt would be appreciated, too.

Thanks,


na/DDJSSBX      
Avatar
RankRankRankRank

Total Posts: 662

Joined 2012-10-09

PM

ANT_ Nap is really just a platform independent way of calling sleep. Since this is a very simple console application, this allows waiting for user input while processing messages. The ANT DLL internally creates another thread for polling for ANT messages.

We are not familiar with development with QT, but it probably has a different way of handling user input; other users may be able to provide more feedback on working with QT. The ANT callback functions will be executing in the ANT message thread, so that is just something you'll need to be aware of during your development.