<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
<link rel="self" type="application/atom+xml" href="http://theeyetribe.com/forum/feed.php?f=25&amp;t=128" />

<title>The Eye Tribe</title>
<subtitle>Developer Forum</subtitle>
<link href="http://theeyetribe.com/forum/index.php" />
<updated>2014-03-05T19:07:38+02:00</updated>

<author><name><![CDATA[The Eye Tribe]]></name></author>
<id>http://theeyetribe.com/forum/feed.php?f=25&amp;t=128</id>
<entry>
<author><name><![CDATA[wxz]]></name></author>
<updated>2014-03-05T19:07:38+02:00</updated>
<published>2014-03-05T19:07:38+02:00</published>
<id>http://theeyetribe.com/forum/viewtopic.php?t=128&amp;p=514#p514</id>
<link href="http://theeyetribe.com/forum/viewtopic.php?t=128&amp;p=514#p514"/>
<title type="html"><![CDATA[Re: polling data issue (with source code)]]></title>

<content type="html" xml:base="http://theeyetribe.com/forum/viewtopic.php?t=128&amp;p=514#p514"><![CDATA[
the callback is the next to try on my list. <br />Thanks for your swift reply Martin! <br />The eye tribe eye tracker is as accurate as any other eye trackers I've used before, yet with a much consumer-friendly price tag. Great work!<p>Statistics: Posted by <a href="http://theeyetribe.com/forum/memberlist.php?mode=viewprofile&amp;u=2499">skatawxz</a> — 05 Mar 2014, 19:07</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[mingxinbit@gmail.com]]></name></author>
<updated>2014-03-05T18:33:15+02:00</updated>
<published>2014-03-05T18:33:15+02:00</published>
<id>http://theeyetribe.com/forum/viewtopic.php?t=128&amp;p=513#p513</id>
<link href="http://theeyetribe.com/forum/viewtopic.php?t=128&amp;p=513#p513"/>
<title type="html"><![CDATA[Re: polling data issue (with source code)]]></title>

<content type="html" xml:base="http://theeyetribe.com/forum/viewtopic.php?t=128&amp;p=513#p513"><![CDATA[
I suggest you can modify the MyGaze class code in the part of CallBack function.<br /><br />Whatever, I think the CallBack function used in C plus plus for receiving data is good. You can add some variables used for gaze data return, then you received the data in your main function.<br /><br />Do you think?<p>Statistics: Posted by <a href="http://theeyetribe.com/forum/memberlist.php?mode=viewprofile&amp;u=2011">skatamingxinbit@gmail.com</a> — 05 Mar 2014, 18:33</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Martin]]></name></author>
<updated>2014-03-05T18:00:00+02:00</updated>
<published>2014-03-05T18:00:00+02:00</published>
<id>http://theeyetribe.com/forum/viewtopic.php?t=128&amp;p=510#p510</id>
<link href="http://theeyetribe.com/forum/viewtopic.php?t=128&amp;p=510#p510"/>
<title type="html"><![CDATA[Re: polling data issue (with source code)]]></title>

<content type="html" xml:base="http://theeyetribe.com/forum/viewtopic.php?t=128&amp;p=510#p510"><![CDATA[
Ok, found the issue. The call to get_frame doesn't populate the gaze data object passed to the method. What the method currently does is to send a request to the server for the latest data. The data will then be delivered by the listener callback once it arrives. <br /><br />The next update for the C++ SDK will make all get-data calls to the server in blocking-mode so that it returns upon calling like it should.<br /><br />Sorry for the inconvenience.<p>Statistics: Posted by <a href="http://theeyetribe.com/forum/memberlist.php?mode=viewprofile&amp;u=117">skataMartin</a> — 05 Mar 2014, 18:00</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Martin]]></name></author>
<updated>2014-03-05T17:41:36+02:00</updated>
<published>2014-03-05T17:41:36+02:00</published>
<id>http://theeyetribe.com/forum/viewtopic.php?t=128&amp;p=509#p509</id>
<link href="http://theeyetribe.com/forum/viewtopic.php?t=128&amp;p=509#p509"/>
<title type="html"><![CDATA[Re: polling data issue (with source code)]]></title>

<content type="html" xml:base="http://theeyetribe.com/forum/viewtopic.php?t=128&amp;p=509#p509"><![CDATA[
Looking into this and will get back to you asap.<p>Statistics: Posted by <a href="http://theeyetribe.com/forum/memberlist.php?mode=viewprofile&amp;u=117">skataMartin</a> — 05 Mar 2014, 17:41</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[wxz]]></name></author>
<updated>2014-03-05T07:20:42+02:00</updated>
<published>2014-03-05T07:20:42+02:00</published>
<id>http://theeyetribe.com/forum/viewtopic.php?t=128&amp;p=504#p504</id>
<link href="http://theeyetribe.com/forum/viewtopic.php?t=128&amp;p=504#p504"/>
<title type="html"><![CDATA[polling data issue (with source code)]]></title>

<content type="html" xml:base="http://theeyetribe.com/forum/viewtopic.php?t=128&amp;p=504#p504"><![CDATA[
hi,<br /><br />I'm trying to manually poll data by calling gtl::GazeApi's get_frame() method. The code below shows details.  The output on the console shows that the eye tracker was successfully connect.  However, the retrieved data is garbage. What did I miss?<br /><br /><dl class="codebox"><dt>Code: </dt><dd><code>// GazeDataCollector.h<br />#pragma once<br />#include &quot;../include/gazeapi_interfaces.h&quot;<br />#include &quot;../include/gazeapi.h&quot;<br /><br />class GazeDataCollector : public gtl::IGazeListener<br />{<br />public:<br />   GazeDataCollector(void);<br />   ~GazeDataCollector(void);<br /><br />   bool Connect();<br />   void Disconnect();<br />   bool GetFrame();<br /><br />private:<br />   void on_gaze_data(gtl::GazeData const &amp;gaze_data);<br /><br />   gtl::GazeApi m_gApi;<br />   bool connected;<br />   gtl::GazeData data_;<br />};</code></dd></dl><br /><br /><dl class="codebox"><dt>Code: </dt><dd><code>//GazeDataCollector.cpp<br />#include &quot;GazeDataCollector.h&quot;<br />#include &lt;iostream&gt;<br /><br />GazeDataCollector::GazeDataCollector(void) : connected(false)<br />{<br />   std::cout &lt;&lt; &quot;constructor&quot; &lt;&lt; std::endl;<br />}<br /><br /><br />GazeDataCollector::~GazeDataCollector(void)<br />{<br />   if(connected)<br />      Disconnect();<br />   std::cout &lt;&lt; &quot;destructor&quot; &lt;&lt; std::endl;<br />}<br /><br />bool GazeDataCollector::Connect()<br />{<br />   if(m_gApi.connect() )<br />   {<br />      m_gApi.add_listener(*this);<br />      m_gApi.set_push(false);<br />      connected = true;<br />      return true;<br />   }<br />   return false;<br />}<br /><br />bool GazeDataCollector::GetFrame()<br />{<br />   m_gApi.get_frame(data_);<br />   if(data_.state &amp; gtl::GazeData::GD_STATE_TRACKING_GAZE)<br />   {<br />      gtl::Point2D const &amp; smoothedCoordinates = data_.avg;<br />      std::cout &lt;&lt; &quot;data received. &quot; &lt;&lt; smoothedCoordinates.x &lt;&lt; &quot;, &quot; &lt;&lt; smoothedCoordinates.y &lt;&lt; std::endl;<br />   }<br /><br />   return false;<br />}<br /><br />void GazeDataCollector::Disconnect()<br />{<br />   m_gApi.remove_listener(*this);<br />   m_gApi.disconnect();<br />}<br /><br />void GazeDataCollector::on_gaze_data(gtl::GazeData const &amp;gaze_data)<br />{<br />   if( gaze_data.state &amp; gtl::GazeData::GD_STATE_TRACKING_GAZE )<br />    {<br />        gtl::Point2D const &amp; smoothedCoordinates = gaze_data.avg;<br /><br />        // Move GUI point, do hit-testing, log coordinates, etc.<br />      std::cout &lt;&lt; &quot;data received. &quot; &lt;&lt; smoothedCoordinates.x &lt;&lt; &quot;, &quot; &lt;&lt; smoothedCoordinates.y &lt;&lt; std::endl;<br />    }<br />}<br /></code></dd></dl><br /><br /><dl class="codebox"><dt>Code: </dt><dd><code>#include &quot;GazeDataCollector.h&quot;<br />#include &lt;iostream&gt;<br />#include &quot;stdlib.h&quot;<br /><br />int main()<br />{<br />   GazeDataCollector gaze;<br /><br />   if(gaze.Connect()) <br />   {<br />      std::cout &lt;&lt; &quot;Connected.&quot; &lt;&lt; std::endl;<br />      std::cout &lt;&lt; &quot;start loop&quot; &lt;&lt; std::endl;<br />      for(int i=0; i&lt;50; i++)<br />      {<br />         gaze.GetFrame();<br />         _sleep(30);   // pause for 30 ms<br />      }<br />      std::cout &lt;&lt; &quot;end loop&quot; &lt;&lt; std::endl;<br />   }<br /><br />   return 0;<br />}<br /></code></dd></dl><p>Statistics: Posted by <a href="http://theeyetribe.com/forum/memberlist.php?mode=viewprofile&amp;u=2499">skatawxz</a> — 05 Mar 2014, 07:20</p><hr />
]]></content>
</entry>
</feed>