Skip to content

Commit

Permalink
fix: do not show null RPM in temp chart (fixes #818) (#820)
Browse files Browse the repository at this point in the history
  • Loading branch information
dw-0 authored May 18, 2022
1 parent 0da85e0 commit 76cedb1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/panels/TemperaturePanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
</span>
</div>
<div v-if="object.rpm !== null">
<small :class="object.rpmClass">{{ object.rpm }}</small>
<small :class="object.rpmClass">{{ object.rpm }} RPM</small>
</div>
</td>
<td class="target">
Expand Down
2 changes: 1 addition & 1 deletion src/store/printer/getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export const getters: GetterTree<PrinterState, RootState> = {
max_temp: fan.max_temp,
measured_min_temp: null,
measured_max_temp: null,
rpm: `${fan.rpm} RPM`,
rpm: fan.rpm,
rpmClass: fan.rpm === 0 && fan.speed > 0 ? 'red--text' : '',
command: 'SET_TEMPERATURE_FAN_TARGET',
commandAttributeName: 'TEMPERATURE_FAN',
Expand Down
2 changes: 1 addition & 1 deletion src/store/printer/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export interface PrinterStateTemperatureObject {
max_temp: number
measured_min_temp: number | null
measured_max_temp: number | null
rpm: string | null
rpm: number | null
rpmClass: string
command: 'SET_HEATER_TEMPERATURE' | 'SET_TEMPERATURE_FAN_TARGET' | null
commandAttributeName: 'HEATER' | 'TEMPERATURE_FAN' | null
Expand Down

0 comments on commit 76cedb1

Please sign in to comment.