mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-11-22 21:50:18 +00:00
Compare commits
No commits in common. "cecb4b3acbbb0605cf83b6ebc66adc907c053c57" and "9e4ae3c6fe776f55c31638ba894e35fd142dc50c" have entirely different histories.
cecb4b3acb
...
9e4ae3c6fe
@ -193,12 +193,7 @@ class AndroidBluetoothManager():
|
||||
if self.connected and self.rfcomm_reader != None:
|
||||
available = self.rfcomm_reader.available()
|
||||
if available > 0:
|
||||
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
|
||||
return self.rfcomm_reader.readNBytes(available)
|
||||
else:
|
||||
return bytes([])
|
||||
else:
|
||||
|
@ -217,10 +217,7 @@ def prettytime(time, verbose=False):
|
||||
|
||||
tstr += c
|
||||
|
||||
if tstr == "":
|
||||
return "0s"
|
||||
else:
|
||||
return tstr
|
||||
return tstr
|
||||
|
||||
def phyparams():
|
||||
print("Required Physical Layer MTU : "+str(Reticulum.MTU)+" bytes")
|
||||
|
Loading…
Reference in New Issue
Block a user