From 2fc8152e24075dae96e09283fb548c2d82924fe2 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sat, 25 Mar 2017 19:25:32 +0100 Subject: [PATCH 1/3] Add 57600 baud. #3782 --- lib/Slic3r/GUI/Controller/PrinterPanel.pm | 2 +- xs/src/libslic3r/PrintConfig.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/GUI/Controller/PrinterPanel.pm b/lib/Slic3r/GUI/Controller/PrinterPanel.pm index 6a28e2ace9..9e2dc211d3 100644 --- a/lib/Slic3r/GUI/Controller/PrinterPanel.pm +++ b/lib/Slic3r/GUI/Controller/PrinterPanel.pm @@ -126,7 +126,7 @@ sub new { my $serial_speed_sizer = Wx::BoxSizer->new(wxHORIZONTAL); { $self->{serial_speed_combobox} = Wx::ComboBox->new($self, -1, $config->serial_speed, wxDefaultPosition, wxDefaultSize, - ["115200", "250000"]); + ["57600", "115200", "250000"]); $self->{serial_speed_combobox}->SetFont($Slic3r::GUI::small_font); $serial_speed_sizer->Add($self->{serial_speed_combobox}, 0, wxALIGN_CENTER_VERTICAL, 0); } diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index c1b5870f9d..2ab6ad89ec 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -1069,6 +1069,7 @@ PrintConfigDef::PrintConfigDef() def->cli = "serial-speed=i"; def->min = 1; def->max = 300000; + def->enum_values.push_back("57600"); def->enum_values.push_back("115200"); def->enum_values.push_back("250000"); def->default_value = new ConfigOptionInt(250000); From 5f30ab2f0d80b528a25bd987d77dc9b34e0f03e9 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sun, 26 Mar 2017 04:18:06 +0200 Subject: [PATCH 2/3] Make N 0-based --- xs/src/libslic3r/GCodeSender.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xs/src/libslic3r/GCodeSender.cpp b/xs/src/libslic3r/GCodeSender.cpp index bb91a84c1a..c880ee4089 100644 --- a/xs/src/libslic3r/GCodeSender.cpp +++ b/xs/src/libslic3r/GCodeSender.cpp @@ -355,6 +355,7 @@ GCodeSender::on_read(const boost::system::error_code& error, // extract the first number from line boost::algorithm::trim_left_if(line, !boost::algorithm::is_digit()); size_t toresend = boost::lexical_cast(line.substr(0, line.find_first_not_of("0123456789"))); + toresend++; // N is 0-based if (toresend >= this->sent - this->last_sent.size()) { { boost::lock_guard l(this->queue_mutex); @@ -473,8 +474,8 @@ GCodeSender::do_send() if (line.empty()) return; // compute full line - this->sent++; std::string full_line = "N" + boost::lexical_cast(this->sent) + " " + line; + this->sent++; // calculate checksum int cs = 0; From 426e79c65411cdb789da3d2f8190354dee1a9a64 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sun, 26 Mar 2017 15:00:39 +0200 Subject: [PATCH 3/3] Use shift key instead of alt for the OctoPrint shortcut. #3789 --- lib/Slic3r/GUI/Plater.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index d43f1cf528..55e331f38d 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -256,7 +256,7 @@ sub new { EVT_LEFT_UP($self->{btn_send_gcode}, sub { my (undef, $e) = @_; - my $alt = $e->AltDown; + my $alt = $e->ShiftDown; wxTheApp->CallAfter(sub { $self->prepare_send($alt); });