From 4b2a112c139ce7f9909ba95f27cada3ecea2405b Mon Sep 17 00:00:00 2001 From: FormerLurker Date: Sat, 17 Jul 2021 10:13:08 -0500 Subject: Fix travel statistics print in console app. Remove gcode length calculation check for non-debug builds. --- ArcWelder/segmented_arc.cpp | 6 +++++- ArcWelderConsole/ArcWelderConsole.cpp | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ArcWelder/segmented_arc.cpp b/ArcWelder/segmented_arc.cpp index 568d964..60d50cd 100644 --- a/ArcWelder/segmented_arc.cpp +++ b/ArcWelder/segmented_arc.cpp @@ -394,11 +394,15 @@ int segmented_arc::get_shape_gcode_length() int num_parameters = 4 + (has_e ? 1 : 0) + (has_z ? 1: 0) + (has_f ? 1: 0); // Return the length of the gcode. int gcode_length = 2 + num_spaces + num_decimal_points + num_digits + num_minus_signs + num_decimals + num_parameters; + + // Keep this around in case we have any future issues with the gcode length calculation + #ifdef Debug std::string gcode = get_shape_gcode(); if (gcode.length() != gcode_length) { - return 10000; + return 9999999; } + #endif return gcode_length; diff --git a/ArcWelderConsole/ArcWelderConsole.cpp b/ArcWelderConsole/ArcWelderConsole.cpp index 37574ea..e64d9d4 100644 --- a/ArcWelderConsole/ArcWelderConsole.cpp +++ b/ArcWelderConsole/ArcWelderConsole.cpp @@ -389,7 +389,7 @@ int main(int argc, char* argv[]) { log_messages.clear(); log_messages.str(""); - if (results.progress.travel_statistics.total_count_source == results.progress.travel_statistics.total_count_source) + if (results.progress.travel_statistics.total_count_source == results.progress.travel_statistics.total_count_target) { log_messages << "Target File Travel Statistics: No travel arcs converted." ; } -- cgit v1.2.3