Avena Webapp API - v0.0.1
    Preparing search index...

    Function advanceTrigger

    • Advances one channel's trigger after a new batch was appended to its live buffer.

      An open capture takes the batch's samples up to its window end; if the buffer was reset (the timeline jumped back) it is closed as it is. A capture is held while it is collecting, and in single-shot mode until the user re-arms. Otherwise the new samples are searched for a crossing after the end of the previous capture (with the full pre-trigger window buffered), and a crossing starts a new capture from the buffer. In normal mode a capture that completes within the same batch is followed by a search for the next crossing, so the last one found is returned.

      Parameters

      • capture: TriggerCapture | null

        Current capture, or null when none was taken since arming.

      • singleShot: boolean

        true for single-shot mode, false for normal mode.

      • settings: TriggerSettings

        Trigger settings.

      • buffer: DataPoint[]

        Live buffer, sorted by time, already including the batch.

      • chunkStartIndex: number

        Index in buffer of the batch's first point.

      • reset: boolean

        The buffer was emptied before this batch.

      • chunk: DataPoint[]

        Points just appended.

      Returns TriggerCapture | null

      The capture to show: capture itself when unchanged, a new object when it changed, or null when there is none.