To me it looked like the clearance height was the same for all pieces. Is it actually dynamically calculated for each move?
Ah yes clearance height is the same for all pieces, the servo raises the piece to the piece height + the "resting" height. Relevant code can be found here: