mxgxw / MFRC522-python

A small class to interface with the NFC reader Module MFRC522
GNU Lesser General Public License v3.0
521 stars 419 forks source link

antennaOn ifstatement #58

Open SindreBrurberg opened 5 years ago

SindreBrurberg commented 5 years ago

Im not sure if this is a issue or not, but i have had a look at the antennaOn function witch on line 157 contains this if(~(temp & 0x03)): As far as my testing goes I am not able to make this statement return true. This is because of the ~ bitwize complement never return 0. Would any of you be able to shed some light on what this if statement does? or is suppose to do? I can see that you are checking if the "output signal on pin TX1 delivers the 13.56 MHz energy carrier modulated by the transmission data", also TX2. Whatever that is supposed to mean. File: MFRC522.py

SindreBrurberg commented 5 years ago

Would assume that the purpose is to check if the antenna is on already? Presumably if TX1 or TX2 or both were of? if so, i think i would just replace it with temp&0x03 != 0x03