From b8fa20d37144dac18174e45aeeffd203f921e1e3 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 16 Jun 2020 22:44:51 +0200 Subject: Formatting --- guile/nanolight/fixture.scm | 57 +++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 31 deletions(-) diff --git a/guile/nanolight/fixture.scm b/guile/nanolight/fixture.scm index 226c106..81dabcc 100644 --- a/guile/nanolight/fixture.scm +++ b/guile/nanolight/fixture.scm @@ -110,9 +110,8 @@ (define (home-all-attributes fix) - (for-each - home-attribute - (attributes fix))) + (for-each home-attribute + (attributes fix))) (define (patch-fixture output attributes universe start-addr friendly-name) @@ -157,25 +156,22 @@ #:port ola-socket #:keep-alive? #t #:headers (acons 'content-type - (parse-header - 'content-type - "application/x-www-form-urlencoded") - '()) - #:body (string-append - "u=" - (number->string (car universe)) - "&d=" - (bytevec->string (cdr universe))))) + (parse-header 'content-type + "application/x-www-form-urlencoded") + '()) + #:body (string-append "u=" + (number->string (car universe)) + "&d=" + (bytevec->string (cdr universe))))) (define (make-output) (letrec* ( (fixtures '()) - (ola-uri (build-uri - 'http - #:host "127.0.0.1" - #:port 9090 - #:path "/set_dmx")) + (ola-uri (build-uri 'http + #:host "127.0.0.1" + #:port 9090 + #:path "/set_dmx")) (ola-socket (open-socket-for-uri ola-uri))) (define (run-scanout) @@ -187,16 +183,14 @@ ;; Create DMX array for universe if it doesn't exist already (unless (assq universe universes) - (set! universes (acons - universe - (make-u8vector 512 0) - universes))) + (set! universes (acons universe + (make-u8vector 512 0) + universes))) ;; Set the value in the DMX array - (u8vector-set! - (assq-ref universes universe) - (- addr 1) ; u8vector-set indexing starts from zero - (round-dmx value))) + (u8vector-set! (assq-ref universes universe) + (- addr 1) ; u8vector-set indexing starts from zero + (round-dmx value))) ;; Scan out all fixtures (for-each (lambda (fix) @@ -204,18 +198,19 @@ ;; Scan out one fixture (for-each (lambda (attr) (let ((trans (translator attr))) - (trans - (universe fix) - (start-addr fix) - ((value-func attr)) - set-dmx))) + (trans (universe fix) + (start-addr fix) + ((value-func attr)) + set-dmx))) (attributes fix))) fixtures) ;; Send everything to OLA (for-each (lambda (a) - (send-to-ola ola-uri ola-socket a)) + (send-to-ola ola-uri + ola-socket + a)) universes)) (yield) -- cgit v1.2.3