Skip to content

Commit 6e391af

Browse files
committed
Add config options for Batch Print
1 parent f41b659 commit 6e391af

3 files changed

Lines changed: 40 additions & 4 deletions

File tree

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,16 @@ bambu.users.guest.role=normal
240240
bambu.auto-login=true
241241
```
242242

243+
### Batch Print Section
244+
Default batch printing options is below:
245+
246+
```properties
247+
bambu.batch-print.timelapse=true
248+
bambu.batch-print.bed-levelling=true
249+
bambu.batch-print.flow-calibration=true
250+
bambu.batch-print.vibration-calibration=true
251+
```
252+
243253
### Preheat
244254

245255
Default preheat configuration is below:

bambu/src/main/java/com/tfyre/bambu/BambuConfig.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ public interface BambuConfig {
4141

4242
Dashboard dashboard();
4343

44+
BatchPrint batchPrint();
45+
4446
Map<String, Printer> printers();
4547

4648
@WithDefault("false")
@@ -52,6 +54,22 @@ public interface BambuConfig {
5254

5355
Cloud cloud();
5456

57+
public interface BatchPrint {
58+
59+
@WithDefault("true")
60+
boolean timelapse();
61+
62+
@WithDefault("true")
63+
boolean bedLevelling();
64+
65+
@WithDefault("true")
66+
boolean flowCalibration();
67+
68+
@WithDefault("true")
69+
boolean vibrationCalibration();
70+
71+
}
72+
5573
public interface Cloud {
5674

5775
@WithDefault("false")

bambu/src/main/java/com/tfyre/bambu/view/batchprint/BatchPrintView.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ public final class BatchPrintView extends PushDiv implements NotificationHelper,
8484
private final Span printTime = new Span();
8585
private final Span printWeight = new Span();
8686
private final Div printFilaments = newDiv("filaments");
87-
private final Checkbox timelapse = new Checkbox("Timelapse", true);
88-
private final Checkbox bedLevelling = new Checkbox("Bed Levelling", true);
89-
private final Checkbox flowCalibration = new Checkbox("Flow Calibration", true);
90-
private final Checkbox vibrationCalibration = new Checkbox("Vibration Calibration", true);
87+
private final Checkbox timelapse = new Checkbox("Timelapse");
88+
private final Checkbox bedLevelling = new Checkbox("Bed Levelling");
89+
private final Checkbox flowCalibration = new Checkbox("Flow Calibration");
90+
private final Checkbox vibrationCalibration = new Checkbox("Vibration Calibration");
9191
private GridListDataView<PrinterMapping> dataView;
9292
private final Div actions = newDiv("actions", plateLookup,
9393
newDiv("detail", printTime, printWeight),
@@ -245,10 +245,18 @@ private void updateBulkStatus() {
245245
printerMappings.forEach(PrinterMapping::updateBulkStatus);
246246
}
247247

248+
private void configureActions() {
249+
timelapse.setValue(config.batchPrint().timelapse());
250+
bedLevelling.setValue(config.batchPrint().bedLevelling());
251+
flowCalibration.setValue(config.batchPrint().flowCalibration());
252+
vibrationCalibration.setValue(config.batchPrint().vibrationCalibration());
253+
}
254+
248255
@Override
249256
protected void onAttach(final AttachEvent attachEvent) {
250257
super.onAttach(attachEvent);
251258
addClassName("batchprint-view");
259+
configureActions();
252260
configurePlateLookup();
253261
configureGrid();
254262
configureUpload();

0 commit comments

Comments
 (0)