mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-04 07:10:40 +08:00
Merge remote-tracking branch 'origin/master' into gui3
This commit is contained in:
commit
815141f75e
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
});
|
||||
|
@ -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<size_t>(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<boost::mutex> 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<std::string>(this->sent) + " " + line;
|
||||
this->sent++;
|
||||
|
||||
// calculate checksum
|
||||
int cs = 0;
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user