update range and sweep direction. fix get_volt function