enhance MaxBuffer Test

sets the lower limit to 150
This commit is contained in:
SpudGunMan
2024-11-28 19:35:18 -08:00
parent e78c441a6e
commit 877d0cf7f8
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -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
View File
@@ -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