diff --git a/lib/Slic3r/GUI/Controller/PrinterPanel.pm b/lib/Slic3r/GUI/Controller/PrinterPanel.pm index 6a28e2ace..9e2dc211d 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/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index 4d886893f..d6589da13 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -238,7 +238,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); }); diff --git a/xs/src/libslic3r/GCodeSender.cpp b/xs/src/libslic3r/GCodeSender.cpp index bb91a84c1..c880ee408 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; diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index 4bd2bc8b6..c9fb48318 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -1108,6 +1108,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);