mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-19 07:33:18 +02:00
Merge branch 'dev' into feature/2656-restore-from-github
This commit is contained in:
@@ -62,7 +62,7 @@ from backend.app.services.printer_manager import (
|
||||
supports_chamber_temp,
|
||||
supports_drying,
|
||||
supports_drying_while_printing,
|
||||
uniform_tray_drying_hint,
|
||||
uniform_tray_filament_hint,
|
||||
)
|
||||
from backend.app.utils.filament_ids import filament_id_to_setting_id
|
||||
from backend.app.utils.http import build_content_disposition
|
||||
@@ -578,18 +578,12 @@ async def get_printer_status(
|
||||
dry_target_temp = None
|
||||
if target_fil_val:
|
||||
dry_filament = str(target_fil_val)
|
||||
# Fallback: derive from the loaded trays when there is no cached
|
||||
# target (drying started in a previous backend session, or the
|
||||
# cache wasn't seeded), and only when they agree on a filament
|
||||
# type. See uniform_tray_drying_hint.
|
||||
if dry_target_temp is None or not dry_filament:
|
||||
hint_filament, hint_temp = uniform_tray_drying_hint(
|
||||
[(tray.tray_type or "", tray.drying_temp) for tray in trays]
|
||||
)
|
||||
if not dry_filament:
|
||||
dry_filament = hint_filament
|
||||
if dry_target_temp is None:
|
||||
dry_target_temp = hint_temp
|
||||
# Fallback: name the filament from the loaded trays when there is no
|
||||
# cached target (drying started in a previous backend session, or
|
||||
# the cache wasn't seeded), and only when they agree. The
|
||||
# temperature has no fallback — see uniform_tray_filament_hint.
|
||||
if not dry_filament:
|
||||
dry_filament = uniform_tray_filament_hint([tray.tray_type or "" for tray in trays])
|
||||
|
||||
ams_units.append(
|
||||
AMSUnit(
|
||||
|
||||
Reference in New Issue
Block a user