Permalink
Browse files

sanity checks for builtin FB access

  • Loading branch information...
1 parent 4a66eec commit c4400ae5449320a7e15e62975d012642a0fdd31e @rkoeppl rkoeppl committed May 5, 2016
Showing with 14 additions and 4 deletions.
  1. +14 −4 modules/printengine.pl
View
@@ -187,17 +187,26 @@
my $display_software_path= which "fbi";
unless (defined $display_software_path and length $display_software_path){
die "configured display software not found\n";}
-unless (defined $display_software_path and length $display_software_path){
-die "configured display software not found\n";}
+unless (defined $display_device and length $display_device){
+die "display devicde not configured\n";}
+unless (defined $virtual_terminal and length $virtual_terminal){
+die "virtual terminal not configured\n";}
+}
+elsif ($display_software eq "builtin")
+{
+unless (defined $display_device and length $display_device){
+die "display device not configured\n";}
}
+
else { #if the configured Display software matches none of the supported packages, die
say "unknows display software $display_software , please review your configuration, get in touch with developers or fork the code on Github and contribute the code to use the new printer"
;
die "unknown display software in configuration!\n";
}
######testcode framebuffer access
my $fb = Graphics::Framebuffer->new( FB_DEVICE=>$display_device );
- $fb->cls();
+ #$fb->cls();
+ $fb->clear_screen('OFF');
$fb->blit_write(
$fb->load_image(
{
@@ -217,5 +226,6 @@
)
);
sleep 3;
-$fb->cls();
+$fb->clear_screen('OFF');
+

0 comments on commit c4400ae

Please sign in to comment.