Skip to content

Commit

Permalink
Reset temperature and fan values more easy (UnchartedBull#653)
Browse files Browse the repository at this point in the history
* working

* update README
  • Loading branch information
UnchartedBull authored and kantlivelong committed May 5, 2021
1 parent 234f7f7 commit c6f222f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
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

0 comments on commit c6f222f

Please sign in to comment.