From: Michael Tremer Date: Tue, 21 Oct 2025 13:53:38 +0000 (+0000) Subject: graphs: Try to make the signal graph a bit more colourful X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=286e63e6bb7eb076ab51ce9d5c1b28b41baf11da;p=oddments%2Fcollecty.git graphs: Try to make the signal graph a bit more colourful Signed-off-by: Michael Tremer --- diff --git a/src/daemon/graphs/hostapd-station-signal.c b/src/daemon/graphs/hostapd-station-signal.c index cbda0df..7df75c2 100644 --- a/src/daemon/graphs/hostapd-station-signal.c +++ b/src/daemon/graphs/hostapd-station-signal.c @@ -50,13 +50,23 @@ static int hostapd_station_signal_render(td_ctx* ctx, if (r < 0) return r; + // Compute different quality levels + COMPUTE_LIMIT(args, "signal_good", "signal", object, -LONG_MAX, -50L); + COMPUTE_LIMIT(args, "signal_fair", "signal", object, -LONG_MAX, -60L); + COMPUTE_LIMIT(args, "signal_poor", "signal", object, -LONG_MAX, -70L); + // Header PRINT_HEADER4(args, _("Current"), _("Average"), _("Minimum"), _("Maximum")); // Draw signal - DRAW_LINE2_WITH_LABEL(args, "signal", object, BLACK, _("Signal")); + DRAW_LINE2_WITH_LABEL(args, "signal", object, GREEN, _("Signal")); PRINT_CAMM(args, "signal", object, FLOAT_WITH_UNIT, _("dBm")); + // Draw the lower signal quality in different colors + DRAW_LINE2(args, "signal_good", object, YELLOW); + DRAW_LINE2(args, "signal_fair", object, ORANGE); + DRAW_LINE2(args, "signal_poor", object, RED); + // Draw last ACK signal DRAW_LINE2_WITH_LABEL(args, "last_ack_signal", object, GREY, _("Last ACK Signal")); PRINT_CAMM(args, "last_ack_signal", object, FLOAT_WITH_UNIT, _("dBm"));