Skip to content

Commit 4f1a198

Browse files
committed
Version 3.6.2-beta.1
Refined bed/chamber grouping: If a bed/chamber heater has diverging state/active/standby values, tools are no longer displayed as a group Active/standby controls for single bed/chamber groups use first heater's taget values
1 parent 2f36305 commit 4f1a198

File tree

4 files changed

+61
-8
lines changed

4 files changed

+61
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "duetwebcontrol",
3-
"version": "3.6.1",
3+
"version": "3.6.2-beta.1",
44
"author": "Christian Hammacher <christian@duet3d.com> (https://www.duet3d.com)",
55
"homepage": "https://forum.duet3d.com/category/27/duet-web-control",
66
"license": "GPL-3.0",

src/components/inputs/ControlInput.vue

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,25 @@ export default Vue.extend({
8989
const activeOrStandby = this.active ? "active" : "standby";
9090
switch (this.type) {
9191
case "all":
92-
// not applicable
92+
if (this.controlBeds) {
93+
for (const bedHeaterIndex of store.state.machine.model.heat.bedHeaters) {
94+
if (bedHeaterIndex >= 0 && bedHeaterIndex < store.state.machine.model.heat.heaters.length) {
95+
const heater = store.state.machine.model.heat.heaters[bedHeaterIndex];
96+
if (heater !== null) {
97+
return heater[activeOrStandby];
98+
}
99+
}
100+
}
101+
} else if (this.controlChambers) {
102+
for (const chamberHeaterIndex of store.state.machine.model.heat.chamberHeaters) {
103+
if (chamberHeaterIndex >= 0 && chamberHeaterIndex < store.state.machine.model.heat.heaters.length) {
104+
const heater = store.state.machine.model.heat.heaters[chamberHeaterIndex];
105+
if (heater !== null) {
106+
return heater[activeOrStandby];
107+
}
108+
}
109+
}
110+
}
93111
break;
94112
95113
case "tool":

src/components/panels/ToolsPanel/ControlList/HeaterRows.vue

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,42 @@ const emit = defineEmits<{
155155
const disabled = computed<boolean>(() => store.getters["uiFrozen"] || [MachineStatus.pausing, MachineStatus.processing, MachineStatus.resuming].includes(store.state.machine.model.state.status));
156156
157157
// Settings
158-
const singleControl = computed(() => (props.type === "bed") ? store.state.machine.settings.singleBedControl : store.state.machine.settings.singleChamberControl);
158+
const singleControl = computed(() => {
159+
if (props.type === "bed" && store.state.machine.settings.singleBedControl) {
160+
let state: HeaterState | null, active: number | null = null, standby: number | null = null;
161+
for (const heaterIndex of store.state.machine.model.heat.bedHeaters) {
162+
if (heaterIndex >= 0 && heaterIndex < store.state.machine.model.heat.heaters.length) {
163+
const heater = store.state.machine.model.heat.heaters[heaterIndex];
164+
if (heater !== null) {
165+
state ??= heater.state;
166+
active ??= heater.active;
167+
standby ??= heater.standby;
168+
if (heater.state === state || heater.active !== active || heater.standby !== standby) {
169+
return false;
170+
}
171+
}
172+
}
173+
}
174+
return true;
175+
} else if (props.type === "chamber" && store.state.machine.settings.singleChamberControl) {
176+
let state: HeaterState | null, active: number | null = null, standby: number | null = null;
177+
for (const heaterIndex of store.state.machine.model.heat.chamberHeaters) {
178+
if (heaterIndex >= 0 && heaterIndex < store.state.machine.model.heat.heaters.length) {
179+
const heater = store.state.machine.model.heat.heaters[heaterIndex];
180+
if (heater !== null) {
181+
state ??= heater.state;
182+
active ??= heater.active;
183+
standby ??= heater.standby;
184+
if (heater.state === state || heater.active !== active || heater.standby !== standby) {
185+
return false;
186+
}
187+
}
188+
}
189+
}
190+
return true;
191+
}
192+
return false;
193+
});
159194
160195
// Heater abstraction
161196
const heaterItems = computed(() => {

src/plugins/imports.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default initCollection(DwcPlugin, [
99
id: "GCodeViewer",
1010
name: "G-Code Viewer",
1111
author: "Juan Rosario",
12-
version: "3.6.1",
12+
version: "3.6.2-beta.1",
1313
loadDwcResources: () => import(
1414
/* webpackChunkName: "GCodeViewer" */
1515
"./GCodeViewer/index"
@@ -19,7 +19,7 @@ export default initCollection(DwcPlugin, [
1919
id: "HeightMap",
2020
name: "Height Map",
2121
author: "Duet3D Ltd",
22-
version: "3.6.1",
22+
version: "3.6.2-beta.1",
2323
loadDwcResources: () => import(
2424
/* webpackChunkName: "HeightMap" */
2525
"./HeightMap/index"
@@ -29,7 +29,7 @@ export default initCollection(DwcPlugin, [
2929
id: "InputShaping",
3030
name: "Input Shaping",
3131
author: "Duet3D Ltd",
32-
version: "3.6.1",
32+
version: "3.6.2-beta.1",
3333
loadDwcResources: () => import(
3434
/* webpackChunkName: "InputShaping" */
3535
"./InputShaping/index"
@@ -39,7 +39,7 @@ export default initCollection(DwcPlugin, [
3939
id: "ObjectModelBrowser",
4040
name: "Object Model Browser",
4141
author: "Duet3D Ltd",
42-
version: "3.6.1",
42+
version: "3.6.2-beta.1",
4343
loadDwcResources: () => import(
4444
/* webpackChunkName: "ObjectModelBrowser" */
4545
"./ObjectModelBrowser/index"
@@ -49,7 +49,7 @@ export default initCollection(DwcPlugin, [
4949
id: "OnScreenKeyboard",
5050
name: "On-Screen Keyboard",
5151
author: "Duet3D Ltd",
52-
version: "3.6.1",
52+
version: "3.6.2-beta.1",
5353
loadDwcResources: () => import(
5454
/* webpackChunkName: "OnScreenKeyboard" */
5555
"./OnScreenKeyboard/index"

0 commit comments

Comments
 (0)