Skip to content

Commit

Permalink
Added filament_abrasive and nozzle_high_flow into the conversion func…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
lukasmatena committed Aug 29, 2024
1 parent 5347c33 commit b5c57c4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/LibBGCode/convert/convert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit b5c57c4

Please sign in to comment.