mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-08-06 17:03:04 +02:00
enhance MaxBuffer Test
sets the lower limit to 150
This commit is contained in:
+1
-1
@@ -173,7 +173,7 @@ def handle_ping(message_from_id, deviceID, message, hop, snr, rssi, isDM, chann
|
||||
if pingCount > 1:
|
||||
multiPingList.append({'message_from_id': message_from_id, 'count': pingCount + 1, 'type': type, 'deviceID': deviceID, 'channel_number': channel_number})
|
||||
if type == "🎙TEST":
|
||||
msg = f"🎙Initalizing BufferTest, range {int(maxBuffer / pingCount)} to {maxBuffer} in {pingCount} messages"
|
||||
msg = f"🎙Initalizing BufferTest, range {int(((maxBuffer - 150 ) / pingCount) + 150)} to {maxBuffer} in {pingCount} messages"
|
||||
else:
|
||||
msg = f"🚦Initalizing {pingCount} auto-ping"
|
||||
|
||||
|
||||
+3
-1
@@ -610,7 +610,9 @@ def handleMultiPing(nodeID=0, deviceID=1):
|
||||
|
||||
if type == '🎙TEST':
|
||||
# use the type for a string of random data divided by MAXBUFFER and count for the length of the string
|
||||
type = ''.join(random.choice(['0', '1']) for i in range(int(maxBuffer / count)))
|
||||
type = ''.join(random.choice(['0', '1']) for i in range(int((maxBuffer - 150 ) / count)))
|
||||
# add the 150 back into the string as random data, this was for finer resolution of the count on the upper limit
|
||||
type = type + ''.join(random.choice(['0', '1']) for i in range(150))
|
||||
count = len(type + "🔂 ")
|
||||
if count < 99:
|
||||
# why? because the count likes to count, and it counts the count
|
||||
|
||||
Reference in New Issue
Block a user