From 60582e33bf8f0bbbcc8c760b4aa796cd2470ec5b Mon Sep 17 00:00:00 2001 From: Mariano Alvira Date: Sat, 9 May 2009 13:22:14 -0400 Subject: [PATCH 1/3] changed the test condition to match the end of the captured string. this is better in case there is junk at the beginning or if the first one is incomplete. also removed the debug ARGV print --- mc1322x-load.pl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mc1322x-load.pl b/mc1322x-load.pl index 666801a68..4034c2191 100755 --- a/mc1322x-load.pl +++ b/mc1322x-load.pl @@ -34,8 +34,6 @@ if($filename eq '') { exit; } -print @ARGV; - my $ob = Device::SerialPort->new ($term) or die "Can't start $term\n"; # next test will die at runtime unless $ob @@ -64,7 +62,7 @@ while(1) { $test = 'CONNECT'; } - until($ret eq $test) { + until($ret =~ /$test$/) { ($count,$c) = $ob->read(1); if ($count == 0) { print '.'; From d60cc72ac411f528a89c0f6d383d0cf24d6a4937 Mon Sep 17 00:00:00 2001 From: Mariano Alvira Date: Sat, 9 May 2009 14:42:07 -0400 Subject: [PATCH 2/3] terminate extra data string with a comma for flasher.c --- mc1322x-load.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/mc1322x-load.pl b/mc1322x-load.pl index 4034c2191..413d71f91 100755 --- a/mc1322x-load.pl +++ b/mc1322x-load.pl @@ -108,6 +108,7 @@ print @ARGV; print "\n"; $ob->write(@ARGV); +$ob->write(','); while(1) { print $ob->input; From c68af8819f245744c169dcbc93f953a851465b60 Mon Sep 17 00:00:00 2001 From: Mariano Alvira Date: Sat, 9 May 2009 14:53:27 -0400 Subject: [PATCH 3/3] print appended , to the extra data --- mc1322x-load.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mc1322x-load.pl b/mc1322x-load.pl index 413d71f91..8bd2b8b5b 100755 --- a/mc1322x-load.pl +++ b/mc1322x-load.pl @@ -105,7 +105,7 @@ print "done sending files.\n"; print "sending " ; print @ARGV; -print "\n"; +print ",\n"; $ob->write(@ARGV); $ob->write(',');