# get_test.rb
=begin
This file is part of the AVR-Crypto-Lib.
- Copyright (C) 2008, 2009 Daniel Otte (daniel.otte@rub.de)
+ Copyright (C) 2006-2015 Daniel Otte (bg@nerilex.org)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
require 'serialport'
$debug = false
+$progress_dots = false
def read_line(error_msg=true)
begin
puts("ERROR: read timeout!\n") if error_msg
return nil
end
- putc('.') if s.include?(6.chr)
+ putc('.') if s.include?(6.chr) && $progress_dots
puts(s.inspect) if $debug
end while s == 6.chr
s.gsub(/\006/, '')
end
puts("-> "+fname+"txt");
file=File.new(fname+"txt", "w");
+ file.sync = true
buffer+=lb;
file.write(buffer);
begin
$linewidth = 16
$sp = SerialPort.new(ARGV[0], ARGV[1].to_i, ARGV[2].to_i, ARGV[3].to_i, SerialPort::NONE);
$sp.read_timeout=1000; # 1 second
-$extended_wait=10;
+$extended_wait=100000;
$sp.write(command);
if(readTestVector(param)==false)