Skip to content

Commit cc9ad27

Browse files
committed
Fix voltmeter autorange never increasing range
1 parent 2ae3612 commit cc9ad27

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

PSL/achan.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def waveform_table(self) -> np.ndarray:
231231
232232
The table contains 512 values.
233233
"""
234-
# A form of amplitude control. Max PWM duty cycle out of 512 clock cycles.
234+
# A form of amplitude control. Max PWM duty cycle out of 512 clock cycles.
235235
return self._range_normalize(self._waveform_table, 511)
236236

237237
@waveform_table.setter

PSL/multimeter.py

+1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ def _measure_voltage(self, channel: str) -> float:
8787

8888
def _voltmeter_autorange(self, channel: str) -> float:
8989
if channel in ("CH1", "CH2"):
90+
self._set_gain(channel, 1) # Reset gain.
9091
voltage = self._measure_voltage(channel)
9192

9293
for gain in GAIN_VALUES[::-1]:
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[[[2], [8], [1], [0], [2], [8], [2], [0], [2], [10], [3], [2], [8], [1], [3]], [[], [], [], [1], [], [], [], [1], [], [], [111, 153, 1], [], [], [], [1]]]
1+
[[[2], [8], [1], [0], [2], [8], [2], [0], [2], [8], [1], [0], [2], [10], [3], [2], [8], [1], [7]], [[], [], [], [1], [], [], [], [1], [], [], [], [1], [], [], [71, 128, 1], [], [], [], [1]]]

0 commit comments

Comments
 (0)