Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failure on macOS #16

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion SnifferAPI/Devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def appendOrUpdate(self, newDevice):
existingDevice.name = newDevice.name
updated = True

if (newDevice.RSSI < (newDevice.RSSI - 5)) or (existingDevice.RSSI > (newDevice.RSSI+2)):
if (existingDevice.RSSI < (newDevice.RSSI - 5)) or (existingDevice.RSSI > (newDevice.RSSI+2)):
existingDevice.RSSI = newDevice.RSSI
updated = True

Expand Down
3 changes: 2 additions & 1 deletion SnifferAPI/Packet.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ def findSerialPort(self):

try:
self.uart.ser.port = iPort
self.uart.ser.open()
if not self.uart.ser.isOpen():
self.uart.ser.open()
self.sendPingReq()
startTime = time.time()
continueLoop = True
Expand Down
2 changes: 1 addition & 1 deletion SnifferAPI/SnifferCollector.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def _continuouslyPipe(self):
while not self._exit:
try:
packet = self._packetReader.getPacket(timeout = 2)
if not packet.valid:
if packet is None or not packet.valid:
raise Exceptions.InvalidPacketException("")
except Exceptions.SnifferTimeout as e:
logging.info(str(e))
Expand Down