eter;
use JSON;
sub new {
my ($class, $machine_type) = @_;
my $self = {};
bless $self, $class;
$self->{INTERPRETER} = Gcode::Interpreter->new($machine_type);
$self->{JSON} = JSON->new();
#$self->{JSON}->pretty(1);
$self->{WAYPOINT_LINES} = 0;
$self->{META_FILE} = undef;
return $self;
}
sub set_meta_file {
my ($self, $file) = @_;
$self->{META_FILE} = $file;
return 1;
}
open meta file $tmp_meta to write to it: $!\n";
return 0;
}
my $json = $self->{JSON}->encode($data);
print META $json;
foreach my $key (sort keys %$data) {
print "$key: " . $data->{$k