27 lines
522 B
C#
27 lines
522 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
|
|
public class OscilloscopeAdapter : MonoBehaviour
|
|
{
|
|
public Plot2D plot;
|
|
public uint channel;
|
|
public uint samplesCount = 500;
|
|
|
|
// Use this for initialization
|
|
private void Awake() {
|
|
if (plot != null) {
|
|
plot.channels[0].ResizeBuffers((int)samplesCount);
|
|
}
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update () {
|
|
|
|
}
|
|
|
|
public void PushSample(float x, float y)
|
|
{
|
|
plot.channels[channel].PushSample(x, y);
|
|
}
|
|
}
|