Author: adrian
Date: Thu May 14 05:01:18 2020
New Revision: 361025
URL: https://svnweb.freebsd.org/changeset/base/361025

Log:
  [ath] Extend the colours to 4, not 2.
  
  There's 8 bins in the upcoming changeset to ath/ath_rate, so I need
  more colours.  Yeah, I know.

Modified:
  head/tools/tools/ath/athratestats/main.c

Modified: head/tools/tools/ath/athratestats/main.c
==============================================================================
--- head/tools/tools/ath/athratestats/main.c    Thu May 14 04:00:35 2020        
(r361024)
+++ head/tools/tools/ath/athratestats/main.c    Thu May 14 05:01:18 2020        
(r361025)
@@ -122,7 +122,7 @@ ath_sample_stats(struct ath_ratestats *r, struct ath_r
            (long long) sn->ratemask);
 
        for (y = 0; y < NUM_PACKET_SIZE_BINS; y++) {
-               PRINTATTR_ON(COLOR_PAIR(4 + (y % 2)) | A_BOLD);
+               PRINTATTR_ON(COLOR_PAIR(2 + (y % 4)) | A_BOLD);
                PRINTMSG("[%4u] cur rate %d %s since switch: "
                    "packets %d ticks %u ",
                    bin_to_size(y),
@@ -132,17 +132,16 @@ ath_sample_stats(struct ath_ratestats *r, struct ath_r
                    sn->ticks_since_switch[y]);
 
                PRINTMSG("last sample (%d %s) cur sample (%d %s) "
-                   "packets sent %d\n",
+                   "packets sent %d ",
                    dot11rate(rt, sn->last_sample_rix[y]),
                    dot11str(rt, sn->last_sample_rix[y]),
                    dot11rate(rt, sn->current_sample_rix[y]),
                    dot11str(rt, sn->current_sample_rix[y]),
                    sn->packets_sent[y]);
-               PRINTATTR_OFF(COLOR_PAIR(4 + (y % 2)) | A_BOLD);
+               PRINTATTR_OFF(COLOR_PAIR(2 + (y % 4)) | A_BOLD);
                
-               PRINTATTR_ON(COLOR_PAIR(3) | A_BOLD);
-               PRINTMSG("[%4u] packets since sample %d sample tt %u\n",
-                   bin_to_size(y),
+               PRINTATTR_ON(COLOR_PAIR(1) | A_BOLD);
+               PRINTMSG("packets since sample %d sample tt %u\n",
                    sn->packets_since_sample[y],
                    sn->sample_tt[y]);
                PRINTATTR_OFF(COLOR_PAIR(3) | A_BOLD);
@@ -156,9 +155,9 @@ ath_sample_stats(struct ath_ratestats *r, struct ath_r
                        if (sn->stats[y][rix].total_packets == 0)
                                continue;
                        if (rix == sn->current_rix[y])
-                               PRINTATTR_ON(COLOR_PAIR(y+4) | A_BOLD);
+                               PRINTATTR_ON(COLOR_PAIR(2 + (y % 4)) | A_BOLD);
                        else if (rix == sn->last_sample_rix[y])
-                               PRINTATTR_ON(COLOR_PAIR(3) | A_BOLD);
+                               PRINTATTR_ON(COLOR_PAIR(1) | A_BOLD);
 #if 0
                        else if (sn->stats[y][rix].ewma_pct / 10 < 50)
                                PRINTATTR_ON(COLOR_PAIR(2) | A_BOLD);
@@ -179,9 +178,9 @@ ath_sample_stats(struct ath_ratestats *r, struct ath_r
                            sn->stats[y][rix].average_tx_time,
                            sn->stats[y][rix].last_tx);
                        if (rix == sn->current_rix[y])
-                               PRINTATTR_OFF(COLOR_PAIR(y+4) | A_BOLD);
+                               PRINTATTR_OFF(COLOR_PAIR(2 + (y % 4)) | A_BOLD);
                        else if (rix == sn->last_sample_rix[y])
-                               PRINTATTR_OFF(COLOR_PAIR(3) | A_BOLD);
+                               PRINTATTR_OFF(COLOR_PAIR(1) | A_BOLD);
 #if 0
                        else if (sn->stats[y][rix].ewma_pct / 10 < 50)
                                PRINTATTR_OFF(COLOR_PAIR(2) | A_BOLD);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to