-
Notifications
You must be signed in to change notification settings - Fork 86
gltrace add
Chris Petersen edited this page Oct 16, 2014
·
1 revision
gltrace-add adds a data point to a trace.
Note: This doesn't update the texture immediately to save overhead but instead buffers new data points until gltrace-update
is called.
Parameter | Description |
---|---|
t | Trace to which the datum is added |
val | Value of datum added |
Example 1: Trace a fake waveform. First define the trace with its boundaries. Then place a trace-widget on the screen. Finally, clear the trace, load some data and update the trace. In a real world application the gltrace-add and gltrace-update would happen in a loop elsewhere, whenever new data are received.
(set! VAL_min 0)(set! VAL_max 10)
(set! val-trace (make-gltrace 101 30 GLTRACE_OVERWRITE VAL_min VAL_max VAL_min VAL_max))
(gltrace:clear val-trace)
(set! val-wave (glgui-trace gui 5 (- (glgui-height-get) 44 110) 200 40 val-trace Orange))
(set! values (list 0 1 2 3 4 5 4 3 2 1 0 1 2 3 4 5 6 7 7 9 5 4 3 2 1 3 4 5 6 4 4 3 3 2 2 1 1 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 0 0 1 1 2 2 3 3 4 4 5 5))
(let loop ((i 0))
(if (< i (length values))
(begin
(gltrace-add val-trace (list-ref values i))
(loop (+ i 1))
)))
...
(gltrace-update val-trace) ;; this must be called in the event loop
-
- accelerometer
- alist
- audio
- audioaux
- base64
- btle-scan
- camera
- cdb
- cgi
- config
- csv
- curl
- digest
- dmtx
- download
- eventloop
- fcgi
- fft
- generalized-arrays
- gps
- graph
- gyro
- hidapi
- hpdf
- html
- httpsclient
- hybridapp
- json
- lmdb
- ln_core
- ln_glcore
- ln_glgui
- ln_store
- localization
- localization_gui
- localnotification
- magnetometer
- mdns
- mqtt
- mqtt-store
- multitouch
- oauth
- orientation
- p256ecdsa
- png
- portaudio
- pregexp
- pressure
- prime
- pushnotification
- redcap
- rsa
- rtaudio
- rupi
- rotation
- sanestring
- scheduler
- serial
- sets
- settings
- simplexnoise
- sqlite
- ssax
- syntax-case
- timestamp
- ttf
- uiform
- url
- uuid
- vibrate
- videoplayer
- watchdog
- website
- xml
- zip