Action-angle variables for dihedral systems on the circle