Currently, read_gt3x throws an error if it encounters a bad packet. It is not safe to assume that all packets are good, although bad packets are rare. This fix returns NULL for bad packets, and then fills in values by latching to the end of the previous packet. A message is issued concerning the total number of bad packets. A warning would be preferable, but the gt3x filename is not accessible within the log.bin parsing functions. It seems a waste to pass a new argument around just for the sake of a warning message that will rarely be used, so for now the message is in place. It is not tied to verbose (i.e., it will print regardless), but it may make sense to do that in the future. For now, I like to know if anything unusual is going on, no matter what.
Currently,
read_gt3x
throws an error if it encounters a bad packet. It is not safe to assume that all packets are good, although bad packets are rare. This fix returnsNULL
for bad packets, and then fills in values by latching to the end of the previous packet. A message is issued concerning the total number of bad packets. A warning would be preferable, but thegt3x
filename is not accessible within thelog.bin
parsing functions. It seems a waste to pass a new argument around just for the sake of a warning message that will rarely be used, so for now the message is in place. It is not tied toverbose
(i.e., it will print regardless), but it may make sense to do that in the future. For now, I like to know if anything unusual is going on, no matter what.