- int AltosRSSI() throws TimeoutException, InterruptedException {
- link.printf("s\n");
- String line = link.get_reply_no_dialog(5000);
- if (line == null)
- throw new TimeoutException();
- String[] items = line.split("\\s+");
- if (items.length < 2)
- return 0;
- if (!items[0].equals("RSSI:"))
- return 0;
- int rssi = Integer.parseInt(items[1]);
- return rssi;
- }
-