app/models/extface/driver/datecs/fp550.rb in extface-0.4.9 vs app/models/extface/driver/datecs/fp550.rb in extface-0.5.0

- old
+ new

@@ -210,10 +210,10 @@ def frecv(timeout) # return Frame or nil rframe = nil BAD_SEQ_MAX_COUNT.times do if frame_bytes = pull(timeout) rframe = Frame.new(frame_bytes.b) - if rframe.seq.ord == sequence_number(false) #accept only current sequence number as reply + if rframe.seq.nil? || rframe.seq.ord == sequence_number(false) #accept only current sequence number as reply break else errors.add :base, "Sequence mismatch" p "Invalid sequence (expected: #{sequence_number(false).to_s(16)}, got: #{rframe.seq.ord.to_s(16)})" rframe = nil #invalidate mismatch sequence frame for the last retry \ No newline at end of file