diff options
Diffstat (limited to 'tinyusb/test/vendor/ceedling/plugins/beep/lib/beep.rb')
m--------- | tinyusb | 0 | ||||
-rwxr-xr-x | tinyusb/test/vendor/ceedling/plugins/beep/lib/beep.rb | 40 |
2 files changed, 0 insertions, 40 deletions
diff --git a/tinyusb b/tinyusb new file mode 160000 +Subproject f8288be03f28ad7b944e6925f49422dfa39202c diff --git a/tinyusb/test/vendor/ceedling/plugins/beep/lib/beep.rb b/tinyusb/test/vendor/ceedling/plugins/beep/lib/beep.rb deleted file mode 100755 index 6a6d01ab..00000000 --- a/tinyusb/test/vendor/ceedling/plugins/beep/lib/beep.rb +++ /dev/null @@ -1,40 +0,0 @@ -require 'ceedling/plugin' -require 'ceedling/constants' - -class Beep < Plugin - - attr_reader :config - - def setup - @config = { - :on_done => ((defined? TOOLS_BEEP_ON_DONE) ? TOOLS_BEEP_ON_DONE : :bell ), - :on_error => ((defined? TOOLS_BEEP_ON_ERROR) ? TOOLS_BEEP_ON_ERROR : :bell ), - } - end - - def post_build - beep @config[:on_done] - end - - def post_error - beep @config[:on_error] - end - - private - - def beep(method = :none) - case method - when :bell - if (SystemWrapper.windows?) - puts "echo '\007'" - else - puts "echo -ne '\007'" - end - when :speaker_test - `speaker-test -t sine -f 1000 -l 1` - else - #do nothing with illegal or :none - end - end -end - |