Fix calculation of the maximum RSSI value

This commit is contained in:
Moritz 'Morty' Strübe 2013-08-14 16:33:55 +02:00
parent f407dea8ff
commit 244b06f25d

View File

@ -67,7 +67,7 @@ public class ViewRSSI extends JPanel {
String[] parts = line.substring(5).split(" ");
for (int i = 0, n = parts.length; i < n; i++) {
rssi[i] = 3 * Integer.parseInt(parts[i]);
if (rssi[i] > rssiMax[i])
if (rssi[i] >= rssiMax[i])
rssiMax[i] = rssi[i];
else if (rssiMax[i] > 0)
rssiMax[i]--;