From 1b4a230a5db200f464ac38c3ba8735c2795dd0a5 Mon Sep 17 00:00:00 2001 From: Philip Edelbrock Date: Fri, 18 Jun 1999 04:51:16 +0000 Subject: [PATCH] (Phil) Improved the speed by a lot. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@490 7894878c-1315-0410-8ee3-d5d059ff63e0 --- prog/matorb/displayit.pl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/prog/matorb/displayit.pl b/prog/matorb/displayit.pl index 3641cd74..281b6a83 100755 --- a/prog/matorb/displayit.pl +++ b/prog/matorb/displayit.pl @@ -14,18 +14,20 @@ $temp=`echo "254 88" > /proc/sys/dev/sensors/matorb*/disp`; # Turn off the blinking cursor $temp=`echo "254 84" > /proc/sys/dev/sensors/matorb*/disp`; -$line=1; +$linenum=1; while () { # Reset the position of the cursor to the next line -$temp=`echo "254 71 1 $line" > /proc/sys/dev/sensors/matorb*/disp`; +$temp=`echo "254 71 1 $linenum" > /proc/sys/dev/sensors/matorb*/disp`; if (/^(.{1,20})/) { $_=$1; + $line=""; while (/(.)/gc) { $temp=ord($1); - $temp=`echo "$temp" > /proc/sys/dev/sensors/matorb*/disp`; + $line="$line $temp"; } + $temp=`echo "$line" > /proc/sys/dev/sensors/matorb*/disp`; } - $line= $line + 1; - if ($line > 4) { exit; } + $linenum+=1; + if ($linenum > 4) { exit; } }