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

Add sdcard support #563

Merged
merged 5 commits into from
Apr 14, 2020

Conversation

harleyg321
Copy link
Contributor

Adds more complete support for browsing/printing from the sdcard in octodash.

If there are files available from both local and sdcard, then a fake top level folder is shown to select between local and sdcard. Browsing inside those folders then continues as normal and the path starts with either '/local' or '/sdcard'.

If there are only local or sdcard files, then only the relevant folder is shown. For example if sdcard support is not enabled in octoprint, then you will just see a list of local files as usual. Only difference is the path would now show '/local' at the start instead of '/'. Browsing up to '/' is prevented to keep the user confined to local files.

Also cleans up some of the changes in my previous sdcard commit (#542). Rather than passing through null values to the view, if certain values are not available then they are simply not added to the object. The view then checks if the property exists before displaying certain elements that may not always be available.

Resolves #481

@UnchartedBull
Copy link
Owner

That looks quite impressing. Currently on mobile, I’ll make sure to check this out in detail tomorrow!

src/app/job-status/job-status.component.html Show resolved Hide resolved
Comment on lines 33 to 50
<span *ngIf="job.hasOwnProperty('estimatedPrintTime') && job.hasOwnProperty('estimatedEndTime')">
<fa-icon [icon]="['fas', 'clock']" class="job-info__print-details-icon"></fa-icon>
<span class="job-info__print-details-value">
{{ job.estimatedPrintTime.value }}{{ job.estimatedPrintTime.unit }}
</span>
<span class="job-info__print-details-finish-state">
- will finish ~{{ job.estimatedEndTime }}
</span>
<br />
</span>
<br />
<fa-icon [icon]="['fas', 'dharmachakra']" class="job-info__print-details-icon"></fa-icon>
<span class="job-info__print-details-value">
{{ job.filamentAmount }}g
</span>
<span class="job-info__print-details-finish-state">
filament will be used
<span *ngIf="job.hasOwnProperty('filamentAmount')">
<fa-icon [icon]="['fas', 'dharmachakra']" class="job-info__print-details-icon"></fa-icon>
<span class="job-info__print-details-value">
{{ job.filamentAmount }}g
</span>
<span class="job-info__print-details-finish-state">
filament will be used
</span>
Copy link
Owner

Choose a reason for hiding this comment

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

this will just be a big empty space if no GCode Analysis is available right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, it just hides the estimated completion time and filament weight required since they aren't available, which does leave quite a bit of empty space.

src/app/files.service.ts Outdated Show resolved Hide resolved
@UnchartedBull UnchartedBull merged commit 840d164 into UnchartedBull:master Apr 14, 2020
@spiff72
Copy link

spiff72 commented Apr 18, 2020

Just noticed this when searching issues for "printing with sd card". I am printing some stuff now from SD card because I now think I get better print quality on fast prints (due to the limitations of the serial interface between pi and printer).

I get a constant flashing error dialog stating "Can't retrieve job status", and another message pops up very briefly while it is doing this. I recorded it with my phone in slow motion and figured out that it states "can't retrieve thumbnail" in this short bursts.

Will this fix this issue?

@spiff72
Copy link

spiff72 commented Apr 18, 2020

Note: It also messes up formatting of the temps and fan speed. because it says "sd" at the bottom.
20200418_173631

@harleyg321
Copy link
Contributor Author

Yes should do, that issue was first fixed in #542 and then this PR refines that a bit further. Both merged after v1.4.1 though so you should get the fixes in the next release.

Though I didn't get any issues with the 'printing from sd' message when testing on the official raspberry pi touchscreen. Could you create a new issue for that please, including which screen you are using and its resolution and/or aspect ratio if known, so we can look into that a bit more.

@harleyg321 harleyg321 deleted the feature/sdcard_support branch April 18, 2020 21:58
@spiff72
Copy link

spiff72 commented Apr 18, 2020

Sure - here is the info on my screen:
My display resolution is 1024 x 600 (7" screen).
The screen is this one:
https://www.amazon.com/gp/product/B07L6WT77H/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

@spiff72
Copy link

spiff72 commented Apr 18, 2020

I had another issue post with this same screen before (regarding the temperature formatting being "off" when bed temp was 100 or higher).
#235

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.

Unable to view SD CARD files plugged into Prusa MK3S
3 participants