Пример #1
0
  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);
      }
    }
  }
Пример #2
0
 public void setMaxVoltage(double maxVoltage) {
   canvasMeasure.setVoltage(maxVoltage);
   canvasTrigger.setMaxVoltage(maxVoltage);
 }
Пример #3
0
 public void setTriggerLevel(int level) {
   if (canvasTrigger != null) canvasTrigger.setTriggerLevel(level);
 }