Skip to content

Commit

Permalink
[squash] more natural order of building commands
Browse files Browse the repository at this point in the history
  • Loading branch information
wsxrdv committed Dec 6, 2023
1 parent bccc9dc commit f9fdae4
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions scaaml/capture/scope/lecroy/lecroy.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,8 @@ class to use for communication with the scope.
self._scope_communication: Optional[LeCroyCommunication] = None

# Desired settings of the scope
scope_setup_commands = deepcopy(scope_setup_commands)
# Wrap default commands around the custom ones
scope_setup_commands = [
commands = [
{ "command": "COMM_HEADER OFF", },
{ # Use full precision of measurements
"command": "COMM_FORMAT DEF9,WORD,BIN",
Expand All @@ -226,11 +225,10 @@ class to use for communication with the scope.
{ "command": "TRMD SINGLE", }, # Trigger mode
{ "command": "AUTO_CALIBRATE OFF", },
{ "command": "OFFSET 0", }, # Center the trace vertically
] + scope_setup_commands + [ # Custom commands
{"command": "STOP"} # Stop any signal acquisition
]
self._scope_setup_commands: Tuple[Dict[str, Any],
...] = tuple(scope_setup_commands)
commands.extend(deepcopy(scope_setup_commands)) # Custom commands
commands.append({"command": "STOP"}) # Stop any signal acquisition
self._scope_setup_commands: Tuple[Dict[str, Any], ...] = tuple(commands)

# Actual settings of the scope
self._scope_answers: Dict[str, str] = {}
Expand Down

0 comments on commit f9fdae4

Please sign in to comment.