- String[] items = line.split("\\s+");
- for (int i = 0; i < items.length;) {
- if (items[i].equals("tick:")) {
- tick = Integer.parseInt(items[i+1]);
- i += 2;
- continue;
- }
- if (items[i].equals("accel:")) {
- accel = Integer.parseInt(items[i+1]);
- i += 2;
- continue;
- }
- if (items[i].equals("pres:")) {
- pres = Integer.parseInt(items[i+1]);
- i += 2;
- continue;
- }
- if (items[i].equals("temp:")) {
- temp = Integer.parseInt(items[i+1]);
- i += 2;
- continue;
- }
- if (items[i].equals("batt:")) {
- batt = Integer.parseInt(items[i+1]);
- i += 2;
- continue;
- }
- if (items[i].equals("drogue:")) {
- drogue = Integer.parseInt(items[i+1]);
- i += 2;
- continue;
- }
- if (items[i].equals("main:")) {
- main = Integer.parseInt(items[i+1]);
- i += 2;
- continue;
- }
- i++;