mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Added possibility for upload to Duet
Further changes: - Added new configuration option Host Type - Added abstract base class for future printer hosts - Moved location of upload dialog (also made it a little bit more configureable) - added possibility to send file via postfield instead a new frame
This commit is contained in:
parent
3433e8e374
commit
dd1fd66a47
29 changed files with 699 additions and 128 deletions
|
@ -53,7 +53,7 @@ sub new {
|
|||
my $self = $class->SUPER::new($parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
|
||||
$self->{config} = Slic3r::Config::new_from_defaults_keys([qw(
|
||||
bed_shape complete_objects extruder_clearance_radius skirts skirt_distance brim_width variable_layer_height
|
||||
serial_port serial_speed octoprint_host octoprint_apikey octoprint_cafile
|
||||
serial_port serial_speed host_type print_host printhost_apikey printhost_cafile
|
||||
nozzle_diameter single_extruder_multi_material wipe_tower wipe_tower_x wipe_tower_y wipe_tower_width
|
||||
wipe_tower_rotation_angle extruder_colour filament_colour max_print_height printer_model
|
||||
)]);
|
||||
|
@ -1569,7 +1569,7 @@ sub on_export_completed {
|
|||
$message = L("File added to print queue");
|
||||
$do_print = 1;
|
||||
} elsif ($self->{send_gcode_file}) {
|
||||
$message = L("Sending G-code file to the OctoPrint server...");
|
||||
$message = L("Sending G-code file to the Printer Host ...");
|
||||
$send_gcode = 1;
|
||||
} else {
|
||||
$message = L("G-code file exported to ") . $self->{export_gcode_output_file};
|
||||
|
@ -1585,9 +1585,10 @@ sub on_export_completed {
|
|||
|
||||
# Send $self->{send_gcode_file} to OctoPrint.
|
||||
if ($send_gcode) {
|
||||
my $op = Slic3r::OctoPrint->new($self->{config});
|
||||
if ($op->send_gcode($self->{send_gcode_file})) {
|
||||
$self->statusbar->SetStatusText(L("OctoPrint upload finished."));
|
||||
my $host = Slic3r::PrintHostFactory::get_print_host($self->{config});
|
||||
|
||||
if ($host->send_gcode($self->{send_gcode_file})) {
|
||||
$self->statusbar->SetStatusText(L("Upload to host finished."));
|
||||
} else {
|
||||
$self->statusbar->SetStatusText("");
|
||||
}
|
||||
|
@ -1914,8 +1915,8 @@ sub on_config_change {
|
|||
} elsif ($opt_key eq 'serial_port') {
|
||||
$self->{btn_print}->Show($config->get('serial_port'));
|
||||
$self->Layout;
|
||||
} elsif ($opt_key eq 'octoprint_host') {
|
||||
$self->{btn_send_gcode}->Show($config->get('octoprint_host'));
|
||||
} elsif ($opt_key eq 'print_host') {
|
||||
$self->{btn_send_gcode}->Show($config->get('print_host'));
|
||||
$self->Layout;
|
||||
} elsif ($opt_key eq 'variable_layer_height') {
|
||||
if ($config->get('variable_layer_height') != 1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue