Notices


Reply
Thread Tools
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#71
So maybe it's better idea, to "polish" N900 version first, then attempt porting to other device? Especially, that N9/N950 is pink side of the force

Just suggesting.

Anyway, thanks that You're still working on it.

/Estel
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
 

The Following User Says Thank You to Estel For This Useful Post:
Posts: 915 | Thanked: 3,209 times | Joined on Jan 2011 @ Germany
#72
I think this change to share/tilt_maemo.c might add initial calibration of the accelerometer:
Code:
<.../neverball-1.5.5/share>:diff a b
39c39
<     int i, ax, ay, az;
---
>     int i, ax, ay, az, ax0, ay0, az0;
53,55c53,55
<         accel.x = ax * 0.2f + accel.x * 0.8f;
<         accel.y = ay * 0.2f + accel.y * 0.8f;
<         accel.z = az * 0.2f + accel.z * 0.8f;
---
>         accel.x = ax * 0.2f + accel.x * 0.8f + ax0;
>         accel.y = ay * 0.2f + accel.y * 0.8f + ay0;
>         accel.z = az * 0.2f + accel.z * 0.8f + az0;
59,61c59,65
<         accel.x = ax;
<         accel.y = ay;
<         accel.z = az;
---
>         ax0 = -ax;
>         ay0 = -ay;
>         az0 = -az;	
> 
>         accel.x = ax + ax0;
>         accel.y = ay + ay0;
>         accel.z = az + az0;
However, it's completely untested and really just a wild guess.

Edit:
Not sure under which circumstances tilt_stat will be called, so if the above doesn't work try this instead:
Code:
<.../neverball-1.5.5/share>:diff a b
25a26,28
>     int   x0;
>     int   y0;
>     int   z0;
53,55c56,58
<         accel.x = ax * 0.2f + accel.x * 0.8f;
<         accel.y = ay * 0.2f + accel.y * 0.8f;
<         accel.z = az * 0.2f + accel.z * 0.8f;
---
>         accel.x = ax * 0.2f + accel.x * 0.8f + accel.x0;
>         accel.y = ay * 0.2f + accel.y * 0.8f + accel.y0;
>         accel.z = az * 0.2f + accel.z * 0.8f + accel.z0;
59,61c62,68
<         accel.x = ax;
<         accel.y = ay;
<         accel.z = az;
---
>         accel.x0 = -ax;
>         accel.y0 = -ay;
>         accel.z0 = -az;	
> 
>         accel.x = ax + accel.x0;
>         accel.y = ay + accel.y0;
>         accel.z = az + accel.z0;

Last edited by sulu; 2011-12-06 at 12:37.
 

The Following User Says Thank You to sulu For This Useful Post:
MyNokiaN900's Avatar
Posts: 249 | Thanked: 217 times | Joined on Jan 2011 @ United Kingdom
#73
Awesome game, I have been playing it a lot recently, while taking a break from my SGS2.
__________________
My Nokia N900 is my website, still up an running for the Maemo community. My Nokia N900 is upgraded to 21.2011.38-1Tmaemo1.1 ~ CSSU ready ~ Overclocked ~ Speed patched ~ Swappolube ~ was running 7 desktops ~ 270 apps and counting ~ Multi-Boot with Standard Kernel , Kernel Power 2.6.28.10power47 and NITDroid N12 "UMay".
 
Reply


 
Forum Jump


All times are GMT. The time now is 09:44.