Commit 9037b88e authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Fixes n_step bug

Showing with 1 addition and 2 deletions
+1 -2
......@@ -91,7 +91,6 @@ class Pwr(PwrAbstract):
if state == 'on':
self.connection.write_register(0x09, 1)
self.current_max(self._current_max)
print(self._current_max)
self._pwr_state = 'on'
self.exec_logger.debug(f'{self.model} is on')
time.sleep(self._pwr_latency) # from pwr specs
......
......@@ -430,7 +430,7 @@ class OhmPiHardware:
sampling_rate = self.rx.sampling_rate
current, voltage = 0., 0.
diff_vab = np.inf
while (k < n_steps) and (diff_vab > diff_vab_lim):
while (k < n_steps) and (diff_vab > diff_vab_lim) and (vab_list[k]>=vab_max):
vabs = []
self._vab_pulses(vab_list[k], sampling_rate=self.rx.sampling_rate, durations=[0.2, 0.2], polarities=[1, -1])
for pulse in range(2):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment