Fix calculation of the maximum RSSI value
This commit is contained in:
parent
f407dea8ff
commit
244b06f25d
1 changed files with 1 additions and 1 deletions
|
@ -67,7 +67,7 @@ public class ViewRSSI extends JPanel {
|
||||||
String[] parts = line.substring(5).split(" ");
|
String[] parts = line.substring(5).split(" ");
|
||||||
for (int i = 0, n = parts.length; i < n; i++) {
|
for (int i = 0, n = parts.length; i < n; i++) {
|
||||||
rssi[i] = 3 * Integer.parseInt(parts[i]);
|
rssi[i] = 3 * Integer.parseInt(parts[i]);
|
||||||
if (rssi[i] > rssiMax[i])
|
if (rssi[i] >= rssiMax[i])
|
||||||
rssiMax[i] = rssi[i];
|
rssiMax[i] = rssi[i];
|
||||||
else if (rssiMax[i] > 0)
|
else if (rssiMax[i] > 0)
|
||||||
rssiMax[i]--;
|
rssiMax[i]--;
|
||||||
|
|
Loading…
Reference in a new issue