75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
# File 'lib/class/I2C/I2c_export.rb', line 75
def control_export_result(type, stop, time)
time = Time.new - time
if type == 'partial'
toCompare = ((stop - @i2c_export_gui.lie_start.text.to_i) + 1)
else
toCompare = @chip_settings.i2c_total_size
end
file_size = File.size(@filepath)
if toCompare == file_size
Qt::MessageBox.new(Qt::MessageBox::Information, 'Information', "Dump finished at #{((file_size / time)).round(2)}Bytes/s (#{(file_size)} Bytes in #{time.round(4)} s)").exec
else
Qt::MessageBox.new(Qt::MessageBox::Critical, 'Error', 'Dump error: Size does not match').exec
end
p "DUMP #{((file_size / time)).round(2)}Bytes/s (#{(file_size)}Bytes in #{time.round(4)} s)"
end
|