Skip to content
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

Don't redraw scan chart before first scan #957

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

argilo
Copy link
Contributor

@argilo argilo commented Dec 12, 2024

If "Show Scan Plot" is toggled on before the first scan has completed, or the scan plot is open and the user navigates away from the Auto-RX tab and back before the first scan has completed, then an error occurs and the scan plot renders incorrectly:

Screenshot from 2024-12-12 11-28-47

Screenshot from 2024-12-12 11-28-27

This happens because scan_chart_latest_timestamp is not defined until the first scan has completed, but redraw_scan_chart (which is invoked when the scan chart is opened, or when the user navigates back from another tab) attempts to use it anyway.

To fix the problem, I've added a check so that redraw_scan_chart exits early if scan_chart_latest_timestamp is not yet defined.

@darksidelemm darksidelemm merged commit 745d936 into projecthorus:testing Dec 12, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants