fix: do not show null RPM in temp chart (fixes #818) (#820)

This commit is contained in:
th33xitus 2022-05-18 23:19:50 +02:00 committed by GitHub
parent 0da85e0e20
commit 76cedb174e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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">

View File

@ -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',

View File

@ -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