@@ -79,7 +79,7 @@ static void NetworkIOMeter_updateValues(Meter* this) {
7979
8080 if (data .packetsReceived > cached_rxp_total ) {
8181 diff = data .packetsReceived - cached_rxp_total ;
82- diff = (1000 * diff ) / passedTimeInMs ; /* convert to pkts /s */
82+ diff = (1000 * diff ) / passedTimeInMs ; /* convert to pkt /s */
8383 cached_rxp_diff = (uint32_t )diff ;
8484 } else {
8585 cached_rxp_diff = 0 ;
@@ -96,7 +96,7 @@ static void NetworkIOMeter_updateValues(Meter* this) {
9696
9797 if (data .packetsTransmitted > cached_txp_total ) {
9898 diff = data .packetsTransmitted - cached_txp_total ;
99- diff = (1000 * diff ) / passedTimeInMs ; /* convert to pkts /s */
99+ diff = (1000 * diff ) / passedTimeInMs ; /* convert to pkt /s */
100100 cached_txp_diff = (uint32_t )diff ;
101101 } else {
102102 cached_txp_diff = 0 ;
@@ -125,7 +125,7 @@ static void NetworkIOMeter_updateValues(Meter* this) {
125125 return ;
126126 }
127127
128- xSnprintf (this -> txtBuffer , sizeof (this -> txtBuffer ), "rx:%siB/s tx:%siB/s %u/%upkts/s " ,
128+ xSnprintf (this -> txtBuffer , sizeof (this -> txtBuffer ), "rx:%siB/s tx:%siB/s ( %u/%upps) " ,
129129 cached_rxb_diff_str , cached_txb_diff_str , cached_rxp_diff , cached_txp_diff );
130130}
131131
@@ -154,8 +154,13 @@ static void NetworkIOMeter_display(ATTR_UNUSED const Object* cast, RichString* o
154154 RichString_appendAscii (out , CRT_colors [METER_VALUE_IOWRITE ], cached_txb_diff_str );
155155 RichString_appendAscii (out , CRT_colors [METER_VALUE_IOWRITE ], "iB/s" );
156156
157- int len = xSnprintf (buffer , sizeof (buffer ), " (%u/%u pkts/s) " , cached_rxp_diff , cached_txp_diff );
158- RichString_appendnAscii (out , CRT_colors [METER_TEXT ], buffer , len );
157+ RichString_appendAscii (out , CRT_colors [METER_TEXT ], " (" );
158+ int len = xSnprintf (buffer , sizeof (buffer ), "%u" , (unsigned int )cached_rxp_diff );
159+ RichString_appendnAscii (out , CRT_colors [METER_VALUE_IOREAD ], buffer , len );
160+ RichString_appendAscii (out , CRT_colors [METER_TEXT ], "/" );
161+ len = xSnprintf (buffer , sizeof (buffer ), "%u" , (unsigned int )cached_txp_diff );
162+ RichString_appendnAscii (out , CRT_colors [METER_VALUE_IOWRITE ], buffer , len );
163+ RichString_appendAscii (out , CRT_colors [METER_TEXT ], " pps)" );
159164}
160165
161166const MeterClass NetworkIOMeter_class = {
0 commit comments