unlimitedbacon / TTGO-DOOM

A port of DOOM to the LilyGO T-Watch
34 stars 10 forks source link

Found a way to swap axis for TTGO V3 #7

Open MemerAus opened 2 weeks ago

MemerAus commented 2 weeks ago

I tried all the remapping options and they just didn't change the controls

This worked for me.

Go to the bottom of "togo_c.ccp"

Swap the x and y axis as below

extern "C" bool ttgo_get_accel(int16_t x, int16_t y, int16_t z) { Accel acc; bool ret = ttgo->bma->getAccel(acc); x = acc.y; y = acc.x; z = acc.z; return ret; }

This will flip the axis and correct left and right

To move forward it is tilting towards you, I found this better that tilting away from your view to move forward so I haven't bothered further investigating inverting the z