()
| 97 | } |
| 98 | |
| 99 | @Override public void run() { |
| 100 | try { |
| 101 | boolean led = false; |
| 102 | while (true) { |
| 103 | int v = -1; int t = -1; |
| 104 | if (h_volt != null) v = (int)(h_volt.read() * 1024); |
| 105 | if (h_temp != null) t = (int)(h_temp.read() * 1024); |
| 106 | if (h_led != null) { h_led.write(led); led = !led; } |
| 107 | listener.onVoltageValues(t, 0, v); |
| 108 | sleep(sleeptime); |
| 109 | } |
| 110 | } catch (InterruptedException e) { |
| 111 | } catch (Exception e) { |
| 112 | listener.onSensorError(e.getMessage()); |
| 113 | // TODO make GlueVoltage.getState() return STATE_FAILED |
| 114 | } |
| 115 | } |
| 116 | } |
nothing calls this directly
no test coverage detected