Skip to content

Commit 9682b5b

Browse files
committed
feat(Heaters): adds PID_CALIBRATE support
Signed-off-by: Pedro Lamas <[email protected]>
1 parent 7fd6a31 commit 9682b5b

File tree

7 files changed

+173
-16
lines changed

7 files changed

+173
-16
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<template>
2+
<v-menu
3+
v-model="open"
4+
transition="slide-y-transition"
5+
:position-x="positionX"
6+
:position-y="positionY"
7+
min-width="180"
8+
absolute
9+
right
10+
>
11+
<v-list dense>
12+
<v-list-item @click="$emit('pid-calibrate', heater)">
13+
<v-list-item-icon>
14+
<v-icon>
15+
$pidCalibrate
16+
</v-icon>
17+
</v-list-item-icon>
18+
<v-list-item-content>
19+
<v-list-item-title>{{ $t('app.chart.label.pid_calibration') }}</v-list-item-title>
20+
</v-list-item-content>
21+
</v-list-item>
22+
</v-list>
23+
</v-menu>
24+
</template>
25+
26+
<script lang="ts">
27+
import { Component, Vue, Prop, VModel } from 'vue-property-decorator'
28+
import type { Heater } from '@/store/printer/types'
29+
30+
@Component({})
31+
export default class HeaterContextMenu extends Vue {
32+
@VModel({ type: Boolean })
33+
open?: boolean
34+
35+
@Prop({ type: Number, required: true })
36+
readonly positionX!: number
37+
38+
@Prop({ type: Number, required: true })
39+
readonly positionY!: number
40+
41+
@Prop({ type: Object, required: true })
42+
readonly heater!: Heater
43+
}
44+
</script>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<template>
2+
<app-dialog
3+
v-model="open"
4+
:title="$t('app.chart.title.pid_calibrate', { name: heater.prettyName })"
5+
max-width="320"
6+
@save="handleSave"
7+
>
8+
<v-card-text>
9+
<v-text-field
10+
v-model.number="targetTemperature"
11+
autofocus
12+
outlined
13+
:label="$t('app.chart.label.target_temperature')"
14+
:rules="[
15+
$rules.required,
16+
$rules.numberValid,
17+
$rules.numberGreaterThan(0)
18+
]"
19+
required
20+
/>
21+
</v-card-text>
22+
</app-dialog>
23+
</template>
24+
25+
<script lang="ts">
26+
import type { Heater } from '@/store/printer/types'
27+
import { Component, Vue, VModel, Prop } from 'vue-property-decorator'
28+
29+
@Component({})
30+
export default class HeaterPidCalibrateDialog extends Vue {
31+
targetTemperature = 100
32+
33+
@VModel({ type: Boolean })
34+
open?: boolean
35+
36+
@Prop({ type: Object, required: true })
37+
readonly heater!: Heater
38+
39+
handleSave () {
40+
this.$emit('save', this.heater, this.targetTemperature)
41+
this.open = false
42+
}
43+
}
44+
</script>

src/components/widgets/thermals/TemperatureTargets.vue

Lines changed: 73 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
<tr
2929
v-for="item in heaters"
3030
:key="item.key"
31+
@click="handleHeaterRowClick(item, $event)"
32+
@contextmenu.prevent="handleHeaterRowClick(item, $event)"
3133
>
3234
<td>
3335
<v-icon
@@ -41,7 +43,7 @@
4143
<span
4244
:class="{ 'active': isLegendSelected(item) }"
4345
class="legend-item toggle"
44-
@click="legendClick(item)"
46+
@click.stop="legendClick(item)"
4547
>
4648
{{ item.prettyName }}
4749
</span>
@@ -50,7 +52,7 @@
5052
<span
5153
:class="{ 'active': isLegendSelected(item, '#power') }"
5254
class="legend-item toggle"
53-
@click="legendClick(item, '#power')"
55+
@click.stop="legendClick(item, '#power')"
5456
>
5557
<span v-if="item.power <= 0 && item.target <= 0">off</span>
5658
<span v-if="item.target > 0">
@@ -65,7 +67,7 @@
6567
<span
6668
:class="{ 'active': isLegendSelected(item, '#power') }"
6769
class="legend-item toggle"
68-
@click="legendClick(item, '#power')"
70+
@click.stop="legendClick(item, '#power')"
6971
>
7072
<span>{{ getRateOfChange(item) }}<small>&deg;C/s</small></span>
7173
</span>
@@ -112,7 +114,7 @@
112114
<span
113115
:class="{ 'active': isLegendSelected(item) }"
114116
class="legend-item toggle"
115-
@click="legendClick(item)"
117+
@click.stop="legendClick(item)"
116118
>
117119
{{ item.prettyName }}
118120
</span>
@@ -122,7 +124,7 @@
122124
v-if="item.speed"
123125
:class="{ 'active':isLegendSelected(item, '#speed') }"
124126
class="legend-item toggle"
125-
@click="legendClick(item, '#speed')"
127+
@click.stop="legendClick(item, '#speed')"
126128
>
127129
<span v-if="item.speed > 0 && (item.target > 0 || !item.target)">
128130
{{ (item.speed * 100).toFixed(0) }}<small>%</small>
@@ -140,7 +142,7 @@
140142
<span
141143
:class="{ 'active': isLegendSelected(item, '#power') }"
142144
class="legend-item toggle"
143-
@click="legendClick(item, '#power')"
145+
@click.stop="legendClick(item, '#power')"
144146
>
145147
<span>{{ getRateOfChange(item) }}<small>&deg;C/s</small></span>
146148
</span>
@@ -194,7 +196,7 @@
194196
<span
195197
:class="{ 'active': isLegendSelected(item) }"
196198
class="legend-item toggle"
197-
@click="legendClick(item)"
199+
@click.stop="legendClick(item)"
198200
>
199201
{{ item.prettyName }}
200202
</span>
@@ -293,12 +295,30 @@
293295
</tr>
294296
</tbody>
295297
</v-simple-table>
298+
299+
<heater-context-menu
300+
v-if="contextMenuState.open"
301+
v-model="contextMenuState.open"
302+
:heater="contextMenuState.heater"
303+
:position-x="contextMenuState.x"
304+
:position-y="contextMenuState.y"
305+
@pid-calibrate="handlePidCalibrateDialog"
306+
/>
307+
308+
<heater-pid-calibrate-dialog
309+
v-if="heaterPidCalibrateDialog.open"
310+
v-model="heaterPidCalibrateDialog.open"
311+
:heater="heaterPidCalibrateDialog.heater"
312+
@save="handlePidCalibrate"
313+
/>
296314
</div>
297315
</template>
298316

299317
<script lang="ts">
300318
import { Component, Mixins } from 'vue-property-decorator'
301319
import TemperaturePresetsMenu from './TemperaturePresetsMenu.vue'
320+
import HeaterContextMenu from './HeaterContextMenu.vue'
321+
import HeaterPidCalibrateDialog from './HeaterPidCalibrateDialog.vue'
302322
import StateMixin from '@/mixins/state'
303323
import type { Fan, Heater, Sensor } from '@/store/printer/types'
304324
import { takeRightWhile } from 'lodash-es'
@@ -307,12 +327,26 @@ import { encodeGcodeParamValue } from '@/util/gcode-helpers'
307327
308328
@Component({
309329
components: {
310-
TemperaturePresetsMenu
330+
TemperaturePresetsMenu,
331+
HeaterContextMenu,
332+
HeaterPidCalibrateDialog
311333
}
312334
})
313335
export default class TemperatureTargets extends Mixins(StateMixin) {
314-
get heaters () {
315-
return this.$store.getters['printer/getHeaters']
336+
contextMenuState: any = {
337+
open: false,
338+
x: 0,
339+
y: 0,
340+
heater: null
341+
}
342+
343+
heaterPidCalibrateDialog: any = {
344+
heater: null,
345+
open: false
346+
}
347+
348+
get heaters (): Heater[] {
349+
return this.$store.getters['printer/getHeaters'] as Heater[]
316350
}
317351
318352
get fans () {
@@ -464,6 +498,35 @@ export default class TemperatureTargets extends Mixins(StateMixin) {
464498
}
465499
})
466500
}
501+
502+
handleHeaterRowClick (item: Heater, event: MouseEvent) {
503+
if (this.contextMenuState.open) {
504+
this.contextMenuState.open = false
505+
506+
if (event.type !== 'contextmenu') {
507+
return
508+
}
509+
}
510+
511+
// Open the context menu
512+
this.contextMenuState.x = event.clientX
513+
this.contextMenuState.y = event.clientY
514+
this.contextMenuState.heater = item
515+
this.$nextTick(() => {
516+
this.contextMenuState.open = true
517+
})
518+
}
519+
520+
handlePidCalibrateDialog (heater: Heater) {
521+
this.heaterPidCalibrateDialog = {
522+
heater,
523+
open: true
524+
}
525+
}
526+
527+
handlePidCalibrate (heater: Heater, targetTemperature: number) {
528+
this.sendGcode(`PID_CALIBRATE HEATER=${encodeGcodeParamValue(heater.name)} TARGET=${targetTemperature}`)
529+
}
467530
}
468531
</script>
469532

src/globals.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ import {
154154
mdiToothbrush,
155155
mdiUsb,
156156
mdiMagnet,
157-
mdiFileDocument
157+
mdiFileDocument,
158+
mdiSineWave
158159
} from '@mdi/js'
159160

160161
const mdiFilament = 'M 12 2 C 11.811244 2.0027 11.62182 2.01009 11.433594 2.0234375 C 11.245368 2.0367892 11.058338 2.0560871 10.871094 2.0800781 C 10.528376 2.1223311 10.188076 2.1823072 9.8515625 2.2597656 C 9.4050859 2.3584685 8.9659029 2.4876777 8.5371094 2.6464844 C 8.2433457 2.7507726 7.9546177 2.8687402 7.671875 3 L 7.6699219 3 C 7.2200923 3.2179359 6.7872406 3.4692919 6.375 3.7519531 C 6.1149723 3.9281592 5.8633915 4.1165194 5.6210938 4.3164062 C 5.2734281 4.6063526 4.9458497 4.9195737 4.640625 5.2539062 C 4.4299712 5.4884886 4.2305306 5.7329027 4.0429688 5.9863281 C 4.0007188 6.0418801 3.9590487 6.0978726 3.9179688 6.1542969 C 3.7241339 6.4206091 3.543575 6.6963363 3.3769531 6.9804688 C 3.3651531 7.0019097 3.3534369 7.0233949 3.3417969 7.0449219 C 2.9828732 7.6642764 2.691488 8.3203821 2.4726562 9.0019531 C 2.3383154 9.4325109 2.233258 9.8716656 2.1582031 10.316406 C 2.1085032 10.625133 2.0733024 10.936022 2.0527344 11.248047 L 2.0527344 11.25 L 2.0527344 11.251953 L 2.0527344 11.253906 L 2.0527344 11.255859 C 2.0258944 11.502973 2.00832 11.751383 2 12 C 2.000879 12.252257 2.0113 12.504391 2.03125 12.755859 L 2.0332031 12.767578 C 2.0566631 13.076458 2.0944624 13.384082 2.1464844 13.689453 C 2.2214943 14.129536 2.3258985 14.564103 2.4589844 14.990234 C 2.5675343 15.334756 2.6946769 15.673142 2.8398438 16.003906 L 2.8457031 16.017578 L 2.8535156 16.03125 C 2.9986205 16.362102 3.1616911 16.684839 3.3417969 16.998047 L 3.34375 17 C 3.5265728 17.317394 3.7267926 17.624495 3.9433594 17.919922 C 4.1600882 18.215026 4.3928602 18.498004 4.640625 18.767578 C 4.9426097 19.096141 5.2662503 19.404121 5.609375 19.689453 C 5.8509948 19.889955 6.1019244 20.078968 6.3613281 20.255859 C 6.7778367 20.540458 7.2152833 20.793132 7.6699219 21.011719 L 7.671875 21.011719 C 7.9543247 21.147608 8.2431027 21.27014 8.5371094 21.378906 C 8.956542 21.533797 9.3858911 21.660384 9.8222656 21.757812 L 9.8242188 21.757812 C 10.165943 21.833832 10.511518 21.891861 10.859375 21.931641 C 10.885405 21.935041 10.91144 21.938206 10.9375 21.941406 C 11.290376 21.979776 11.645044 21.99934 12 22 C 12.188756 21.9973 12.37818 21.98991 12.566406 21.976562 C 12.754632 21.963215 12.941662 21.943912 13.128906 21.919922 C 13.471624 21.877672 13.811924 21.817693 14.148438 21.740234 C 14.594914 21.641534 15.034096 21.512323 15.462891 21.353516 C 15.756653 21.249229 16.045381 21.131261 16.328125 21 L 16.330078 21 C 16.779908 20.782064 17.21276 20.530708 17.625 20.248047 C 17.885029 20.07184 18.136608 19.883481 18.378906 19.683594 C 18.726573 19.393647 19.054149 19.080425 19.359375 18.746094 C 19.570029 18.511511 19.76947 18.267097 19.957031 18.013672 C 19.999281 17.958122 20.040951 17.902127 20.082031 17.845703 C 20.275866 17.57939 20.456425 17.303665 20.623047 17.019531 C 20.634847 16.998091 20.646563 16.976598 20.658203 16.955078 C 21.017127 16.335724 21.308511 15.679617 21.527344 14.998047 C 21.661685 14.567489 21.766742 14.128334 21.841797 13.683594 C 21.891497 13.374867 21.926698 13.063978 21.947266 12.751953 L 21.947266 12.75 L 21.947266 12.748047 L 21.947266 12.746094 L 21.947266 12.744141 C 21.974096 12.496824 21.99169 12.248617 22 12 C 21.999121 11.747743 21.9887 11.495609 21.96875 11.244141 L 21.966797 11.232422 C 21.943337 10.923542 21.905537 10.615918 21.853516 10.310547 C 21.778506 9.8704641 21.6741 9.4358974 21.541016 9.0097656 C 21.432464 8.6652447 21.305324 8.3268573 21.160156 7.9960938 L 21.154297 7.9824219 L 21.146484 7.96875 C 21.001384 7.6379017 20.838309 7.315161 20.658203 7.0019531 L 20.65625 7 C 20.47338 6.6826091 20.273207 6.375505 20.056641 6.0800781 C 19.839912 5.7849746 19.60714 5.5019958 19.359375 5.2324219 C 19.05739 4.903859 18.73375 4.5958783 18.390625 4.3105469 C 18.149005 4.1100449 17.898076 3.921033 17.638672 3.7441406 C 17.222163 3.459542 16.784717 3.2068671 16.330078 2.9882812 L 16.328125 2.9882812 C 16.045675 2.8523915 15.756897 2.72986 15.462891 2.6210938 C 15.043458 2.4662029 14.614109 2.3396166 14.177734 2.2421875 L 14.175781 2.2421875 C 13.834058 2.1661636 13.488482 2.1081404 13.140625 2.0683594 C 13.114595 2.0649994 13.08856 2.0617537 13.0625 2.0585938 C 12.709629 2.0202237 12.354956 2.0006604 12 2 z M 10.701172 4.25 L 10.957031 4.3984375 L 11.066406 4.4609375 L 11.132812 4.5 L 11.566406 4.75 L 11.566406 5.75 L 11.132812 6 L 10.875 6.1484375 C 10.874877 6.1490598 10.875123 6.1497684 10.875 6.1503906 L 10.701172 6.25 L 10.267578 6 L 9.8359375 5.75 L 9.8359375 4.75 L 10.103516 4.5957031 L 10.701172 4.25 z M 13.298828 4.25 L 14.164062 4.75 L 14.164062 5.75 L 13.298828 6.25 L 12.433594 5.75 L 12.433594 4.75 L 13.298828 4.25 z M 8.8398438 4.6757812 L 8.96875 4.75 L 8.96875 5.75 L 8.5371094 6 L 8.1035156 6.25 L 7.2382812 5.75 L 7.2382812 5.578125 C 7.7356888 5.2168041 8.2730923 4.9140239 8.8398438 4.6757812 z M 15.160156 4.6757812 C 15.726909 4.914025 16.264309 5.2168044 16.761719 5.578125 L 16.761719 5.75 L 16.103516 6.1308594 L 15.896484 6.25 L 15.03125 5.75 L 15.03125 4.75 L 15.160156 4.6757812 z M 6.8046875 6.5 L 7.6699219 7 L 7.6699219 8 L 6.8046875 8.5 L 6.7011719 8.4394531 L 5.9394531 8 L 5.9394531 7.75 L 5.9394531 7 L 6.8046875 6.5 z M 9.4023438 6.5 L 10.267578 7 L 10.267578 7.8398438 L 10.267578 8 L 10.140625 8.0742188 L 9.8339844 8.25 L 9.4023438 8.5 L 8.9707031 8.25 L 8.5371094 8 L 8.5371094 7 L 8.96875 6.75 L 9.4023438 6.5 z M 12 6.5 L 12.865234 7 L 12.865234 7.75 L 12.865234 8 L 12.744141 8.0703125 C 12.743508 8.0701923 12.74282 8.0704324 12.742188 8.0703125 C 12.497492 8.0239396 12.249054 8.0001594 12 8 C 11.754037 8.00282 11.508857 8.0283149 11.267578 8.0761719 L 11.134766 8 L 11.134766 7.25 L 11.134766 7 L 11.896484 6.5605469 L 12 6.5 z M 14.597656 6.5 L 15.029297 6.75 L 15.462891 7 L 15.462891 8 L 14.597656 8.5 L 14.166016 8.25 L 13.732422 8 L 13.732422 7 L 14.166016 6.75 L 14.597656 6.5 z M 17.195312 6.5 L 17.298828 6.5605469 L 18.060547 7 L 18.060547 7.25 L 18.060547 8 L 17.298828 8.4394531 L 17.195312 8.5 L 16.330078 8 L 16.330078 7 L 17.195312 6.5 z M 5.5058594 8.75 L 6.3710938 9.25 L 6.3710938 10.25 L 5.5058594 10.75 L 4.640625 10.25 L 4.640625 9.25 L 5.5058594 8.75 z M 8.1035156 8.75 L 8.96875 9.25 L 8.96875 9.390625 C 8.6470443 9.7691664 8.398667 10.204324 8.2363281 10.673828 L 8.1035156 10.75 L 7.5449219 10.427734 L 7.2382812 10.25 L 7.2382812 9.25 L 8.1035156 8.75 z M 15.896484 8.75 L 16.761719 9.25 L 16.761719 10.25 L 16.328125 10.5 L 15.896484 10.75 L 15.775391 10.679688 C 15.6258 10.253096 15.401287 9.8581752 15.119141 9.5058594 C 15.089259 9.4685462 15.062498 9.4288507 15.03125 9.3925781 L 15.03125 9.390625 L 15.03125 9.25 L 15.462891 9 L 15.896484 8.75 z M 18.494141 8.75 L 19.359375 9.25 L 19.359375 10.25 L 18.494141 10.75 L 18.287109 10.630859 L 17.628906 10.25 L 17.628906 9.25 L 18.494141 8.75 z M 12 10 C 13.104568 10 14 10.895432 14 12 C 14 13.035532 13.213589 13.887814 12.205078 13.990234 C 12.137844 13.997062 12.069035 14 12 14 C 11.792894 14 11.592174 13.968592 11.404297 13.910156 C 11.028542 13.793284 10.701584 13.567814 10.457031 13.271484 C 10.416272 13.222096 10.377738 13.172341 10.341797 13.119141 C 10.126148 12.799939 10 12.414213 10 12 C 10 11.930965 10.002938 11.862156 10.009766 11.794922 C 10.037078 11.525986 10.119032 11.273584 10.242188 11.046875 C 10.396132 10.763489 10.614858 10.521504 10.880859 10.341797 C 10.93406 10.305855 10.990198 10.272976 11.046875 10.242188 C 11.330261 10.088243 11.654823 10 12 10 z M 4.2070312 11 L 5.0722656 11.5 L 5.0722656 11.75 L 5.0722656 12.5 L 4.2070312 13 L 4.0722656 12.921875 C 4.0304257 12.616234 4.0063 12.308428 4 12 C 4.00315 11.845786 4.0113888 11.690819 4.0234375 11.537109 C 4.0354862 11.383399 4.0513406 11.230945 4.0722656 11.078125 L 4.2070312 11 z M 6.8046875 11 L 7.2363281 11.25 L 7.6699219 11.5 L 7.6699219 12.5 L 6.8046875 13 L 6.7011719 12.939453 L 5.9394531 12.5 L 5.9394531 11.5 L 6.7011719 11.060547 L 6.8046875 11 z M 17.195312 11 L 17.298828 11.060547 L 18.060547 11.5 L 18.060547 12.5 L 17.298828 12.939453 L 17.195312 13 L 16.763672 12.75 L 16.330078 12.5 L 16.330078 11.5 L 17.195312 11 z M 19.792969 11 L 19.927734 11.078125 C 19.969574 11.383766 19.9937 11.691572 20 12 C 19.9937 12.308428 19.969584 12.616234 19.927734 12.921875 L 19.792969 13 L 18.927734 12.5 L 18.927734 12.25 L 18.927734 11.5 L 19.792969 11 z M 5.5058594 13.25 L 5.7128906 13.369141 L 6.3710938 13.75 L 6.3710938 14.75 L 5.5058594 15.25 L 4.640625 14.75 L 4.640625 13.75 L 5.5058594 13.25 z M 8.1035156 13.25 L 8.2246094 13.320312 C 8.3742003 13.746904 8.5987134 14.141825 8.8808594 14.494141 C 8.9107409 14.531454 8.9375015 14.571149 8.96875 14.607422 C 8.9690848 14.607816 8.968415 14.608981 8.96875 14.609375 L 8.96875 14.75 L 8.5371094 15 L 8.1035156 15.25 L 7.2382812 14.75 L 7.2382812 13.75 L 7.671875 13.5 L 8.1035156 13.25 z M 15.896484 13.25 L 16.455078 13.572266 L 16.761719 13.75 L 16.761719 14.75 L 15.896484 15.25 L 15.03125 14.75 L 15.03125 14.609375 C 15.288819 14.306302 15.495308 13.965789 15.652344 13.601562 C 15.6928 13.511265 15.729958 13.419415 15.763672 13.326172 L 15.896484 13.25 z M 18.494141 13.25 L 19.359375 13.75 L 19.359375 14.75 L 18.494141 15.25 L 17.628906 14.75 L 17.628906 13.75 L 18.494141 13.25 z M 6.8046875 15.5 L 7.6699219 16 L 7.6699219 17 L 6.8046875 17.5 L 6.7011719 17.439453 L 5.9394531 17 L 5.9394531 16.75 L 5.9394531 16 L 6.7011719 15.560547 L 6.8046875 15.5 z M 9.4023438 15.5 L 9.8339844 15.75 L 10.267578 16 L 10.267578 17 L 9.8339844 17.25 L 9.4023438 17.5 L 8.9707031 17.25 L 8.5371094 17 L 8.5371094 16.25 L 8.5371094 16 L 8.96875 15.75 L 8.9707031 15.75 L 9.4023438 15.5 z M 14.597656 15.5 L 15.029297 15.75 L 15.462891 16 L 15.462891 17 L 15.03125 17.25 L 14.597656 17.5 L 13.732422 17 L 13.732422 16.160156 L 13.732422 16 L 13.859375 15.925781 L 14.166016 15.75 L 14.597656 15.5 z M 17.195312 15.5 L 17.298828 15.560547 L 18.060547 16 L 18.060547 16.25 L 18.060547 17 L 17.195312 17.5 L 16.330078 17 L 16.330078 16 L 17.195312 15.5 z M 12.732422 15.923828 L 12.865234 16 L 12.865234 16.75 L 12.865234 17 L 12.103516 17.439453 L 12 17.5 L 11.134766 17 L 11.134766 16 L 11.255859 15.929688 C 11.256492 15.929808 11.25718 15.929568 11.257812 15.929688 C 11.502508 15.976059 11.750946 15.99984 12 16 C 12.122981 15.9986 12.244987 15.991227 12.367188 15.978516 C 12.489388 15.965806 12.611782 15.947758 12.732422 15.923828 z M 8.1035156 17.75 L 8.96875 18.25 L 8.96875 19.25 L 8.8398438 19.324219 C 8.2730923 19.085975 7.7356888 18.783196 7.2382812 18.421875 L 7.2382812 18.25 L 7.8964844 17.869141 L 8.1035156 17.75 z M 10.701172 17.75 L 11.566406 18.25 L 11.566406 19.25 L 10.701172 19.75 L 9.8359375 19.25 L 9.8359375 18.25 L 10.701172 17.75 z M 13.298828 17.75 L 13.732422 18 L 14.164062 18.25 L 14.164062 19.25 L 13.896484 19.404297 L 13.298828 19.75 L 13.042969 19.601562 L 12.867188 19.5 L 12.433594 19.25 L 12.433594 18.25 L 12.867188 18 L 13.125 17.851562 C 13.125123 17.85094 13.124877 17.850232 13.125 17.849609 L 13.298828 17.75 z M 15.896484 17.75 L 16.761719 18.25 L 16.761719 18.421875 C 16.264309 18.783196 15.726909 19.085977 15.160156 19.324219 L 15.03125 19.25 L 15.03125 18.25 L 15.462891 18 L 15.896484 17.75 z'
@@ -443,7 +444,8 @@ export const Icons = Object.freeze({
443444
zRotateClockwise: mdiRotateRight,
444445
zRotateCounterclockwise: mdiRotateLeft,
445446
devices: mdiUsb,
446-
beacon: mdiMagnet
447+
beacon: mdiMagnet,
448+
pidCalibrate: mdiSineWave
447449
})
448450

449451
export const Waits = Object.freeze({

src/locales/en.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,13 @@ app:
2727
label:
2828
current: Actual
2929
item: Name
30+
pid_calibration: PID Calibration
3031
power: Power
3132
target: Target
33+
target_temperature: Target Temperature
3234
rate_of_change: Change
35+
title:
36+
pid_calibrate: PID Calibrate {name}
3337
tooltip:
3438
help: >-
3539
Hold <kbd>Shift</kbd> to zoom.<br />Click an item to toggle in the graph.<br

src/store/printer/getters.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,8 +501,8 @@ export const getters: GetterTree<PrinterState, RootState> = {
501501
color,
502502
prettyName,
503503
key: e,
504-
minTemp: config?.min_temp,
505-
maxTemp: config?.max_temp
504+
minTemp: config?.min_temp ?? 0,
505+
maxTemp: config?.max_temp ?? 500
506506
})
507507
}
508508
})

src/store/printer/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ export interface Heater extends OutputType {
9797
temperature: number;
9898
target: number;
9999
power: number;
100-
minTemp?: number;
101-
maxTemp?: number;
100+
minTemp: number;
101+
maxTemp: number;
102102
}
103103

104104
export interface Fan extends OutputType<FanConfig> {

0 commit comments

Comments
 (0)