successfully maintained 30khz, lots of optimization of code and buffering allocation

This commit is contained in:
Simen Svale Skogsrud
2010-03-03 00:26:48 +01:00
parent 2be1f473cd
commit df243d2490
5 changed files with 56 additions and 102 deletions

View File

@ -29,7 +29,7 @@ SerialPort.open('/dev/tty.usbserial-A9007QcR', 9600) do |sp|
sleep 5
ARGV.each do |file|
puts "Processing file #{file}"
prebuffer = $prebuffer ? 7 : 0
prebuffer = $prebuffer ? 12 : 0
File.readlines(file).each do |line|
next if line.strip == ''
puts line.strip