diff options
| author | Omar Rizwan <omar@omar.website> | 2023-09-28 21:05:34 +0000 |
|---|---|---|
| committer | Omar Rizwan <omar@omar.website> | 2023-09-28 21:05:34 +0000 |
| commit | 66ffc532b2b7f476ee1e3e6a76aaf66f30194ee1 (patch) | |
| tree | 1308d7e3ffdbbf263a4296a389cf231e531ce5b4 /virtual-programs | |
| parent | display: Center text again, shrink it a bit (diff) | |
| download | folk-66ffc532b2b7f476ee1e3e6a76aaf66f30194ee1.tar.gz folk-66ffc532b2b7f476ee1e3e6a76aaf66f30194ee1.zip | |
calibrate: WIP: Port to Vulkan.
It kind of works but is unreliable (might just be general calibration
problems, though).
Diffstat (limited to 'virtual-programs')
| -rw-r--r-- | virtual-programs/images.folk | 6 | ||||
| -rw-r--r-- | virtual-programs/tags-and-calibration.folk | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/virtual-programs/images.folk b/virtual-programs/images.folk index ae793bc8..5523e0a0 100644 --- a/virtual-programs/images.folk +++ b/virtual-programs/images.folk @@ -35,7 +35,11 @@ namespace eval ::image { defineImageType $cc $cc include <stdlib.h> $cc include <string.h> - $cc import ::Heap::cc folkHeapAlloc as folkHeapAlloc + if {[namespace exists ::Heap]} { + $cc import ::Heap::cc folkHeapAlloc as folkHeapAlloc + } else { + $cc code { #define folkHeapAlloc malloc } + } $cc code { #undef EXTERN diff --git a/virtual-programs/tags-and-calibration.folk b/virtual-programs/tags-and-calibration.folk index b219b541..8bfa067c 100644 --- a/virtual-programs/tags-and-calibration.folk +++ b/virtual-programs/tags-and-calibration.folk @@ -33,6 +33,10 @@ When camera /camera/ has width /cameraWidth/ height /cameraHeight/ { [expr {double($dy)/$generatedCalibration::displayHeight*$Display::HEIGHT}]] } } + if {[llength $points] < 4} { + puts stderr "tags-and-calibration: Calibration isn't valid (not enough points). Stopping Folk." + exit 1 + } for {set i 0} {$i < [llength $points]} {incr i} { lassign [lindex $points $i] x$i y$i u$i v$i } |
