app/models/extface/driver/datecs/fp550.rb in extface-0.4.4 vs app/models/extface/driver/datecs/fp550.rb in extface-0.4.5
- old
+ new
@@ -22,11 +22,11 @@
errors.empty?
end
def fsend(cmd, data = "") #return data or nil
packet_data = build_packet(cmd, data) #store packet to be able to re-transmit it with the same sequence number
- p packet_data
+ result = false
invalid_frames = 0 #counter for bad responses
nak_messages = 0 #counter for rejected packets (should re-transmit the packet)
push packet_data #send packet
ACKS_MAX_WAIT.times do |retries|
errors.clear
@@ -61,10 +61,10 @@
return result
end
def frecv(timeout) # return RespFrame or nil
if frame_bytes = pull(timeout)
- return RespFrame.new(frame_bytes.b)
+ return Frame.new(frame_bytes.b)
else
errors.add :base, "No data received from device"
return nil
end
end
\ No newline at end of file