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:
parent
bedd1f4f95
commit
da837ffbb4
2 changed files with 3 additions and 3 deletions
|
@ -23,7 +23,7 @@
|
||||||
struct uidNode {
|
struct uidNode {
|
||||||
MFRC522Constants::Uid uid{};
|
MFRC522Constants::Uid uid{};
|
||||||
uidNode* next = nullptr;
|
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;
|
int8_t tag_ID = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ public:
|
||||||
* at a time, another call would be needed to get eventual concurrent events.
|
* 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
|
* This updates the respective lists and returns the ID with the direction
|
||||||
* of the change.
|
* 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();
|
int8_t checkTags();
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -37,7 +37,7 @@ __attribute__((noreturn)) int main() {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Serial.begin(115200);
|
Serial.begin(115200);
|
||||||
Com::sendComment("# System is powered up, running set-up.");
|
Com::sendComment("System is powered up, running set-up.");
|
||||||
|
|
||||||
/* TODO: Setups once module structure is up. */
|
/* TODO: Setups once module structure is up. */
|
||||||
RFID rfid;
|
RFID rfid;
|
||||||
|
|
Loading…
Add table
Reference in a new issue