Commit 984e7c6e authored by Sebastien Petitdemange's avatar Sebastien Petitdemange Committed by Cyril Guilloud
Browse files

pi_e753: fixed offset wave start + add 2 helper methods to control wave

parent a85925c7
...@@ -436,10 +436,10 @@ class PI_E753(pi_gcs.Communication, pi_gcs.Recorder, Controller): ...@@ -436,10 +436,10 @@ class PI_E753(pi_gcs.Communication, pi_gcs.Recorder, Controller):
(0.5 * wavelen), (0.5 * wavelen),
) )
else: else:
cmd = b"WAV 1 X SIN_P %d %d %d %d %d %d" % ( cmd = b"WAV 1 X SIN_P %d %f %f %d %d %d" % (
wavelen, wavelen,
+amplitude, +amplitude,
offset, offset - amplitude / 2,
wavelen, wavelen,
0, 0,
(0.5 * wavelen), (0.5 * wavelen),
...@@ -512,3 +512,11 @@ class Axis(axis_module.Axis): ...@@ -512,3 +512,11 @@ class Axis(axis_module.Axis):
yield yield
finally: finally:
self.controller.stop_wave(self) self.controller.stop_wave(self)
def start_wave(self, wavetype, offset, amplitude, nb_cycles, wavelen, wait=False):
self.controller.start_wave(
self, wavetype, offset, amplitude, nb_cycles, wavelen, wait=wait
)
def stop_wave(self):
self.controller.stop_wave(self)
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