From 8613aa25008d0395a0eb21c2c7a2e394fd5ef81c Mon Sep 17 00:00:00 2001 From: Explorer09 Date: Mon, 13 Nov 2023 02:42:56 +0800 Subject: [PATCH] NetworkIOMeter: remove code for auto-updating "total" --- NetworkIOMeter.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/NetworkIOMeter.c b/NetworkIOMeter.c index f61ce6bce3..6366a3d1ae 100644 --- a/NetworkIOMeter.c +++ b/NetworkIOMeter.c @@ -111,9 +111,6 @@ static void NetworkIOMeter_updateValues(Meter* this) { this->values[0] = cached_rxb_diff; this->values[1] = cached_txb_diff; - if (cached_rxb_diff + cached_txb_diff > this->total) { - this->total = cached_rxb_diff + cached_txb_diff; - } if (status == RATESTATUS_NODATA) { xSnprintf(this->txtBuffer, sizeof(this->txtBuffer), "no data"); @@ -171,7 +168,7 @@ const MeterClass NetworkIOMeter_class = { .defaultMode = TEXT_METERMODE, .maxItems = 2, .isPercentChart = false, - .total = 100.0, + .total = 1.0, .attributes = NetworkIOMeter_attributes, .name = "NetworkIO", .uiName = "Network IO",