Skip to content
Permalink
Browse files

disabled serial send for now

  • Loading branch information...
rkoeppl committed Jun 26, 2016
1 parent cf094c8 commit a8d506385d9cd021bb0d00391ced7640620822cd
Showing with 57 additions and 6 deletions.
  1. +57 −6 modules/printengine.pl
@@ -72,7 +72,8 @@
my $pin_vat_heater=$cfg->param("pin_vat_heater");
my $pin_vat_temperature=$cfg->param("pin_vat_temperature");
my $pin_vat_presence=$cfg->param("pin_vat_presence");

my $arduinotty=$cfg->param("arduinotty");
my $arduinottybaudrate=$cfg->param("arduinottybaudrate");
#asign additional variables
my $picturesarchive;
my $archivesource;
@@ -183,6 +184,9 @@
unless (defined $pin_trigger_post and length $pin_trigger_post and defined $pin_trigger_pre and length $pin_trigger_pre){
die "trigger pin definition incomplete\n";}
}
elsif ($controllerboard eq "raspiarduinoramps")
unless (defined $arduinotty and length $arduinotty and defined $arduinottybaudrate and length $arduinottybaudrate){
die "trigger pin definition incomplete\n";
else {
say "unknown controller type $controllerboard , please review your configuration, get in touch with developers or fork the code on Github and contribute the code to use the new printer"
;
@@ -263,9 +267,8 @@
#builtin framebuffer access

my $fb = Graphics::Framebuffer->new( FB_DEVICE=>$display_device, SPLASH=>0 );
foreach(@pics_sorted){
$fb->clear_screen('OFF');
Time::HiRes::usleep("$resin_settling_time_us");
foreach(@pics_sorted){
$fb->blit_write(
$fb->load_image(
{
@@ -284,7 +287,55 @@
)
);
Time::HiRes::usleep("$exposure_time_us");
$fb->clear_screen('OFF');
$fb->clear_screen('OFF')
Time::HiRes::usleep("$resin_settling_time_us");
}

$fb->clear_screen('ON');
$fb->clear_screen('ON');
##sendcode- to be adapted/rewritten taken from http://www.contraptor.org/about
#use Device::SerialPort;
#use Time::HiRes qw/sleep/;
#use Slurp;

#Slup each file into a command list
#my @command_list;
#for my $file ( @ARGV ){
# push @command_list, split('\n',slurp $file);
#}

#If your board autoresets when talked to ( like a Sanguino ), you can uncomment the line bellow to get the machine to home position before sending the actual gcode
#send_commands('G21','G91','G1 X-150 Y-150','G1 X-150 Y-150','G1 X-150 Y-150','G1 X-150 Y-150');

#send_commands(@command_list);

#sub send_commands{
# my @command_list = @_;

#Open port
# my $port = Device::SerialPort->new("/dev/ttyUSB0");

# 19200, 81N on the USB ftdi driver
# $port->baudrate(38400);
# $port->databits(8);
# $port->parity("none");
# $port->stopbits(1);

# while (1) {
# Poll to see if any data is coming in
# if ( my $char = $port->lookfor() ) {
# $char =~ s/\r//;
# print "$char\n";
# if( $char =~ m/^(ok|start)$/){
# #Send next command
# my $next_command = shift @command_list;
# print "$next_command\n";
# $port->write("$next_command\n");
# }else{
# print "unknown: $char\n";
# }
# }
# sleep 0.01;
# unless(@command_list){last; }
# }
#}
###end sendcode
exit 0;

0 comments on commit a8d5063

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