Skip to content
Permalink
Browse files

read layer height, exposure time and settling time from slacer README…

….txt in zip archive

read overshoot from config file
defined overshoot default in config file
soem debugcode for new variables - will be removed later on
  • Loading branch information...
rkoeppl committed May 7, 2016
1 parent 0fd8e18 commit 3595f04a34ee510f0151c47c1bcde5e61c4cd697
Showing with 23 additions and 4 deletions.
  1. +2 −0 modules/printengine.cfg
  2. +21 −4 modules/printengine.pl
@@ -30,6 +30,8 @@ Z_max_speed="10"
#mm/s
Z_Autocal="True"
#Automatically determine Z-travel by triggering both endstops and dividing the Distance
overshoot="2"
#overshoot in mm to make sure the whole area is covered in resin correctly
testrun_capable="true"
#Capability to run testruns with wavelengthe that do not trigger polymerisation
testrun_color="RED"
@@ -46,6 +46,7 @@
my $Z_speed=$cfg->param("Z_speed");
my $Z_max_speed=$cfg->param("Z_max_speed");
my $Z_Autocal=$cfg->param("Z_Autocal");
my $overshoot=$cfg->param("overshoot");
my $testrun_capable=$cfg->param("testrun_capable");
my $testrun_color=$cfg->param("testrun_color");
my $prodrun_color=$cfg->param("prodrun_color");
@@ -76,7 +77,10 @@
my $picturesarchive;
my $archivesource;
GetOptions("picturesarchive=s"=>\$picturesarchive, "archivesource=s"=>\$archivesource);#read pictures archive from command line option

my $layer_height;
my $exposure_time;
my $resin_settling_time;
my $cfg2;
#
#
#activate logging to logfile
@@ -90,6 +94,8 @@
#check if the parameters and pins needed for the features enabled are configured
unless (defined $steps_per_mm and length $steps_per_mm){
die "No steps per mm for Z Axis defined\n";}
unless (defined $overshoot and length $overshoot){
die "No overshoot for Z Axis defined\n";}
unless (defined $temporary_folder and length $temporary_folder){
die "No temporary folder defined\n";}
unless (defined $controllerboard and length $controllerboard){
@@ -230,7 +236,12 @@
#read filelist from testfolder
my $dir = $temporary_folder;
if ($archivesource eq "slacer") {
$dir = "$temporary_folder/slices";}
$dir = "$temporary_folder/slices";
$cfg2 = new Config::Simple();
$cfg2->read("$temporary_folder/README.txt");
$layer_height=$cfg2->param("layer_height");
$exposure_time=$cfg2->param("exposure_time");
$resin_settling_time=$cfg2->param("resin_settling_time");}
else {
$dir = $temporary_folder;
}
@@ -243,6 +254,11 @@
closedir(DIR);
#sort array
my @pics_sorted=sort { length $a <=> length $b||$a cmp $b } @pics;
say "layer_height=$layer_height µm, exposure_time=$exposure_time ms,resin_settling_time=$resin_settling_time ms\n";
my $exposure_time_us=1000*$exposure_time;#conversion to microseconds
my $resin_settling_time_us=1000*$resin_settling_time;#conversion to microseconds
sleep 10;

#print @pics_sorted;

#builtin framebuffer access
@@ -254,6 +270,7 @@
foreach(@pics_sorted){
$fb->clear_screen('OFF');
$fb->blit_write(
Time::HiRes::usleep("$resin_settling_time_us");
$fb->load_image(
{

@@ -270,6 +287,6 @@
}
)
);
sleep 1;
$fb->clear_screen('ON');
Time::HiRes::usleep("$exposure_time_us");
}
$fb->clear_screen('ON');

0 comments on commit 3595f04

Please sign in to comment.
You can’t perform that action at this time.