mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-11-22 05:30:17 +00:00
Compare commits
2 Commits
9e4ae3c6fe
...
cecb4b3acb
Author | SHA1 | Date | |
---|---|---|---|
|
cecb4b3acb | ||
|
de53a105a4 |
@ -193,7 +193,12 @@ class AndroidBluetoothManager():
|
||||
if self.connected and self.rfcomm_reader != None:
|
||||
available = self.rfcomm_reader.available()
|
||||
if available > 0:
|
||||
return self.rfcomm_reader.readNBytes(available)
|
||||
if hasattr(self.rfcomm_reader, "readNBytes"):
|
||||
return self.rfcomm_reader.readNBytes(available)
|
||||
else:
|
||||
# Compatibility mode for older android versions lacking readNBytes
|
||||
rb = self.rfcomm_reader.read().to_bytes(1, "big")
|
||||
return rb
|
||||
else:
|
||||
return bytes([])
|
||||
else:
|
||||
|
@ -217,7 +217,10 @@ def prettytime(time, verbose=False):
|
||||
|
||||
tstr += c
|
||||
|
||||
return tstr
|
||||
if tstr == "":
|
||||
return "0s"
|
||||
else:
|
||||
return tstr
|
||||
|
||||
def phyparams():
|
||||
print("Required Physical Layer MTU : "+str(Reticulum.MTU)+" bytes")
|
||||
|
Loading…
Reference in New Issue
Block a user