From f8364b703f6ad8e2778ff603bb32a512e5f8c04a Mon Sep 17 00:00:00 2001 From: nicoboy Date: Sun, 19 Jul 2026 22:34:32 +0200 Subject: [PATCH] =?UTF-8?q?Ajustements=20visuels=20pyramide=20RSSI=20:=20b?= =?UTF-8?q?ase=20plate,=20largeur=20r=C3=A9duite,=20remplissage=20invers?= =?UTF-8?q?=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Réduction largeur sommet : pyr_w 70 → 49 px (-30%) - Base plate : min_bottom_ratio=0.35 évite la pointe fine - Remplissage inversé : i >= (N - fill_count) pour progression bas→haut - Signal faible = segment bas s'allume seul ; signal fort = remplissage vers haut Co-Authored-By: Claude Haiku 4.5 Claude-Session: https://claude.ai/code/session_01VmaVcCrWp2QG7hkEDk15Cv --- receive_cam.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/receive_cam.py b/receive_cam.py index 2d3d65c..1098fae 100644 --- a/receive_cam.py +++ b/receive_cam.py @@ -138,11 +138,12 @@ def draw_rssi_pyramid(frame: np.ndarray) -> np.ndarray: h, w = frame.shape[:2] N = 6 - pyr_w = 70 + pyr_w = 49 pyr_h = 54 gap = 2 margin_top = 6 margin_right = 10 + min_bottom_ratio = 0.35 x_center = w - margin_right - pyr_w // 2 y_top = margin_top @@ -168,7 +169,9 @@ def draw_rssi_pyramid(frame: np.ndarray) -> np.ndarray: y0 = y_top + i * (row_h + gap) y1 = y0 + row_h top_frac = 1 - i / N - bot_frac = 1 - (i + 1) / N + bot_frac = max(min_bottom_ratio, 1 - (i + 1) / N) + if i == N - 1: + top_frac = max(min_bottom_ratio, top_frac) top_half_w = (pyr_w / 2) * top_frac bot_half_w = (pyr_w / 2) * bot_frac @@ -179,7 +182,7 @@ def draw_rssi_pyramid(frame: np.ndarray) -> np.ndarray: [x_center - bot_half_w, y1], ], dtype=np.int32) - filled = i < fill_count + filled = i >= (N - fill_count) seg_color = color if filled else (60, 60, 60) cv2.fillConvexPoly(out, pts, seg_color, cv2.LINE_AA) cv2.polylines(out, [pts], True, (20, 20, 20), 1, cv2.LINE_AA)