2 # Vantage Pro 2 interface for DWeather
6 package DWeather::Station::Vantage;
11 use base qw(DWeather::Station);
18 my $class = ref $pkg || $pkg;
21 my $self = $class->SUPER::new($device, 19200);
22 $self->on_read(sub{$d->process});
29 my $data = $self->{rbuf};
33 dbg("I $self->{device} lth " . length $data);
35 } elsif (isdbg('chan')) {
36 dbg("I $self->{device}: $data");
38 foreach my $ch (@ch) {
48 dbg("O $self->{device} lth " . length $data);
50 } elsif (isdbg('chan')) {
51 dbg("O $self->{device}: $data");
53 $self->push_write($data)