<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">Am 12.04.2018 um 14:32 schrieb Sven Dyroff <<a href="mailto:S.Dyroff@phytec.de" class="">S.Dyroff@phytec.de</a>>:</div><br class="Apple-interchange-newline"><div class=""><font size="2" face="sans-serif" class="">Hello Nikolaus,</font>
<br class="">
<br class=""><font size="2" face="sans-serif" class="">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>
<br class=""></div></blockquote><div><br class=""></div>I have done this test for you:</div><div><br class=""></div><div>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).</div><div>Run evtest /dev/input/accel | head -20 and write down highest X/Y/Z values.</div><div><br class=""></div><div>On a GTA04A5:</div><div><br class=""></div><div><div>root@letux:~# evtest /dev/input/accel | head -20</div><div>Input driver version is 1.0.1</div><div>Input device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0</div><div>Input device name: "accelerometer-iio-input-bridge"</div><div>Supported events:</div><div> Event type 0 (EV_SYN)</div><div> Event type 3 (EV_ABS)</div><div> Event code 0 (ABS_X)</div><div> Value 14</div><div> Min -511</div><div> Max 511</div><div> Event code 1 (ABS_Y)</div><div> Value -32</div><div> Min -511</div><div> Max 511</div><div> Event code 2 (ABS_Z)</div><div> Value -253</div><div> Min -511</div><div> Max 511</div><div>Properties:</div><div>Testing ... (interrupt to exit)</div><div>root@letux:~# </div><div><br class=""></div><div>This means: X=14/256 = +5%, Y=--32/256 = -12%, Z=-253/256 = -99%</div></div><div><br class=""></div><div>On a GTA04A4:</div><div><br class=""></div><div><div>root@letux:~# evtest /dev/input/accel | head -20</div><div>Input driver version is 1.0.1</div><div>Input device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0</div><div>Input device name: "accelerometer-iio-input-bridge"</div><div>Supported events:</div><div> Event type 0 (EV_SYN)</div><div> Event type 3 (EV_ABS)</div><div> Event code 0 (ABS_X)</div><div> Value -15</div><div> Min -511</div><div> Max 511</div><div> Event code 1 (ABS_Y)</div><div> Value -5</div><div> Min -511</div><div> Max 511</div><div> Event code 2 (ABS_Z)</div><div> Value 274</div><div> Min -511</div><div> Max 511</div><div>Properties:</div><div>Testing ... (interrupt to exit)</div><div>root@letux:~# </div></div><div><br class=""></div><div>This means: X=-15/256 = +6%, Y=--5/256 = -2%, Z=274/256 = +107%</div><div><div><div class=""><br class=""></div><div>Comparing A4 and A5: they basically behave *the same* regarding the range</div><div>and report both +/-256 for 1g. They just differ in the orientation of the sensor.</div><div><br class=""></div><div><div></div></div><div class="">I.e. the Z axis also has a sign error. This is still missing in my correction patch.</div><div class="">To make it really precise I should rotate both devices by 90° and write down all</div><div class="">values...</div><div class=""><br class=""></div></div></div><div>What I don't know and can't compare is if they behave like a GTA02... And</div><div>if a total value of ~1g is what QtMaze expects. And if the QtMaze makes use</div><div>of the Z-axis at all (doesn't look as if it does).</div><div><br class=""></div><div>BR,</div><div>Nikolaus</div><div><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">
<br class=""><font size="2" face="sans-serif" class="">Best regards</font>
<br class=""><font size="2" face="sans-serif" class=""> Sven</font>
<br class=""><font size="2" face="sans-serif" class=""> </font>
<br class="">
<br class="">
<br class="">
<br class="">
<br class=""><font size="1" color="#5f5f5f" face="sans-serif" class="">Von:
</font><font size="1" face="sans-serif" class="">"H. Nikolaus Schaller"
<<a href="mailto:hns@goldelico.com" class="">hns@goldelico.com</a>></font>
<br class=""><font size="1" color="#5f5f5f" face="sans-serif" class="">An:
</font><font size="1" face="sans-serif" class="">List for communicating
with real GTA04 owners <<a href="mailto:gta04-owner@goldelico.com" class="">gta04-owner@goldelico.com</a>></font>
<br class=""><font size="1" color="#5f5f5f" face="sans-serif" class="">Datum:
</font><font size="1" face="sans-serif" class="">12.04.2018 14:25</font>
<br class=""><font size="1" color="#5f5f5f" face="sans-serif" class="">Betreff:
</font><font size="1" face="sans-serif" class="">Re: [Gta04-owner]
Second trial with QtMoko2</font>
<br class=""><font size="1" color="#5f5f5f" face="sans-serif" class="">Gesendet von:
</font><font size="1" face="sans-serif" class="">"Gta04-owner"
<<a href="mailto:gta04-owner-bounces@goldelico.com" class="">gta04-owner-bounces@goldelico.com</a>></font>
<br class="">
<hr noshade="" class="">
<br class="">
<br class="">
<br class=""><font size="3" class="">Hi Sven,</font>
<br class="">
<br class=""><font size="3" class="">Am 12.04.2018 um 14:19 schrieb Sven Dyroff <</font><a href="mailto:S.Dyroff@phytec.de" class=""><font size="3" color="blue" class=""><u class="">S.Dyroff@phytec.de</u></font></a><font size="3" class="">>:</font>
<br class="">
<br class=""><font size="2" face="sans-serif" class="">Hello Nikolaus,</font><font size="3" class="">
<br class="">
</font><font size="2" face="sans-serif" class=""><br class="">
fine, but this will "only" correct the swapping. It will still
not correct the calibration.</font><font size="3" class=""> <br class="">
</font><font size="2" face="sans-serif" class=""><br class="">
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><font size="3" class=""> <br class="">
</font><font size="2" face="sans-serif" class=""><br class="">
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><font size="3" class=""> </font>
<br class="">
<br class=""><font size="3" class="">It is easier than a printf: evtest /dev/input/accel reports
the range [0..512] and the current values.</font>
<br class="">
<br class=""><font size="3" class="">I have checked that and the GTA04A5 also reports roughly
256.</font>
<br class="">
<br class=""><font size="3" class="">So I think you should test (after I have uploaded it to
the server) if it is now ok for you.</font>
<br class="">
<br class=""><font size="3" class="">BR,</font>
<br class=""><font size="3" class="">Nikolaus</font>
<br class="">
<br class=""><font size="2" face="sans-serif" class=""><br class="">
Best regards</font><font size="3" class=""> </font><font size="2" face="sans-serif" class=""><br class="">
Sven</font><font size="3" class=""> </font><font size="2" face="sans-serif" class=""><br class="">
</font><font size="3" class=""><br class="">
<br class="">
<br class="">
<br class="">
</font><font size="1" color="#5f5f5f" face="sans-serif" class=""><br class="">
Von: </font><font size="1" face="sans-serif" class="">"H.
Nikolaus Schaller" <</font><a href="mailto:hns@goldelico.com" class=""><font size="1" color="blue" face="sans-serif" class=""><u class="">hns@goldelico.com</u></font></a><font size="1" face="sans-serif" class="">></font><font size="3" class="">
</font><font size="1" color="#5f5f5f" face="sans-serif" class=""><br class="">
An: </font><font size="1" face="sans-serif" class="">Sven
Dyroff <</font><a href="mailto:S.Dyroff@phytec.de" class=""><font size="1" color="blue" face="sans-serif" class=""><u class="">S.Dyroff@phytec.de</u></font></a><font size="1" face="sans-serif" class="">></font><font size="3" class="">
</font><font size="1" color="#5f5f5f" face="sans-serif" class=""><br class="">
Kopie: </font><font size="1" face="sans-serif" class="">List
for communicating with real GTA04 owners <</font><a href="mailto:gta04-owner@goldelico.com" class=""><font size="1" color="blue" face="sans-serif" class=""><u class="">gta04-owner@goldelico.com</u></font></a><font size="1" face="sans-serif" class="">></font><font size="3" class="">
</font><font size="1" color="#5f5f5f" face="sans-serif" class=""><br class="">
Datum: </font><font size="1" face="sans-serif" class="">11.04.2018
19:21</font><font size="3" class=""> </font><font size="1" color="#5f5f5f" face="sans-serif" class=""><br class="">
Betreff: </font><font size="1" face="sans-serif" class="">Re:
[Gta04-owner] Second trial with QtMoko2</font><font size="3" class=""> <br class="">
</font>
<hr noshade="" class=""><font size="3" class=""><br class="">
<br class="">
Hi Sven, <br class="">
<br class="">
Am 05.04.2018 um 18:05 schrieb Sven Dyroff <</font><a href="mailto:S.Dyroff@phytec.de" class=""><font size="3" color="blue" class=""><u class="">S.Dyroff@phytec.de</u></font></a><font size="3" class="">>:
<br class="">
</font><font size="2" face="sans-serif" class=""><br class="">
Hello Nikolaus,</font><font size="3" class=""> <br class="">
</font><font size="2" face="sans-serif" class=""><br class="">
> I have now booted my GTA04A4 and the orientation is completely correct.</font><font size="3" class="">
</font><font size="2" face="sans-serif" class=""><br class="">
> Hm. Maybe a subtle difference between GTA04A4 and A5? They use different
accelerometer chips.</font><font size="3" class=""> <br class="">
</font><font size="2" face="sans-serif" class=""><br class="">
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><font size="3" class="">
<br class="">
<br class="">
I have now added a device version detection to swap the horizontal axis
if we run on a GTA04A5: <br class="">
</font><font size="3" color="blue" class=""><u class=""><br class="">
</u></font><a href="http://git.goldelico.com/?p=gta04-qtmoko.git;a=commit;h=04c30a3b18be8b55148427d6c63423837f6a77cc" class=""><font size="3" color="blue" class=""><u class="">http://git.goldelico.com/?p=gta04-qtmoko.git;a=commit;h=04c30a3b18be8b55148427d6c63423837f6a77cc</u></font></a><font size="3" class="">
<br class="">
<br class="">
I have not yet published the new debian packages, but will do soon. So
apt-get update will not <br class="">
yet find anything new. <br class="">
<br class="">
BR, <br class="">
Nikolaus <br class="">
_______________________________________________<br class="">
Gta04-owner mailing list</font><font size="3" color="blue" class=""><u class=""><br class="">
</u></font><a href="mailto:Gta04-owner@goldelico.com" class=""><font size="3" color="blue" class=""><u class="">Gta04-owner@goldelico.com</u></font></a><font size="3" class=""><br class="">
</font><a href="http://lists.goldelico.com/mailman/listinfo.cgi/gta04-owner" class=""><font size="3" class="">http://lists.goldelico.com/mailman/listinfo.cgi/gta04-owner</font></a>
<br class=""><tt class=""><font size="2" class="">_______________________________________________<br class="">
Gta04-owner mailing list<br class="">
<a href="mailto:Gta04-owner@goldelico.com" class="">Gta04-owner@goldelico.com</a><br class="">
</font></tt><a href="http://lists.goldelico.com/mailman/listinfo.cgi/gta04-owner" class=""><tt class=""><font size="2" class="">http://lists.goldelico.com/mailman/listinfo.cgi/gta04-owner</font></tt></a><tt class=""><font size="2" class=""><br class="">
</font></tt>
<br class="">_______________________________________________<br class="">Gta04-owner mailing list<br class=""><a href="mailto:Gta04-owner@goldelico.com" class="">Gta04-owner@goldelico.com</a><br class="">http://lists.goldelico.com/mailman/listinfo.cgi/gta04-owner<br class=""></div></blockquote></div><br class=""></body></html>