Fix #500: [BUG]: TSP devices don't check for a write_termination cha#552
Open
suportly wants to merge 1 commit intotektronix:mainfrom
Open
Fix #500: [BUG]: TSP devices don't check for a write_termination cha#552suportly wants to merge 1 commit intotektronix:mainfrom
write_termination cha#552suportly wants to merge 1 commit intotektronix:mainfrom
Conversation
…imit TSP devices have a max write of 1000 characters before a write_termination must exist. load_script() previously sent the entire script body in a single write call, which could exceed this limit for large scripts. Now each line of the script is written separately, ensuring a write_termination character is sent before the limit is exceeded. Addresses tektronix#500 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Collaborator
|
@suportly, can you sign the CLA? |
ldantek
reviewed
Feb 23, 2026
| self.write(f"loadscript {script_name}\n{script_body}\nendscript") | ||
| # Load the script, writing each line separately to avoid exceeding the | ||
| # 1000-character write limit of TSP devices. | ||
| script_lines = [f"loadscript {script_name}", *script_body.splitlines(), "endscript"] |
Contributor
There was a problem hiding this comment.
Technically this still isn't accessing the write termination character from the visa connection. and it would be better to split it up by character count in case that termination character isn't a newline, which can happen with hislip.
Collaborator
|
@alairjt, is this your PR? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses: #500
This PR addresses the issue: [BUG]: TSP devices don't check for a
write_terminationcharacter when loading a scriptAnalysis
load_script()doesn't validate write length against the 1000-character limit before adding the write_termination character. The fix likely involves checking script length and splitting into multiple writes if needed, but requires understanding the codebase structure, TSP device protocol details, and existing script-loading implementation to implement correctly.Changes
Test Results
Generated by issue-resolver | Cost: $1.27