getCrankPosition is a couple degrees off compared to simulator


When I use getCrankPosition() in the simulator directly up returns 0 and down returns 180. On the actual device I am getting around 355 and 175 instead. Is this something that is common on all devices or is mine messed up?

I set the refresh rate to 0 just in case but there wasnt any change.

I'm thinking about adding a way to calibrate the crank in game but it would help to know if its just my device having this problem.

My hardware seems to be pretty solidly on 0 = straight up, 180 = straight down.

Maybe there's an issue with your unit? I don't recall other devs/users reporting something like that.

(If you did need to calibrate, maybe you could read the angle on crankUndocked: it triggers pretty quickly. Although I kind of would think the OS would just do that?)


Thanks for the reply! Good to know. I wont worry over it as much if its just mine but that's a good idea. I'll test it out with a custom offset determined when undocking for now.

1 Like

It's not ideal though, since some people leave their crank out. But if it's just your machine, it doesn't matter so much! Panic Support might be able to answer definitively about your unit.

1 Like

The angle of the magnet in the crank isn't set at the factory, so we calibrate it by checking where it is when the crank is docked. And to avoid misfires if a magnet happens to pass by and trigger the crank "docked" sensor we added a two second debounce there. So, to reset the position try docking the crank, count out a few seconds, then see if it's where you expect.