fix(back-end): fix process files
All checks were successful
Build, Test and Deploy / test-backend (push) Successful in 34s
Build, Test and Deploy / build-and-push (push) Successful in 31s
Build, Test and Deploy / deploy (push) Successful in 6s

This commit is contained in:
2026-02-16 15:56:55 +01:00
parent ab7f263aca
commit efa1371ffa
2 changed files with 8 additions and 6 deletions

View File

@@ -129,11 +129,13 @@ public class QuoteSessionController {
.orElseThrow(() -> new RuntimeException("No active printer found")); .orElseThrow(() -> new RuntimeException("No active printer found"));
// 2. Pick Profiles // 2. Pick Profiles
String machineProfile = machine.getPrinterDisplayName(); // e.g. "Bambu Lab A1 0.4 nozzle" String machineProfile = machine.getSlicerMachineProfile();
// If the display name doesn't match the json profile name, we might need a mapping key in DB. if (machineProfile == null || machineProfile.isBlank()) {
// For now assuming display name works or we use a tough default machineProfile = machine.getPrinterDisplayName(); // e.g. "Bambu Lab A1 0.4 nozzle"
machineProfile = "Bambu Lab A1 0.4 nozzle"; // Force known good for now? Or use DB field if exists. }
// Ideally: machine.getSlicerProfileName(); if (machineProfile == null || machineProfile.isBlank()) {
machineProfile = "bambu_a1"; // final fallback (alias handled in ProfileManager)
}
String filamentProfile = "Generic " + (settings.getMaterial() != null ? settings.getMaterial().toUpperCase() : "PLA"); String filamentProfile = "Generic " + (settings.getMaterial() != null ? settings.getMaterial().toUpperCase() : "PLA");
// Mapping: "pla_basic" -> "Generic PLA", "petg_basic" -> "Generic PETG" // Mapping: "pla_basic" -> "Generic PLA", "petg_basic" -> "Generic PETG"

View File

@@ -103,7 +103,7 @@ public class SlicerService {
command.add(localStl.getAbsolutePath()); command.add(localStl.getAbsolutePath());
logger.info("Executing Slicer for Bambu Lab A1 on: " + localStl.getAbsolutePath()); logger.info("Executing Slicer for " + machineName + " on: " + localStl.getAbsolutePath());
runSlicerCommand(command, tempDir); runSlicerCommand(command, tempDir);