Fix nzdome for encoder offset, and the fact that it's not using Gray code any more.