Incorrect position reported by playdate.getCrankPosition

Expected results
playdate.getCrankPosition should always report the correct position of the physical crank on the device.

When the physical crank is positioned perfectly up, for instance, playdate.getCrankPosition should always return 0. When the physical crank is positioned perfectly towards the front of the playdate, playdate.getCrankPosition should always return 270. Etc.

Reality
Occasionally there is a disconnect between the physical crank position and the position reported by playdate.getCrankPosition. Pointing the crank up will return 174 instead of 0, for instance.

The degree of miscalibration is not consistent. Sometimes when this happens, it appears to be off by +82 degrees or another time it may be off by -17 degrees, etc.

How to mitigate
Unfortunately, the user must first recognize that there is a disconnect with the physical crank position versus the position being reported in-game. This is sometimes not immediately apparent, as it may seem like the game just has a very confusing control scheme.

After recognizing the miscalibration, the user can fix it by docking and then undocking the physical crank. This will seemingly re-calibrate the crank / system and playdate.getCrankPosition will report the expected position again.

How to Reproduce
Unfortunately, this is an intermittent issue and there does not seem to be a perfectly repeatable method to reproduce.

This has happened to me many times playing Whitewater Wipeout and when developing a personal project (which uses playdate.getCrankPosition to point an in-game character in specific directions).

The issue seems to occur more often after coming back from a Lock Screen or a pause screen or sometimes when plugging / unplugging the USB... however I have not found a consistent way to reproduce.

Just hoping to get this on the radar because I have surprisingly not seen any bug report pop up about it yet.

Did you update to 1.11.1? I'm not positive, but I think this exact rare bug was fixed in that release.

Yea, still happening. Occurred for me twice yesterday after updating & I don't see anything in the changelog related to this.

you're right that it's not listed in the changelog, but it was mentioned in the tweet that announced the update:

not sure if it is the same misalignment bug that you're experiencing though

Yea, doesn't seem to be. I'll capture some video next time it occurs.

Someone just made a reddit post about this issue last night - there are some additional accounts of other people experiencing the issue as well: Reddit - Dive into anything

Looks like this can be replicated reliably with some "rouge magnetic waves" - especially those generated by the Playdate's own case. Magnetic action from the case can cause a phantom-docking such that when the crank is moved again, it is recalibrated and assumes whatever position it's currently in is "up". This whole phantom-docking and recalibration can happen near-instantaneously, and will be imperceptible to a player if the volume is down (if the volume is loud enough, though, the player will hear the crank docking/undocking chimes).

I am not certain that rouge magnetic waves are responsible for every single occurrence of this issue, however it is certainly a way to reproduce reliably.

"Rusty Chan" from the discord has an especially sensitive unit / strong case magnet. You can see this in the video here: Discord

My case / unit is not as sensitive as Rusty Chan's, however removing the case and moving it around the back of the Playdate causes a similar phantom docking for me.

Possible Solution
The crank can only truly be docked when the crank position is "up". Perhaps the system should not even register a "docking" event if the crank position is not near 0 degrees. This could, at the very least, eliminate the most egregious cases of this bug.

2 Likes

Wow, excellent detective work! I don't think that ever would have crossed my mind, but it's a pretty obvious design flaw in retrospect.

Unfortunately there's a chicken-and-egg problem with ignoring the docking signal if it isn't in the up position, since we don't know where up is until it's docked. One easy thing we can do is require the crank to be docked for some amount of time before resetting its zero position. If that's not enough we could remove the automatic calibration entirely and change it to a manual process in Settings.

1 Like

Interesting. I assumed the recalibration was happening upon undocking, rather than docking.

I'd be happy with either of your solutions and offer a third for consideration: if the device is Locked and the crank is docked, then recalibrate on unLocking. This would still allow the user to easily mitigate this issue if it happens to come up and should reduce the occurrence of this happening in-game. Plus, it keeps the whole process automatic and out of mind.

I've had this a few times, though I don't have a case. I do use a magnetic desk mount.

1 Like

On second thought, this wouldn't work for users who undock before unlocking.

Regardless, I'm glad this is on your radar now & look forward to whatever solution y'all come up with.

I've also had incorrect position reported after using the device as a controller for the Simulator.

1 Like