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

Reset temperature and fan values more easy #653

Merged
merged 2 commits into from
May 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ For more info have a look at the [wiki](https://github.com/UnchartedBull/OctoDas

- OctoDash supports printing from your Raspberry and from the printers SD card, if configured in OctoPrint (v1.5.0 and up)
- OctoDash supports .ufp package and PrusaSlicer preview images (v1.5.0 and up)
- To get the best results, you should use a square aspect ration, like `256x256`
- To get the best results, you should use a square aspect ration, like `256x256`
- You can let OctoDash push out and pull in the filament during a filament change, if you setup your feed length correctly. (v1.5.0 and up)
- You can also view the previews during print, if you press on the percentage inside the progress ring (v1.5.0 and up)
- You can press multiple arrows directly after another in the control view. All actions will be executed one after another, even if the prior didn't finish before pressing the button
- The six actions on the right in the control view can be customized. They can either send GCode commands to your printer, restart OctoPrint or your Pi and even open iFrames so you can view your camera
- You can adjust the temperatures in the home screen, by pressing on their icons (v1.4.1 and up)
- You can adjust the temperatures and fan speed in the home screen, by pressing on their icons, if you want to set them to zero, just tap the value once. (v1.4.1 and up)

## Screenshots

Expand Down
9 changes: 6 additions & 3 deletions src/app/printer-status/printer-status.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,18 @@
[matRippleUnbounded]="false">+10
</div>
</div>
<div class="quick-control__controller-value" colspan="2" *ngIf="view === QuickControlView.HOTEND">
<div class="quick-control__controller-value" colspan="2" *ngIf="view === QuickControlView.HOTEND"
(click)="quickControlChangeValue(-1000)" matRipple [matRippleUnbounded]="false">
{{ this.hotendTarget }}
<span class="quick-control__controller-value-unit">°C</span>
</div>
<div class="quick-control__controller-value" colspan="2" *ngIf="view === QuickControlView.HEATBED">
<div class="quick-control__controller-value" colspan="2" *ngIf="view === QuickControlView.HEATBED"
(click)="quickControlChangeValue(-1000)" matRipple [matRippleUnbounded]="false">
{{ this.heatbedTarget }}
<span class="quick-control__controller-value-unit">°C</span>
</div>
<div class="quick-control__controller-value" colspan="2" *ngIf="view === QuickControlView.FAN">
<div class="quick-control__controller-value" colspan="2" *ngIf="view === QuickControlView.FAN"
(click)="quickControlChangeValue(-1000)" matRipple [matRippleUnbounded]="false">
{{ this.fanTarget }}
<span class="quick-control__controller-value-unit">%</span>
</div>
Expand Down
21 changes: 12 additions & 9 deletions src/app/printer-status/printer-status.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,30 +124,33 @@ export class PrinterStatusComponent implements OnInit, OnDestroy {

private changeTemperatureHotend(value: number): void {
this.hotendTarget += value;
if (this.hotendTarget < 0) {
if (this.hotendTarget < -999) {
this.hotendTarget = this.configService.getDefaultHotendTemperature();
} else if (this.hotendTarget < 0) {
this.hotendTarget = 0;
}
if (this.hotendTarget > 999) {
} else if (this.hotendTarget > 999) {
this.hotendTarget = 999;
}
}

private changeTemperatureHeatbed(value: number): void {
this.heatbedTarget += value;
if (this.heatbedTarget < 0) {
if (this.heatbedTarget < -999) {
this.heatbedTarget = this.configService.getDefaultHeatbedTemperature();
} else if (this.heatbedTarget < 0) {
this.heatbedTarget = 0;
}
if (this.heatbedTarget > 999) {
} else if (this.heatbedTarget > 999) {
this.heatbedTarget = 999;
}
}

private changeSpeedFan(value: number): void {
this.fanTarget += value;
if (this.fanTarget < 0) {
if (this.fanTarget < -999) {
this.fanTarget = this.configService.getDefaultFanSpeed();
} else if (this.fanTarget < 0) {
this.fanTarget = 0;
}
if (this.fanTarget > 100) {
} else if (this.fanTarget > 100) {
this.fanTarget = 100;
}
}
Expand Down