pynmea2 icon indicating copy to clipboard operation
pynmea2 copied to clipboard

Add an option for ignoring wrong checksum

Open roseshahar opened this issue 7 years ago • 8 comments

I want to add an option for not raising an exception when your try to parse with wrong checksum

roseshahar avatar Mar 29 '19 13:03 roseshahar

Coverage Status

Coverage remained the same at 98.057% when pulling bd68950bbb804cf4695087a6e9e0f43966f681e4 on shaharrose:feature/parse-ignore-wrong-checksum into c4fc66c6a13dd85ad862b15c516245af6e571456 on Knio:master.

coveralls avatar Mar 29 '19 13:03 coveralls

Why not use the already existing check parameter (still fixing the logic)?

xOneca avatar Mar 29 '19 16:03 xOneca

Why not use the already existing check parameter (still fixing the logic)?

@xOneca Because the check requires the NMEA sentence to have checksum in it, and I feel that allowing wrong checksum needs a parameter of its own

roseshahar avatar Mar 29 '19 18:03 roseshahar

Allowing wrong checksum is not checking it, isn't it?

I mean, it seems to me that the original check parameter should be doing what you want to do with the new parameter, but it isn't doing it. I would make check raise an exception only if there's no checksum or the check is wrong.

xOneca avatar Mar 29 '19 19:03 xOneca

@xOneca I think that the check argument is really weird as well, but I think that @Knio should agree to the change of the check purpose

roseshahar avatar Mar 29 '19 19:03 roseshahar

Sure.

xOneca avatar Mar 29 '19 19:03 xOneca

I think this is fixed in a pull request I just made: https://github.com/Knio/pynmea2/pull/115

fohrloop avatar Jul 07 '20 14:07 fohrloop

It feels to me more correct the fix in 91204afa from @np-8.

xOneca avatar Jul 09 '20 17:07 xOneca