-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ebb: Poll the button to pause/resume the plot #213
base: main
Are you sure you want to change the base?
Conversation
After sending every point to the plotter, query the status of the physical button and pause if the operator has pressed it. If so, busy poll for it to be released and pressed again to resume the plot. Also report the EBB firmware version on startup.
Maybe calling firmware version in the constructor is breaking the test due to the serial port mocking? I'll try moving it to the |
Guess that was it. I can squash these into one commit if you prefer. |
Closes #179 @osresearch Mind opening this against https://github.com/alexrudd2/saxi? |
@@ -108,6 +108,11 @@ export class EBB { | |||
} | |||
} | |||
|
|||
/** Send the new General Query command to get limit switch, button and fifo status */ | |||
public async queryGeneral(): Promise<number> { | |||
return parseInt(await this.query("QG"), 16); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm understanding correctly, this is only available in the 3.0
firmware, right?
If so, this should probably check the firmware version first:
Line 23 in 31f59ac
private cachedFirmwareVersion: [number, number, number] | undefined = undefined; |
After sending every point to the plotter, query the status of the physical button and pause if the operator has pressed it. If so, busy poll for it to be released and pressed again to resume the plot.
Also report the EBB firmware version on startup.