feature: add tacho value to miscellaneous fans and temperature_fans
Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
parent
b51eae1740
commit
3c7dc54bea
@ -35,7 +35,7 @@
|
||||
</v-toolbar>
|
||||
<div v-for="(object, index) of this['printer/getMiscellaneous']" v-bind:key="index">
|
||||
<v-divider v-if="index"></v-divider>
|
||||
<miscellaneous-slider :name="object.name" :type="object.type" :target="object.power" :controllable="object.controllable" :pwm="object.pwm" :multi="parseInt(object.scale)"></miscellaneous-slider>
|
||||
<miscellaneous-slider :name="object.name" :type="object.type" :target="object.power" :rpm="object.rpm" :controllable="object.controllable" :pwm="object.pwm" :multi="parseInt(object.scale)"></miscellaneous-slider>
|
||||
</div>
|
||||
</v-card>
|
||||
</div>
|
||||
|
@ -112,7 +112,10 @@
|
||||
<v-col class="py-2 flex-grow-0 text-center d-none d-sm-block" v-if="boolTempchart" style="min-width: 70px;">
|
||||
<div :style="'background-color: '+fan.chartColor+'cc;'" class="datasetColorSymbol d-inline-block" @click="openHeater(fan)"></div>
|
||||
</v-col>
|
||||
<v-col class="py-2 text-center d-none d-sm-block"><small>{{ fan.target > 0 && fan.speed > 0 ? (fan.speed * 100).toFixed(0)+"%" : (fan.target > 0 ? "standby" : "off") }}</small></v-col>
|
||||
<v-col class="py-2 text-center d-none d-sm-block">
|
||||
<small class="d-block">{{ fan.target > 0 && fan.speed > 0 ? (fan.speed * 100).toFixed(0)+"%" : (fan.target > 0 ? "standby" : "off") }}</small>
|
||||
<small v-if="fan.rpm || fan.rpm === 0" :class="'d-block ' + (fan.rpm === 0 && fan.speed > 0 ? 'red--text' : '')">{{ Math.round(fan.rpm) }} RPM</small>
|
||||
</v-col>
|
||||
<v-col class="py-2 text-center">
|
||||
<span class="d-block">{{ fan.temperature ? fan.temperature.toFixed(1) : 0}}°C</span>
|
||||
<span v-for="(values, key) of fan.tempListAdditionValues" v-bind:key="key" class="d-block"><small>{{ values.value.toFixed(1) }} {{ values.unit }}</small></span>
|
||||
|
@ -12,6 +12,7 @@
|
||||
<v-icon small :class="'mr-2 '+(value ? 'icon-rotate' : '')" v-if="type !== 'output_pin'">mdi-fan</v-icon>
|
||||
<span>{{ convertName(this.name) }}</span>
|
||||
<v-spacer></v-spacer>
|
||||
<small v-if="rpm || rpm === 0" :class="'mr-3 ' + (rpm === 0 && value > 0 ? 'red--text' : '')">{{ Math.round(rpm) }} RPM</small>
|
||||
<span class="font-weight-bold" v-if="!controllable || (controllable && pwm)">{{ Math.round(value*100) }} %</span>
|
||||
<v-icon v-if="controllable && !pwm" @click="switchOutputPin">{{ value ? "mdi-toggle-switch" : "mdi-toggle-switch-off-outline" }}</v-icon>
|
||||
</v-subheader>
|
||||
@ -73,6 +74,11 @@
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
rpm: {
|
||||
type: [Number, Boolean],
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
multi: {
|
||||
type: Number,
|
||||
required: false,
|
||||
|
@ -111,6 +111,7 @@ export default {
|
||||
additionValues: getters.getAdditionSensors(nameSplit[1]),
|
||||
tempListAdditionValues: getters.getTempListAdditionSensors(nameSplit[1]),
|
||||
speed: value.speed,
|
||||
rpm: 'rpm' in value ? value.rpm : false,
|
||||
presets: rootGetters["gui/getPresetsFromHeater"]({ name: key }),
|
||||
chartColor: getters["tempHistory/getDatasetColor"](nameSplit[1]),
|
||||
chartTemperature: getters["tempHistory/getSeries"](nameSplit[1]),
|
||||
@ -231,6 +232,7 @@ export default {
|
||||
if (!name.startsWith("_")) {
|
||||
let controllable = controllableFans.includes(nameSplit[0].toLowerCase())
|
||||
let power = 'speed' in value ? value.speed : ('value' in value ? value.value : 0)
|
||||
let rpm = 'rpm' in value ? value.rpm : false
|
||||
let pwm = controllable
|
||||
let scale = 1
|
||||
|
||||
@ -260,6 +262,7 @@ export default {
|
||||
power: power,
|
||||
controllable: controllable,
|
||||
pwm: pwm,
|
||||
rpm: rpm,
|
||||
scale: scale,
|
||||
object: value,
|
||||
config: state.configfile.config[key]
|
||||
|
Loading…
x
Reference in New Issue
Block a user