-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
loading progress #792
Closed
Closed
loading progress #792
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
39fc865
show process progress
dek3rr ff79075
manager_prepare independence
dek3rr ea9dfa7
Merge to fix tests
dek3rr eb3774f
working commit
dek3rr 710e7ed
Merge remote-tracking branch 'upstream/devel' into subprocessing
dek3rr c067a27
a solution perhaps
dek3rr f808aa7
add makefile
dek3rr 765c5d2
add stdin
dek3rr 09675ae
Merge branch 'subprocessing' of https://github.com/dekerr/openpilot i…
dek3rr 95ddf5a
fix format bugs
dek3rr 7b2aea6
use fgets
dek3rr 72c0ffe
endline fix
dek3rr d10450a
add compiled spinner
dek3rr d2b332a
close stdin
dek3rr 743c676
python changes
dek3rr c38485f
remove unused variable
dek3rr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Empty file.
Empty file.
Binary file not shown.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import os | ||
import subprocess | ||
from common.basedir import BASEDIR | ||
|
||
class Spinner(object): | ||
def __enter__(self): | ||
self.spinner_proc = subprocess.Popen(["./spinner"], stdin=subprocess.PIPE, | ||
cwd=os.path.join(BASEDIR, "selfdrive", "ui", "spinner"), | ||
close_fds=True) | ||
return self | ||
|
||
def update(self, spinner_text): | ||
if os.getenv("PREPAREONLY") is None: | ||
self.spinner_proc.stdin.write(spinner_text + "\n") | ||
|
||
def __exit__(self, type, value, traceback): | ||
self.spinner_proc.stdin.close() | ||
self.spinner_proc.terminate() |
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.
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.
Can we keep it backwards compatible? I'd like to initialize the text from the command line.
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.
I think we can. I'm not sure if it's as simple as adding that code back though. It was a little tricky to get stdin working correctly. I'd like to get ubuntu running again before I start fooling around in C.
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.
That would be nice. That keeps the spinner versatile and easy to call from a shells script.