Skip to content

Commit 7ed8731

Browse files
committed
worked on the stability under MacOS... Still crashes up to three times on initial startup
1 parent 74229d3 commit 7ed8731

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

examples.rkt

100755100644
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,13 @@
99
(image-height plt-image-height)))
1010
(require 2htdp/universe)
1111

12-
(stopgrabbing)
13-
(sleep 1)
14-
1512
(define pic_img (grabvideo))
16-
(define pic (image->racket-image pic_img))
17-
18-
(define depth_img (grabdepth))
19-
(define depth (image->racket-image depth_img))
13+
(define pic (image->bitmap pic_img))
14+
15+
(define depth_img (grabdepth))
16+
(define depth (image->bitmap depth_img))
2017

21-
(define depth+pic_img (grabdepth+video))
18+
(define depth+pic_img (grabdepth+video))
2219

2320
(define (status t update_each)
2421
(above (text "Number of Ticks:" 12 "black")
@@ -162,3 +159,7 @@
162159
(set! pic (image->racket-image pic_img))
163160
(set! pointer_pos (grabtopleft))));(img->pointer depth_img))))
164161
(underlay/xy pic (- (car pointer_pos) (/ radius 2)) (- (cdr pointer_pos) (/ radius 2)) (circle radius "solid" "yellow")))
162+
163+
164+
;;Terminate grabbing using:
165+
; (stopgrabbing)

grab.rkt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44

55
(require rackinect/config)
66

7-
(require scheme/foreign)
8-
(unsafe!)
7+
(require ffi/unsafe)
8+
(require ffi/cvector)
99

10-
1110
;#################Get the captures from libfreenect ###########
1211
(define kinect_stop_c
1312
(get-ffi-obj 'kinect_stop_c rackinect-dylib-path

install.rkt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
(when (not (directory-exists? local-collects-path))
1111
(system (string-append "mkdir -p " (path->string local-collects-path))))
1212

13-
;; 2. If vigracket-collects dir extist, delete it.
13+
;; 2. If rackinect-collects dir extist, delete it.
1414
(when (directory-exists? local-install-path)
1515
(delete-directory/files local-install-path))
1616

17-
;; 3. copy the installation contents to the local/collects/vigracket directory
17+
;; 3. copy the installation contents to the local/collects/rackinect directory
1818
(copy-directory/files (current-directory) local-install-path)
1919

2020
;; 4. Load dll under windows, dylib under MacOS

0 commit comments

Comments
 (0)