Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FormerLurker/ArcWelderLib.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'ArcWelder/unwritten_command.h')
-rw-r--r--ArcWelder/unwritten_command.h43
1 files changed, 18 insertions, 25 deletions
diff --git a/ArcWelder/unwritten_command.h b/ArcWelder/unwritten_command.h
index 8f85a50..bfca84f 100644
--- a/ArcWelder/unwritten_command.h
+++ b/ArcWelder/unwritten_command.h
@@ -29,34 +29,27 @@ struct unwritten_command
{
unwritten_command() {
is_extruder_relative = false;
- e_relative = 0;
- offset_e = 0;
- extrusion_length = 0;
- is_g1_g2 = false;
+ length = 0;
+ is_g0_g1 = false;
+ is_g2_g3 = false;
+ is_travel = false;
+ is_extrusion = false;
+ is_retraction = false;
+ gcode = "";
+ comment = "";
}
- unwritten_command(parsed_command &cmd, bool is_relative, double command_length) {
- is_extruder_relative = is_relative;
- is_g1_g2 = cmd.command == "G0" || cmd.command == "G1";
- gcode = cmd.gcode;
- comment = cmd.comment;
- extrusion_length = command_length;
+ unwritten_command(parsed_command &cmd, bool is_relative, bool is_extrusion, bool is_retraction, bool is_travel, double command_length)
+ : is_extruder_relative(is_relative), is_extrusion(is_extrusion), is_retraction(is_retraction), is_travel(is_travel), is_g0_g1(cmd.command == "G0" || cmd.command == "G1"), is_g2_g3(cmd.command == "G2" || cmd.command == "G3"), gcode(cmd.gcode), comment(cmd.comment), length(command_length)
+ {
+
}
- /*
- unwritten_command(position* p, double command_length) {
-
- e_relative = p->get_current_extruder().e_relative;
- offset_e = p->get_current_extruder().get_offset_e();
- is_extruder_relative = p->is_extruder_relative;
- is_g1_g2 = p->command.command == "G0" || p->command.command == "G1";
- gcode = p->command.gcode;
- comment = p->command.comment;
- extrusion_length = command_length;
- } */
- bool is_g1_g2;
+ bool is_g0_g1;
+ bool is_g2_g3;
bool is_extruder_relative;
- double e_relative;
- double offset_e;
- double extrusion_length;
+ bool is_travel;
+ bool is_extrusion;
+ bool is_retraction;
+ double length;
std::string gcode;
std::string comment;