Skip to content

Commit 8b41c57

Browse files
committed
minor fixes
minor fixes
1 parent 100d768 commit 8b41c57

1 file changed

Lines changed: 2 additions & 46 deletions

File tree

‎main.py‎

Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
QLineEdit, QGridLayout, QTableWidget, QAbstractItemView, QTableWidgetItem, QHeaderView,
3131
QGroupBox, QDialog, QProgressDialog, QInputDialog, QCheckBox,
3232
QTextEdit, QFontComboBox, QGraphicsOpacityEffect, QTextBrowser, QDialogButtonBox,
33-
QScrollArea, QProgressBar)
33+
QScrollArea)
3434

3535
if platform.system() == "Darwin":
3636
extra_paths = [
@@ -393,49 +393,6 @@ def cleanup():
393393
worker.start()
394394
return worker
395395

396-
def calculate_score(avg, jitter, loss):
397-
if avg is None:
398-
return 999999
399-
400-
return (
401-
avg
402-
+ (jitter * 1.5)
403-
+ (loss * 12)
404-
)
405-
406-
def _status_from_metrics(avg, loss):
407-
if avg is None:
408-
return "Blocked"
409-
if loss >= 50:
410-
return "Unstable"
411-
if avg > 300:
412-
return "Slow"
413-
return "OK"
414-
415-
def _mark_recommended(results):
416-
candidates = [
417-
r for r in results
418-
if r.protocol and r.status == "OK"
419-
]
420-
if not candidates:
421-
return
422-
423-
best = min(
424-
candidates,
425-
key=lambda r: r.avg_latency_ms or 9999
426-
)
427-
best.recommended = True
428-
429-
def verify_live_connection(timeout=7):
430-
start_time = time.time()
431-
while time.time() - start_time < timeout:
432-
res = run_warp_command("warp-cli", "status")
433-
if res.returncode == 0:
434-
if "Connected" in res.stdout:
435-
return True
436-
time.sleep(1.0)
437-
return False
438-
439396
# -----------------------------------------------------
440397

441398
@dataclass
@@ -937,8 +894,7 @@ def run(self):
937894
total_tasks = len(tasks)
938895
successful_profiles = []
939896

940-
self.log_signal.emit(
941-
f"<span style='color: #58a6ff; font-weight:bold;'>[SYS]</span> Initializing Hardware Network Diagnostics...")
897+
self.log_signal.emit("<span style='color: #58a6ff; font-weight:bold;'>[SYS]</span> Initializing Hardware Network Diagnostics...")
942898
self.log_signal.emit(
943899
f"<span style='color: #58a6ff; font-weight:bold;'>[SYS]</span> Queued {total_tasks} routing payload configurations.<br>")
944900
time.sleep(1.0)

0 commit comments

Comments
 (0)