Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Loidl <martin.loidl@gmail.com>2018-07-08 15:32:48 +0300
committerVojtech Kral <vojtech@kral.hk>2018-08-21 12:12:53 +0300
commitdd1fd66a47f64ca8bfba736728787d2781a983e1 (patch)
tree1819abf9b93200ed4bbe7fcff4b9584a152a5a69 /lib/Slic3r/GUI
parent3433e8e3743f8aebea940ae92e3f26fec03c7a22 (diff)
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
Diffstat (limited to 'lib/Slic3r/GUI')
-rw-r--r--lib/Slic3r/GUI/Plater.pm15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm
index a0eef72fe..89f803228 100644
--- a/lib/Slic3r/GUI/Plater.pm
+++ b/lib/Slic3r/GUI/Plater.pm
@@ -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) {