Skip to content

Commit

Permalink
added verbose flag
Browse files Browse the repository at this point in the history
  • Loading branch information
osune committed Mar 27, 2016
1 parent c637740 commit cf1640a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions midijoystick.scm
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,16 @@ struct js_event input_event;
(print " -h \tprint this information\n")
(print " -j path\tjoystick device\n")
(print " -c path\tconfiguration file\n")
(print " -d uint\tdeadzone radius for axes\n"))
(print " -d uint\tdeadzone radius for axes\n")
(print " -v \tprint midi messages\n"))

;; MAIN

(let* ((args (command-line))
(js-file-flag (member "-j" args))
(conf-file-flag (member "-c" args))
(deadzone-flag (member "-d" args)))
(deadzone-flag (member "-d" args))
(verbose-flag (member "-v" args)))
;; (display args) (newline)

(if (member "-h" args)
Expand Down Expand Up @@ -259,8 +261,9 @@ struct js_event input_event;
event-value)))
(msg-length (length msg)))
(if (not (equal? msg-length 0))
(begin
(display msg) (newline)
(begin
(if verbose-flag
(begin (display msg) (newline)))
(send-midi msg (length msg)))))
(if (not (null? (cdr midi-list)))
(sendloop (cdr midi-list)))))
Expand Down

0 comments on commit cf1640a

Please sign in to comment.