mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 10:32:20 +00:00
Some changes to DLP projector
This commit is contained in:
@@ -39,7 +39,7 @@ sub new {
|
||||
my $sizer = Wx::BoxSizer->new(wxVERTICAL);
|
||||
|
||||
$self->config(Slic3r::Config->new_from_defaults(
|
||||
qw(serial_port serial_speed bed_shape start_gcode end_gcode)
|
||||
qw(serial_port serial_speed bed_shape start_gcode end_gcode z_offset)
|
||||
));
|
||||
$self->config->apply(wxTheApp->{mainframe}->config);
|
||||
|
||||
@@ -599,8 +599,6 @@ sub start_print {
|
||||
|
||||
# send custom start G-code
|
||||
$self->sender->send($_, 1) for grep !/^;/, split /\n/, $self->config->start_gcode;
|
||||
$self->sender->send(sprintf("G1 Z%.5f F%d",
|
||||
$self->config2->{z_lift}, $self->config2->{z_lift_speed}*60), 1);
|
||||
}
|
||||
|
||||
$self->is_printing(1);
|
||||
@@ -621,6 +619,10 @@ sub start_print {
|
||||
sub stop_print {
|
||||
my ($self) = @_;
|
||||
|
||||
if ($self->sender) {
|
||||
$self->sender->disconnect;
|
||||
}
|
||||
|
||||
$self->is_printing(0);
|
||||
$self->timer->Stop;
|
||||
$self->_timer_cb(undef);
|
||||
@@ -633,7 +635,6 @@ sub print_completed {
|
||||
# send custom end G-code
|
||||
if ($self->sender) {
|
||||
$self->sender->send($_, 1) for grep !/^;/, split /\n/, $self->config->end_gcode;
|
||||
$self->sender->disconnect;
|
||||
}
|
||||
|
||||
# call this before the on_print_completed callback otherwise buttons
|
||||
@@ -675,7 +676,7 @@ sub project_next_layer {
|
||||
$self->on_project_layer->($self->_layer_num) if $self->on_project_layer;
|
||||
|
||||
if ($self->sender) {
|
||||
my $z = $self->current_layer_height;
|
||||
my $z = $self->current_layer_height + $self->config->z_offset;
|
||||
my $F = $self->config2->{z_lift_speed} * 60;
|
||||
if ($self->config2->{z_lift} != 0) {
|
||||
$self->sender->send(sprintf("G1 Z%.5f F%d", $z + $self->config2->{z_lift}, $F), 1);
|
||||
|
||||
Reference in New Issue
Block a user