Skip to content

Commit

Permalink
Added filament_abrasive, nozzle_high_flow and nozzle_high_temperature…
Browse files Browse the repository at this point in the history
… into the conversion function
  • Loading branch information
lukasmatena committed Jul 18, 2024
1 parent dcb8f7b commit a21254e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/LibBGCode/convert/convert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ 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 NozzleHighTemperature = "nozzle_high_temperature"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 @@ -246,7 +249,10 @@ 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 nozzle_high_temperature;
std::string bed_temperature;
std::string brim_width;
std::string fill_density;
Expand Down Expand Up @@ -324,7 +330,10 @@ 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(NozzleHighTemperature, nozzle_high_temperature, 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 @@ -502,7 +511,10 @@ 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(NozzleHighTemperature), nozzle_high_temperature);
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 a21254e

Please sign in to comment.