We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d79dd5 commit ec299c9Copy full SHA for ec299c9
src/store/printer/getters.ts
@@ -458,18 +458,23 @@ export const getters = {
458
},
459
460
getRunoutSensors: (state): RunoutSensor[] => {
461
- const supportedSensors = ['filament_switch_sensor', 'filament_motion_sensor']
+ const supportedSensors = [
462
+ 'filament_switch_sensor',
463
+ 'filament_motion_sensor'
464
+ ] as const
465
+
466
const sensors: RunoutSensor[] = []
467
468
for (const item in state.printer) {
469
const [type, nameFromSplit] = item.split(' ', 2)
470
471
if (supportedSensors.includes(type)) {
472
const name = nameFromSplit ?? item
- const sensor = state.printer[item]
473
474
sensors.push({
475
+ ...state.printer[item],
476
name,
477
prettyName: Vue.$filters.prettyCase(name),
- ...sensor
478
})
479
}
480
0 commit comments