From 0fa1273cc9d25b67b18b172cc347d40be821b09d Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Tue, 3 Feb 2015 10:51:20 -0800 Subject: [PATCH 1/2] draw background behind bandwidth overlay stats --- interface/src/ui/Stats.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/interface/src/ui/Stats.cpp b/interface/src/ui/Stats.cpp index b271891ed9..dd179cc7c0 100644 --- a/interface/src/ui/Stats.cpp +++ b/interface/src/ui/Stats.cpp @@ -315,6 +315,11 @@ void Stats::display( verticalOffset = 0; horizontalOffset = _lastHorizontalOffset + _generalStatsWidth + 1; + if (columnOneWidth == _generalStatsWidth) { + drawBackground(backgroundColor, horizontalOffset, 0, _bandwidthStatsWidth, lines * STATS_PELS_PER_LINE + 10); + } + horizontalOffset += 5; + char packetsPerSecondString[30]; sprintf(packetsPerSecondString, "Packets In/Out: %d/%d", inPacketsPerSecond, outPacketsPerSecond); char averageMegabitsPerSecond[30]; From d2c70936e3f96f8ce2d46d9a8416da54b8590b81 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Tue, 3 Feb 2015 10:51:35 -0800 Subject: [PATCH 2/2] coding standard, remove unneeded asserts --- libraries/networking/src/BandwidthRecorder.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/libraries/networking/src/BandwidthRecorder.cpp b/libraries/networking/src/BandwidthRecorder.cpp index f03aaa4150..bb7a0c2188 100644 --- a/libraries/networking/src/BandwidthRecorder.cpp +++ b/libraries/networking/src/BandwidthRecorder.cpp @@ -11,7 +11,6 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -#include #include #include "BandwidthRecorder.h" @@ -53,17 +52,18 @@ void BandwidthRecorder::Channel::updateOutputAverage(const float sample) { } BandwidthRecorder::BandwidthRecorder() { - for (uint i=0; i