public void draw() { Canvas canvas = surfaceHolder.lockCanvas(); try { synchronized (surfaceHolder) { canvas.drawColor(Color.WHITE); if (canvasGrid != null) { canvasGrid.draw(canvas); } if (canvasTrigger != null && triggerEnabled) { canvasTrigger.draw(canvas); } if (canvasSignal != null) { canvasSignal.draw(canvas); } if (canvasMeasure != null && meassureEnabled) { canvasMeasure.draw(canvas); } } } catch (Exception e) { e.printStackTrace(); } finally { if (canvas != null) { surfaceHolder.unlockCanvasAndPost(canvas); } } }
public void setMaxVoltage(double maxVoltage) { canvasMeasure.setVoltage(maxVoltage); canvasTrigger.setMaxVoltage(maxVoltage); }
public void setTriggerLevel(int level) { if (canvasTrigger != null) canvasTrigger.setTriggerLevel(level); }