fix(gui,cli,gcode): 元数据默认累加模式,格式化Unknown→未知

- BuildOptions.metadata_mode 默认 sum(累加预测和耗材用量)
- CLI --metadata-mode 默认 sum
- GUI 设置回退值默认 sum
- format_duration/format_filament 空值返回 未知 而非 Unknown
This commit is contained in:
2026-07-28 10:12:37 +08:00
parent e00e77a16a
commit 002b8117d8
4 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ class BuildOptions:
wait_after_eject_seconds: int = 45 # 推板完成后等待时间
show_plate_number: bool = True # 是否显示板件编号到屏幕
swap_after_final: bool = True # 最后一块是否也换板
metadata_mode: MetadataMode = "source" # 元数据计算模式
metadata_mode: MetadataMode = "sum" # 元数据计算模式
line_ending: LineEnding = "crlf" # 输出换行符
add_preview_label: bool = True # 是否添加预览注释
apply_gcode_patches: bool = True # 是否启用 G-code 补丁