1
0
Fork 0

RFID: Update comment refering to -ID

When a tag leaves, we don't negate the ID which would be
implied by writing -ID.
Clarify that we set the sign bit instead.
This commit is contained in:
Teo-CD 2023-10-16 22:16:47 +01:00
parent bedd1f4f95
commit da837ffbb4
2 changed files with 3 additions and 3 deletions

View file

@ -23,7 +23,7 @@
struct uidNode {
MFRC522Constants::Uid uid{};
uidNode* next = nullptr;
// IDs should be positive integers < 127 as the sign is used for direction.
// IDs should be positive integers < 127 as the sign bit is used for direction.
int8_t tag_ID = 0;
};
@ -36,7 +36,7 @@ public:
* at a time, another call would be needed to get eventual concurrent events.
* This updates the respective lists and returns the ID with the direction
* of the change.
* @return 0 if no change, +ID if new tag detected, -ID if the tag left.
* @return 0 if no change, ID if new tag detected, ID & sign bit if the tag left.
*/
int8_t checkTags();
private: