Skip to content

Commit 34b667d

Browse files
rounds all SA waveform values
1 parent 7e39c2b commit 34b667d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/navigate/model/devices/APIs/asi/asi_tiger_controller.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,15 +1061,18 @@ def SA_waveform(
10611061
# takes amplitude and offset from navigate and modifies them to how the TG-1000 takes them
10621062
if (waveform % 128 == 3):
10631063
offset = .5*(offset+amplitude)
1064+
10641065
amplitude = amplitude*2
1066+
1067+
print("***", waveform, amplitude, axis, offset, period)
10651068
# TODO: 3 is the address of the GALVO DAC. May need to make this configurable.
1066-
self.send_command(f"3 SAP {axis}={waveform}")
1069+
self.send_command(f"3 SAP {axis}={round(waveform)}")
10671070
self.read_response()
1068-
self.send_command(f"3 SAA {axis}={amplitude}")
1071+
self.send_command(f"3 SAA {axis}={round(amplitude)}")
10691072
self.read_response()
1070-
self.send_command(f"3 SAO {axis}={offset}")
1073+
self.send_command(f"3 SAO {axis}={round(offset)}")
10711074
self.read_response()
1072-
self.send_command(f"3 SAF {axis}={period}")
1075+
self.send_command(f"3 SAF {axis}={round(period)}")
10731076
self.read_response()
10741077

10751078
def SAM(self, axis: str, mode: int) -> None:

0 commit comments

Comments
 (0)