Added auto-ranging support to magnetometer