Closed i-like-rockets closed 3 months ago
Unfortunately there is no useful commit message to explain why |=
was necessitated, 3yago.
It seems to be truly an unnecessary change 3 years ago while the same code is right in the library for OBD-II UART adapter. It really should be = instead of |=.
This issue is fixed now and thanks for the finding.
https://github.com/stanleyhuangyc/Freematics/blob/8612784dbb481933b9e356d6c8cbf3e483a27360/libraries/FreematicsPlus/FreematicsOBD.cpp#L412
Since the pidmap reference in #399
memset(pidmap, 0xff, sizeof(pidmap));
sets all values to0xff
, there seems to be no instance where this|=
would ever equate to anything except0xff
.If this interpretation is correct, either this sign should changed to
=
(default to keep PID in map) or thememset
command should be removed (default to ignore PID).