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

Progress bar for Notepad IO #1322

Merged
merged 1 commit into from Jul 30, 2023

Conversation

kallanreed
Copy link
Contributor

This is an attempt to add IO progress reporting for Notepad so it doesn't look hung when doing work.
There's still one long IO operation (the temp file copy) that looks like a hang.
Could add a progress callback on copy_file? I tried a paint hack to write a little warning before copying the file, but it caused an ISR stack overflow??

It doesn't help the edit scenario too much when files start getting large, but it's nice (especially on first open) to see an indicator that the device didn't fault.

Copy link
Member

@gullradriel gullradriel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gullradriel gullradriel merged commit 411f6c0 into portapack-mayhem:next Jul 30, 2023
3 checks passed
@kallanreed kallanreed deleted the notepad_status branch July 31, 2023 15:50
@kallanreed
Copy link
Contributor Author

Loading a 4MB log file after this change, I'm seeing an M0 Guru fault in set_focus_widget when the progress bar reaches the end. The fault occurs if I start the Notepad app first, then press Select to open File Manager, and click on the file (fault occurs when progress bar reaches the end). If I start the File Manager app first, and click on the same file to open it in Notepad, it opens correctly (after the progress bar reaches the end).

Dang. What’s the Guru? SV#8?

@NotherNgineer
Copy link
Contributor

Nevermind the comment about the Guru meditation fault after loading a huge file. It is related to the long file name, not to the progress bar.

@NotherNgineer
Copy link
Contributor

I had been testing the feature to append the date to the file name, and the huge file name is what kills Notepad.
guru-fault

@NotherNgineer
Copy link
Contributor

I've documented it in #1339 (LOWEST PRIORITY).

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.

None yet

3 participants