New option to specify G-code to be used at layer change. #279

This commit is contained in:
Alessandro Ranellucci 2012-03-26 12:14:15 +02:00
parent bf964b5273
commit 1a06e35687
6 changed files with 24 additions and 10 deletions

View file

@ -255,7 +255,7 @@ our $Options = {
type => 's',
multiline => 1,
width => 350,
height => 150,
height => 120,
serialize => sub { join '\n', split /\R+/, $_[0] },
deserialize => sub { join "\n", split /\\n/, $_[0] },
},
@ -265,7 +265,17 @@ our $Options = {
type => 's',
multiline => 1,
width => 350,
height => 150,
height => 120,
serialize => sub { join '\n', split /\R+/, $_[0] },
deserialize => sub { join "\n", split /\\n/, $_[0] },
},
'layer_gcode' => {
label => 'Layer Change GCODE',
cli => 'layer-gcode=s',
type => 's',
multiline => 1,
width => 350,
height => 50,
serialize => sub { join '\n', split /\R+/, $_[0] },
deserialize => sub { join "\n", split /\\n/, $_[0] },
},
@ -475,7 +485,7 @@ sub validate_cli {
my $class = shift;
my ($opt) = @_;
for (qw(start end)) {
for (qw(start end layer)) {
if (defined $opt->{$_."_gcode"}) {
if ($opt->{$_."_gcode"} eq "") {
set($_."_gcode", "");