From 35062371f735d4ca157b87e1509695be0d1e2e22 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 9 Jun 2022 21:25:53 +0200 Subject: Fixture library: update TadM LED definitions to new define-fixture syntax --- guile/starlet/fixture-library/tadm/led-foh.scm | 32 ++++++++++++-------------- 1 file changed, 15 insertions(+), 17 deletions(-) (limited to 'guile/starlet/fixture-library/tadm/led-foh.scm') diff --git a/guile/starlet/fixture-library/tadm/led-foh.scm b/guile/starlet/fixture-library/tadm/led-foh.scm index f947370..3e9a685 100644 --- a/guile/starlet/fixture-library/tadm/led-foh.scm +++ b/guile/starlet/fixture-library/tadm/led-foh.scm @@ -1,7 +1,7 @@ ;; ;; starlet/fixture-library/tadm/led-foh.scm ;; -;; Copyright © 2020-2021 Thomas White +;; Copyright © 2020-2022 Thomas White ;; ;; This file is part of Starlet. ;; @@ -19,28 +19,26 @@ ;; along with this program. If not, see . ;; (define-module (starlet fixture-library tadm led-foh) - #:use-module (oop goops) + #:use-module (starlet scanout) #:use-module (starlet fixture) + #:use-module (starlet utils) #:use-module (starlet colours) #:export ()) +(define-fixture -(define-class () - (attributes - #:init-form (list - (attr-continuous 'intensity '(0 100) 0) - (attr-colour 'colour white)))) + - -(define-method (scanout-fixture (fixture ) - get-attr set-chan8 set-chan16) + (fixture-attributes + (attr-continuous 'intensity '(0 100) 0) + (attr-colour 'colour white)) (let ((intensity (get-attr 'intensity)) - (rgbw (colour-as-rgbw (get-attr 'colour)))) - (set-chan8 1 (percent->dmxval8 intensity)) - (set-chan8 2 255) - (set-chan8 3 (percent->dmxval8 (car rgbw))) - (set-chan8 4 (percent->dmxval8 (cadr rgbw))) - (set-chan8 5 (percent->dmxval8 (caddr rgbw))) - (set-chan8 6 (percent->dmxval8 (cadddr rgbw))))) + (rgbw (colour-as-rgbw (get-attr 'colour)))) + (set-chan8 1 (percent->dmxval8 intensity)) + (set-chan8 2 255) + (set-chan8 3 (percent->dmxval8 (car rgbw))) + (set-chan8 4 (percent->dmxval8 (cadr rgbw))) + (set-chan8 5 (percent->dmxval8 (caddr rgbw))) + (set-chan8 6 (percent->dmxval8 (cadddr rgbw))))) -- cgit v1.2.3