From b5c57c423c958a78dacae468aeee63ab3d2de947 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Thu, 18 Jul 2024 14:58:37 +0200 Subject: [PATCH] Added filament_abrasive and nozzle_high_flow into the conversion function --- src/LibBGCode/convert/convert.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/LibBGCode/convert/convert.cpp b/src/LibBGCode/convert/convert.cpp index c43842c..664b2dc 100644 --- a/src/LibBGCode/convert/convert.cpp +++ b/src/LibBGCode/convert/convert.cpp @@ -186,7 +186,9 @@ BGCODE_CONVERT_EXPORT EResult from_ascii_to_binary(FILE& src_file, FILE& dst_fil static constexpr const std::string_view PrinterModel = "printer_model"sv; static constexpr const std::string_view FilamentType = "filament_type"sv; + static constexpr const std::string_view FilamentAbrasive = "filament_abrasive"sv; static constexpr const std::string_view NozzleDiameter = "nozzle_diameter"sv; + static constexpr const std::string_view NozzleHighFlow = "nozzle_high_flow"sv; static constexpr const std::string_view BedTemperature = "bed_temperature"sv; static constexpr const std::string_view BrimWidth = "brim_width"sv; static constexpr const std::string_view FillDensity = "fill_density"sv; @@ -248,7 +250,9 @@ BGCODE_CONVERT_EXPORT EResult from_ascii_to_binary(FILE& src_file, FILE& dst_fil std::string printer_model; std::string filament_type; + std::string filament_abrasive; std::string nozzle_diameter; + std::string nozzle_high_flow; std::string bed_temperature; std::string brim_width; std::string fill_density; @@ -328,7 +332,9 @@ BGCODE_CONVERT_EXPORT EResult from_ascii_to_binary(FILE& src_file, FILE& dst_fil if (collect_metadata(PrinterModel, printer_model, true)) return; if (collect_metadata(FilamentType, filament_type, true)) return; + if (collect_metadata(FilamentAbrasive, filament_abrasive, true)) return; if (collect_metadata(NozzleDiameter, nozzle_diameter, true)) return; + if (collect_metadata(NozzleHighFlow, nozzle_high_flow, true)) return; if (collect_metadata(BedTemperature, bed_temperature, true)) return; if (collect_metadata(BrimWidth, brim_width, true)) return; if (collect_metadata(FillDensity, fill_density, true)) return; @@ -508,7 +514,9 @@ BGCODE_CONVERT_EXPORT EResult from_ascii_to_binary(FILE& src_file, FILE& dst_fil // update printer metadata append_metadata(binary_data.printer_metadata.raw_data, std::string(PrinterModel), printer_model); append_metadata(binary_data.printer_metadata.raw_data, std::string(FilamentType), filament_type); + append_metadata(binary_data.printer_metadata.raw_data, std::string(FilamentAbrasive), filament_abrasive); append_metadata(binary_data.printer_metadata.raw_data, std::string(NozzleDiameter), nozzle_diameter); + append_metadata(binary_data.printer_metadata.raw_data, std::string(NozzleHighFlow), nozzle_high_flow); append_metadata(binary_data.printer_metadata.raw_data, std::string(BedTemperature), bed_temperature); append_metadata(binary_data.printer_metadata.raw_data, std::string(BrimWidth), brim_width); append_metadata(binary_data.printer_metadata.raw_data, std::string(FillDensity), fill_density);