Skip to content

Commit

Permalink
Wipe tower weight added into G-code metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmatena committed Nov 16, 2023
1 parent ad35221 commit 9ac26bb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/LibBGCode/convert/convert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ BGCODE_CONVERT_EXPORT EResult from_ascii_to_binary(FILE& src_file, FILE& dst_fil
static constexpr const std::string_view FilamentCost = "filament cost"sv;
static constexpr const std::string_view TotalFilamentUsedG = "total filament used [g]"sv;
static constexpr const std::string_view TotalFilamentCost = "total filament cost"sv;
static constexpr const std::string_view TotalFilamentUsedWipeTower = "total filament used for wipe tower [g]"sv;
static constexpr const std::string_view EstimatedPrintingTimeSilent = "estimated printing time (silent mode)"sv;
static constexpr const std::string_view Estimated1stLayerPrintingTimeNormal = "estimated first layer printing time (normal mode)"sv;
static constexpr const std::string_view Estimated1stLayerPrintingTimeSilent = "estimated first layer printing time (silent mode)"sv;
Expand Down Expand Up @@ -262,6 +263,7 @@ BGCODE_CONVERT_EXPORT EResult from_ascii_to_binary(FILE& src_file, FILE& dst_fil
std::string filament_cost;
std::string total_filament_used_g;
std::string total_filament_cost;
std::string total_filament_used_wipe_tower;
std::string estimated_printing_time_silent;
std::string estimated_1st_layer_printing_time_normal;
std::string estimated_1st_layer_printing_time_silent;
Expand Down Expand Up @@ -339,6 +341,7 @@ BGCODE_CONVERT_EXPORT EResult from_ascii_to_binary(FILE& src_file, FILE& dst_fil
if (collect_metadata(FilamentCost, filament_cost)) return;
if (collect_metadata(TotalFilamentUsedG, total_filament_used_g)) return;
if (collect_metadata(TotalFilamentCost, total_filament_cost)) return;
if (collect_metadata(TotalFilamentUsedWipeTower, total_filament_used_wipe_tower)) return;
if (collect_metadata(EstimatedPrintingTimeSilent, estimated_printing_time_silent)) return;
if (collect_metadata(Estimated1stLayerPrintingTimeNormal, estimated_1st_layer_printing_time_normal)) return;
if (collect_metadata(Estimated1stLayerPrintingTimeSilent, estimated_1st_layer_printing_time_silent)) return;
Expand Down Expand Up @@ -522,6 +525,7 @@ BGCODE_CONVERT_EXPORT EResult from_ascii_to_binary(FILE& src_file, FILE& dst_fil
append_metadata(binary_data.print_metadata.raw_data, std::string(FilamentCost), filament_cost);
append_metadata(binary_data.print_metadata.raw_data, std::string(TotalFilamentUsedG), total_filament_used_g);
append_metadata(binary_data.print_metadata.raw_data, std::string(TotalFilamentCost), total_filament_cost);
append_metadata(binary_data.print_metadata.raw_data, std::string(TotalFilamentUsedWipeTower), total_filament_used_wipe_tower);
append_metadata(binary_data.print_metadata.raw_data, std::string(EstimatedPrintingTimeNormal), estimated_printing_time_normal);
append_metadata(binary_data.print_metadata.raw_data, std::string(EstimatedPrintingTimeSilent), estimated_printing_time_silent);
append_metadata(binary_data.print_metadata.raw_data, std::string(Estimated1stLayerPrintingTimeNormal), estimated_1st_layer_printing_time_normal);
Expand Down

0 comments on commit 9ac26bb

Please sign in to comment.