<font size=2 face="sans-serif">Hello Nikolaus,</font>
<br>
<br><font size=2 face="sans-serif">have you tried if GTA04A5 now moves
the ball in QtMaze as smooth, fast and natural and without stuttering as
the GTA04A4?</font>
<br>
<br><font size=2 face="sans-serif">Best regards</font>
<br><font size=2 face="sans-serif">   Sven</font>
<br><font size=2 face="sans-serif">    </font>
<br>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">Von:      
 </font><font size=1 face="sans-serif">"H. Nikolaus Schaller"
<hns@goldelico.com></font>
<br><font size=1 color=#5f5f5f face="sans-serif">An:      
 </font><font size=1 face="sans-serif">List for communicating
with real GTA04 owners <gta04-owner@goldelico.com></font>
<br><font size=1 color=#5f5f5f face="sans-serif">Datum:      
 </font><font size=1 face="sans-serif">12.04.2018 14:52</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Betreff:    
   </font><font size=1 face="sans-serif">Re: [Gta04-owner]
Second trial with QtMoko2</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Gesendet von:    
   </font><font size=1 face="sans-serif">"Gta04-owner"
<gta04-owner-bounces@goldelico.com></font>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=3>Am 12.04.2018 um 14:32 schrieb Sven Dyroff <</font></tt><a href=mailto:S.Dyroff@phytec.de><tt><font size=3 color=blue><u>S.Dyroff@phytec.de</u></font></tt></a><tt><font size=3>>:</font></tt>
<br>
<br><font size=2 face="sans-serif">Hello Nikolaus,</font><tt><font size=3>
</font></tt>
<br>
<br><font size=2 face="sans-serif">it would astonish me if you're right,
but of course I'll then test it again in order to give you a chance to
astonish me...    :-))</font><tt><font size=3> </font></tt>
<br>
<br><tt><font size=3>I have done this test for you:</font></tt>
<br>
<br><tt><font size=3>GTA04A4 and GTA04A5 with display upside on the table
with the same µSD card (i.e. boot A5 first, then swap card and boot A4).</font></tt>
<br><tt><font size=3>Run evtest /dev/input/accel | head -20 and write down
highest X/Y/Z values.</font></tt>
<br>
<br><tt><font size=3>On a GTA04A5:</font></tt>
<br>
<br><tt><font size=3>root@letux:~# evtest /dev/input/accel | head -20</font></tt>
<br><tt><font size=3>Input driver version is 1.0.1</font></tt>
<br><tt><font size=3>Input device ID: bus 0x0 vendor 0x0 product 0x0 version
0x0</font></tt>
<br><tt><font size=3>Input device name: "accelerometer-iio-input-bridge"</font></tt>
<br><tt><font size=3>Supported events:</font></tt>
<br><tt><font size=3>  Event type 0 (EV_SYN)</font></tt>
<br><tt><font size=3>  Event type 3 (EV_ABS)</font></tt>
<br><tt><font size=3>    Event code 0 (ABS_X)</font></tt>
<br><tt><font size=3>      Value     14</font></tt>
<br><tt><font size=3>      Min     -511</font></tt>
<br><tt><font size=3>      Max      511</font></tt>
<br><tt><font size=3>    Event code 1 (ABS_Y)</font></tt>
<br><tt><font size=3>      Value    -32</font></tt>
<br><tt><font size=3>      Min     -511</font></tt>
<br><tt><font size=3>      Max      511</font></tt>
<br><tt><font size=3>    Event code 2 (ABS_Z)</font></tt>
<br><tt><font size=3>      Value   -253</font></tt>
<br><tt><font size=3>      Min     -511</font></tt>
<br><tt><font size=3>      Max      511</font></tt>
<br><tt><font size=3>Properties:</font></tt>
<br><tt><font size=3>Testing ... (interrupt to exit)</font></tt>
<br><tt><font size=3>root@letux:~# </font></tt>
<br>
<br><tt><font size=3>This means: X=14/256 = +5%, Y=--32/256 = -12%, Z=-253/256
= -99%</font></tt>
<br>
<br><tt><font size=3>On a GTA04A4:</font></tt>
<br>
<br><tt><font size=3>root@letux:~# evtest /dev/input/accel | head -20</font></tt>
<br><tt><font size=3>Input driver version is 1.0.1</font></tt>
<br><tt><font size=3>Input device ID: bus 0x0 vendor 0x0 product 0x0 version
0x0</font></tt>
<br><tt><font size=3>Input device name: "accelerometer-iio-input-bridge"</font></tt>
<br><tt><font size=3>Supported events:</font></tt>
<br><tt><font size=3>  Event type 0 (EV_SYN)</font></tt>
<br><tt><font size=3>  Event type 3 (EV_ABS)</font></tt>
<br><tt><font size=3>    Event code 0 (ABS_X)</font></tt>
<br><tt><font size=3>      Value    -15</font></tt>
<br><tt><font size=3>      Min     -511</font></tt>
<br><tt><font size=3>      Max      511</font></tt>
<br><tt><font size=3>    Event code 1 (ABS_Y)</font></tt>
<br><tt><font size=3>      Value     -5</font></tt>
<br><tt><font size=3>      Min     -511</font></tt>
<br><tt><font size=3>      Max      511</font></tt>
<br><tt><font size=3>    Event code 2 (ABS_Z)</font></tt>
<br><tt><font size=3>      Value    274</font></tt>
<br><tt><font size=3>      Min     -511</font></tt>
<br><tt><font size=3>      Max      511</font></tt>
<br><tt><font size=3>Properties:</font></tt>
<br><tt><font size=3>Testing ... (interrupt to exit)</font></tt>
<br><tt><font size=3>root@letux:~# </font></tt>
<br>
<br><tt><font size=3>This means: X=-15/256 = +6%, Y=--5/256 = -2%, Z=274/256
= +107%</font></tt>
<br>
<br><tt><font size=3>Comparing A4 and A5: they basically behave *the same*
regarding the range</font></tt>
<br><tt><font size=3>and report both +/-256 for 1g. They just differ in
the orientation of the sensor.</font></tt>
<br>
<br><tt><font size=3>I.e. the Z axis also has a sign error. This is still
missing in my correction patch.</font></tt>
<br><tt><font size=3>To make it really precise I should rotate both devices
by 90° and write down all</font></tt>
<br><tt><font size=3>values...</font></tt>
<br>
<br><tt><font size=3>What I don't know and can't compare is if they behave
like a GTA02... And</font></tt>
<br><tt><font size=3>if a total value of ~1g is what QtMaze expects. And
if the QtMaze makes use</font></tt>
<br><tt><font size=3>of the Z-axis at all (doesn't look as if it does).</font></tt>
<br>
<br><tt><font size=3>BR,</font></tt>
<br><tt><font size=3>Nikolaus</font></tt>
<br>
<br>
<br>
<br><font size=2 face="sans-serif">Best regards</font>
<br><font size=2 face="sans-serif">   Sven</font><tt><font size=3>
</font></tt>
<br><font size=2 face="sans-serif">    </font><tt><font size=3> </font></tt>
<br>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">Von:      
 </font><font size=1 face="sans-serif">"H. Nikolaus Schaller"
<</font><a href=mailto:hns@goldelico.com><font size=1 color=blue face="sans-serif"><u>hns@goldelico.com</u></font></a><font size=1 face="sans-serif">></font><tt><font size=3>
</font></tt>
<br><font size=1 color=#5f5f5f face="sans-serif">An:      
 </font><font size=1 face="sans-serif">List for communicating with
real GTA04 owners <</font><a href="mailto:gta04-owner@goldelico.com"><font size=1 color=blue face="sans-serif"><u>gta04-owner@goldelico.com</u></font></a><font size=1 face="sans-serif">></font><tt><font size=3>
</font></tt>
<br><font size=1 color=#5f5f5f face="sans-serif">Datum:      
 </font><font size=1 face="sans-serif">12.04.2018 14:25</font><tt><font size=3>
</font></tt>
<br><font size=1 color=#5f5f5f face="sans-serif">Betreff:    
   </font><font size=1 face="sans-serif">Re: [Gta04-owner] Second
trial with QtMoko2</font><tt><font size=3> </font></tt>
<br><font size=1 color=#5f5f5f face="sans-serif">Gesendet von:    
   </font><font size=1 face="sans-serif">"Gta04-owner"
<</font><a href="mailto:gta04-owner-bounces@goldelico.com"><font size=1 color=blue face="sans-serif"><u>gta04-owner-bounces@goldelico.com</u></font></a><font size=1 face="sans-serif">></font><tt><font size=3>
</font></tt>
<br>
<hr>
<br>
<br>
<br>
<br><tt><font size=3>Hi Sven, </font></tt>
<br>
<br><tt><font size=3>Am 12.04.2018 um 14:19 schrieb Sven Dyroff <</font></tt><a href=mailto:S.Dyroff@phytec.de><tt><font size=3 color=blue><u>S.Dyroff@phytec.de</u></font></tt></a><tt><font size=3>>:
</font></tt>
<br>
<br><font size=2 face="sans-serif">Hello Nikolaus,</font><tt><font size=3>
</font></tt>
<br>
<br><font size=2 face="sans-serif">fine, but this will "only"
correct the swapping. It will still not correct the calibration.</font><tt><font size=3>
</font></tt>
<br>
<br><font size=2 face="sans-serif">Whereat the comments of the affected
source give a nice hint: "On my GTA04, sitting flat on the table,
the raw Z acceleration value is about 256, so we divide by 256 here."</font><tt><font size=3>
</font></tt>
<br>
<br><font size=2 face="sans-serif">So I suggest to add a further printf
of the value of "accel -> z", in order that your code will
provide you the needed calibration data that you can then use for "accel
-> [xyz]scale" in case of having detected a GTA04A5.</font><tt><font size=3>
 </font></tt>
<br>
<br><tt><font size=3>It is easier than a printf: evtest /dev/input/accel
reports the range [0..512] and the current values. </font></tt>
<br>
<br><tt><font size=3>I have checked that and the GTA04A5 also reports roughly
256. </font></tt>
<br>
<br><tt><font size=3>So I think you should test (after I have uploaded
it to the server) if it is now ok for you. </font></tt>
<br>
<br><tt><font size=3>BR, </font></tt>
<br><tt><font size=3>Nikolaus </font></tt>
<br>
<br>
<br><font size=2 face="sans-serif">Best regards</font><tt><font size=3>
</font></tt>
<br><font size=2 face="sans-serif">  Sven</font><tt><font size=3>
</font></tt>
<br><font size=2 face="sans-serif">   </font>
<br>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">Von:      
 </font><font size=1 face="sans-serif">"H. Nikolaus Schaller"
<</font><a href=mailto:hns@goldelico.com><font size=1 color=blue face="sans-serif"><u>hns@goldelico.com</u></font></a><font size=1 face="sans-serif">></font><tt><font size=3>
</font></tt>
<br><font size=1 color=#5f5f5f face="sans-serif">An:      
 </font><font size=1 face="sans-serif">Sven Dyroff <</font><a href=mailto:S.Dyroff@phytec.de><font size=1 color=blue face="sans-serif"><u>S.Dyroff@phytec.de</u></font></a><font size=1 face="sans-serif">></font><tt><font size=3>
</font></tt>
<br><font size=1 color=#5f5f5f face="sans-serif">Kopie:      
 </font><font size=1 face="sans-serif">List for communicating with
real GTA04 owners <</font><a href="mailto:gta04-owner@goldelico.com"><font size=1 color=blue face="sans-serif"><u>gta04-owner@goldelico.com</u></font></a><font size=1 face="sans-serif">></font><tt><font size=3>
</font></tt>
<br><font size=1 color=#5f5f5f face="sans-serif">Datum:      
 </font><font size=1 face="sans-serif">11.04.2018 19:21</font><tt><font size=3>
</font></tt>
<br><font size=1 color=#5f5f5f face="sans-serif">Betreff:    
   </font><font size=1 face="sans-serif">Re: [Gta04-owner] Second
trial with QtMoko2</font><tt><font size=3> </font></tt>
<br><tt><font size=3> </font></tt>
<br>
<hr>
<br>
<br>
<br><tt><font size=3>Hi Sven, </font></tt>
<br>
<br><tt><font size=3>Am 05.04.2018 um 18:05 schrieb Sven Dyroff <</font></tt><a href=mailto:S.Dyroff@phytec.de><tt><font size=3 color=blue><u>S.Dyroff@phytec.de</u></font></tt></a><tt><font size=3>>:
</font></tt>
<br>
<br><font size=2 face="sans-serif">Hello Nikolaus,</font><tt><font size=3>
</font></tt>
<br>
<br><font size=2 face="sans-serif">> I have now booted my GTA04A4 and
the orientation is completely correct.</font>
<br><font size=2 face="sans-serif">> Hm. Maybe a subtle difference between
GTA04A4 and A5? They use different accelerometer chips.</font><tt><font size=3>
</font></tt>
<br>
<br><font size=2 face="sans-serif">something like that is what I already
assumed. Would have wondered me if some scaling factors would have gone
lost by just rebuilding QtMoko...</font>
<br>
<br><tt><font size=3>I have now added a device version detection to swap
the horizontal axis if we run on a GTA04A5: </font></tt>
<br>
<br><a href="http://git.goldelico.com/?p=gta04-qtmoko.git;a=commit;h=04c30a3b18be8b55148427d6c63423837f6a77cc"><tt><font size=3 color=blue><u>http://git.goldelico.com/?p=gta04-qtmoko.git;a=commit;h=04c30a3b18be8b55148427d6c63423837f6a77cc</u></font></tt></a><tt><font size=3>
</font></tt>
<br>
<br><tt><font size=3>I have not yet published the new debian packages,
but will do soon. So apt-get update will not </font></tt>
<br><tt><font size=3>yet find anything new. </font></tt>
<br>
<br><tt><font size=3>BR, </font></tt>
<br><tt><font size=3>Nikolaus </font></tt>
<br><tt><font size=3>_______________________________________________</font></tt>
<br><tt><font size=3>Gta04-owner mailing list</font></tt>
<br><a href="mailto:Gta04-owner@goldelico.com"><tt><font size=3 color=blue><u>Gta04-owner@goldelico.com</u></font></tt></a>
<br><a href="http://lists.goldelico.com/mailman/listinfo.cgi/gta04-owner"><tt><font size=3 color=blue><u>http://lists.goldelico.com/mailman/listinfo.cgi/gta04-owner</u></font></tt></a><tt><font size=3>
</font></tt>
<br><tt><font size=2>_______________________________________________</font></tt>
<br><tt><font size=2>Gta04-owner mailing list</font></tt>
<br><a href="mailto:Gta04-owner@goldelico.com"><tt><font size=2 color=blue><u>Gta04-owner@goldelico.com</u></font></tt></a>
<br><a href="http://lists.goldelico.com/mailman/listinfo.cgi/gta04-owner"><tt><font size=2 color=blue><u>http://lists.goldelico.com/mailman/listinfo.cgi/gta04-owner</u></font></tt></a>
<br><tt><font size=3> </font></tt>
<br><tt><font size=3>_______________________________________________</font></tt>
<br><tt><font size=3>Gta04-owner mailing list</font></tt>
<br><a href="mailto:Gta04-owner@goldelico.com"><tt><font size=3 color=blue><u>Gta04-owner@goldelico.com</u></font></tt></a>
<br><a href="http://lists.goldelico.com/mailman/listinfo.cgi/gta04-owner"><tt><font size=3>http://lists.goldelico.com/mailman/listinfo.cgi/gta04-owner</font></tt></a>
<br>
<br>
<br><tt><font size=3>_______________________________________________<br>
Gta04-owner mailing list<br>
Gta04-owner@goldelico.com<br>
</font></tt><a href="http://lists.goldelico.com/mailman/listinfo.cgi/gta04-owner"><tt><font size=3>http://lists.goldelico.com/mailman/listinfo.cgi/gta04-owner</font></tt></a>
<br>
<br>