diff options
author | Christian Pointner <equinox@helsinki.at> | 2015-02-24 19:29:19 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2015-02-24 19:29:19 (GMT) |
commit | 6fcb582dbe6f85a87f69068fb8f42950811ec4a4 (patch) | |
tree | 0930548f8a5a66ae91bcca56426038f5f205c820 /ats-watch/ats-watch.pl | |
parent | e9d82162ae944d56a2dee6aed4b38dd9f65b30f4 (diff) |
updated copyright header and ws-cleanup
Diffstat (limited to 'ats-watch/ats-watch.pl')
-rwxr-xr-x | ats-watch/ats-watch.pl | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/ats-watch/ats-watch.pl b/ats-watch/ats-watch.pl index f374295..227f28c 100755 --- a/ats-watch/ats-watch.pl +++ b/ats-watch/ats-watch.pl @@ -1,15 +1,36 @@ #!/usr/bin/perl -w +## +## Radio Helsinki avr projects +## +## +## Copyright (C) 2013-2015 Christian Pointner <equinox@helsini.at> +## +## This file is part of Radio Helsinki avr projects. +## +## Radio Helsinki avr projects is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## any later version. +## +## Radio Helsinki avr projects is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with Radio Helsinki avr projects. If not, see <http://www.gnu.org/licenses/>. +## use strict; use Device::SerialPort; use Mail::Sendmail; -my $port = new Device::SerialPort("/dev/ats-watch"); -$port->baudrate(38400); -$port->parity("none"); -$port->databits(8); -$port->stopbits(1); -$port->handshake("none"); +my $port = new Device::SerialPort("/dev/ats-watch"); +$port->baudrate(38400); +$port->parity("none"); +$port->databits(8); +$port->stopbits(1); +$port->handshake("none"); $port->read_const_time(500); $port->read_char_time(5); $port->write_settings; @@ -36,7 +57,7 @@ while(1) { } else { $mail{Subject} = '[ATS-Watch] PDU0 state unknown'; $mail{Message} = $line; - } + } sendmail( %mail ) or print $Mail::Sendmail::error . "\n"; - } + } } |