Skip to content

Commit

Permalink
License clarification, Kwalitee improvements, Minor edits (#28)
Browse files Browse the repository at this point in the history
* module version, dependency on Device::SerialPort
- fixed Perl module version in dist.in
- added missing Perl module dependency on Device::SerialPort to Makefile.PL to ease installation via CPAN

* skip author test for normal user installs
- disable all author test (manifiest, pod, pod-coverage) for normal user installs

* UNIX newlines
- use UNIX newlines in .pm files
- trailing whitspaces removed from .pm files

* License clarification, Kwalitee improvements
- resolved conflicting licence information from README and license.txt introduced by contributor Chris Fedde in 2011.03 to license chosen by original author Aki Mimoto in 2011.02
- replaced license.txt file with LICENSE file
- added 'use warnings' to all Perl files
- added pod to Firmata.pm
  • Loading branch information
jnsbyr committed May 30, 2018
1 parent 018e3b1 commit 2db1d98
Show file tree
Hide file tree
Showing 19 changed files with 176 additions and 103 deletions.
122 changes: 61 additions & 61 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,62 +1,62 @@
Revision history for Device-Firmata
0.64 2018.01.03 - Jens Beyer
support Firmata protocol version 2.5 feature PIN_PULLUP (Constants, Platform, Protocol)
0.63 2016.03.19 - Jens Beyer
supported protocol version detection modified (Protocol)
0.62 2016.02.22 - Jens Beyer
added software serial support (Platform, Protocol)
0.61 2016.01.09 - Jens Beyer
added serial pin support (Platform, Protocol, Constants)
added protocol version query (Platform)
fixed messages_handle: REPORT_VERSION returns protocol version (Platform)
added method get_max_compatible_protocol_version (Protocol)
0.60 2014.06.28 - Norbert Truchsess
Fixed formating of Firmata.pm as Windows line-endings break automatic install from CPAN
0.59 2014.06.26 - Norbert Truchsess
Fix a bug in the parser incorrectly skipping single 0x30 bytes
0.58 2014.06.26 - Yanick Champoux
cosmetic change to POD for CPAN
0.57 2014.06.12 - Norbert Truchsess
Fixed building dist for cpan
0.56 2014.06.04 - Norbert Truchsess
add generic method sysex_send to Platform.pl
0.55 2014.04.17 - Norbert Truchsess
fix digital-input message interference with output pins on same port
0.54 2014.03.04 - Norbert Truchsess
add stepper-motor protocol
0.53 2014.03.03 - Norbert Truchsess
add rotary-encoder protocol
0.52 2013.11.22 - Norbert Truchsess
add Firmata over Ethernet
0.51 2013.09.10/23:00 - Brett Carroll
Changed IO.pm to use Win32::SerialPort instead of Win32::Serialport on Windows platforms
Norbert Truchsess: fix handle onewire in capability-response
0.50 2012.12.13-2013.08.11 - Norbert Truchsess
adding all missing protocol-features (1-Wire, I2C, Servo ...)
adding observers for all suitable protocols
Valdas Kondrotas: various bugfixes and enhancements.
2011.03.23 - Chris Fedde
reorganizing as CPAN ready module
2011.02.16 Aki Mimoto
implementig all protocol basics and releasing Device::Firmata on Github
2010.08.31 Aki Mimoto
Revision history for Device-Firmata

0.64 2018.01.03 - Jens Beyer
support Firmata protocol version 2.5 feature PIN_PULLUP (Constants, Platform, Protocol)

0.63 2016.03.19 - Jens Beyer
supported protocol version detection modified (Protocol)

0.62 2016.02.22 - Jens Beyer
added software serial support (Platform, Protocol)

0.61 2016.01.09 - Jens Beyer
added serial pin support (Platform, Protocol, Constants)
added protocol version query (Platform)
fixed messages_handle: REPORT_VERSION returns protocol version (Platform)
added method get_max_compatible_protocol_version (Protocol)

0.60 2014.06.28 - Norbert Truchsess
Fixed formating of Firmata.pm as Windows line-endings break automatic install from CPAN

0.59 2014.06.26 - Norbert Truchsess
Fix a bug in the parser incorrectly skipping single 0x30 bytes

0.58 2014.06.26 - Yanick Champoux
cosmetic change to POD for CPAN

0.57 2014.06.12 - Norbert Truchsess
Fixed building dist for cpan

0.56 2014.06.04 - Norbert Truchsess
add generic method sysex_send to Platform.pl

0.55 2014.04.17 - Norbert Truchsess
fix digital-input message interference with output pins on same port

0.54 2014.03.04 - Norbert Truchsess
add stepper-motor protocol

0.53 2014.03.03 - Norbert Truchsess
add rotary-encoder protocol

0.52 2013.11.22 - Norbert Truchsess
add Firmata over Ethernet

0.51 2013.09.10/23:00 - Brett Carroll
Changed IO.pm to use Win32::SerialPort instead of Win32::Serialport on Windows platforms
Norbert Truchsess: fix handle onewire in capability-response

0.50 2012.12.13-2013.08.11 - Norbert Truchsess
adding all missing protocol-features (1-Wire, I2C, Servo ...)
adding observers for all suitable protocols

Valdas Kondrotas: various bugfixes and enhancements.

2011.03.23 - Chris Fedde
reorganizing as CPAN ready module

2011.02.16 Aki Mimoto
implementig all protocol basics and releasing Device::Firmata on Github

2010.08.31 Aki Mimoto
start of development
10 changes: 10 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
COPYRIGHT AND LICENSE

Copyright (C) 2010 amimato
Copyright (C) 2012 ntruchsess
Copyright (C) 2016 jnsbyr

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

See http://dev.perl.org/licenses/ for more information.
7 changes: 4 additions & 3 deletions MANIFEST
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
Changes
MANIFEST
Makefile.PL
environment
ignore.txt
LICENSE
Makefile.PL
MANIFEST
README
t/00-load.t
t/boilerplate.t
t/manifest.t
t/pod-coverage.t
t/pod.t
t/pod-coverage.t
lib/Device/Firmata/Platform/Arduino.pm
lib/Device/Firmata/Base.pm
lib/Device/Firmata/Constants.pm
Expand Down
36 changes: 29 additions & 7 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ use ExtUtils::MakeMaker;

WriteMakefile(
NAME => 'Device::Firmata',
AUTHOR => q{Norbert Truchsess <[email protected]>, amimato <amimoto>},
AUTHOR => [
'Aki Mimoto <[email protected]>',
'Norbert Truchsess <[email protected]>',
'Jens B. <[email protected]>',
],
VERSION_FROM => 'lib/Device/Firmata.pm',
ABSTRACT_FROM => 'lib/Device/Firmata.pm',
($ExtUtils::MakeMaker::VERSION >= 6.3002
? ('LICENSE'=> 'perl')
: ()),
($ExtUtils::MakeMaker::VERSION >= 6.3001? ('LICENSE'=> 'perl_5') : ()),
PL_FILES => {},
MIN_PERL_VERSION => 5.006,
CONFIGURE_REQUIRES => {
Expand All @@ -20,8 +22,28 @@ WriteMakefile(
'Test::More' => 0,
},
PREREQ_PM => {
'Test::More' => 0,
($^O eq 'MSWin32'? ('Win32::SerialPort' => 0) : ('Device::SerialPort' => 0)),
'IO::Select' => 0,
'IO::Socket::INET' => 0,
'Time::HiRes' => 0,
'strict' => 0,
'warnings' => 0
},
dist => {
COMPRESS => 'gzip -9f',
SUFFIX => 'gz',
},
clean => {
FILES => 'Device-Firmata-*'
},
META_MERGE => {
'meta-spec' => { version => 2 },
resources => {
repository => {
type => 'git',
url => 'https://github.com/ntruchsess/perl-firmata.git',
web => 'https://github.com/ntruchsess/perl-firmata',
},
},
},
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
clean => { FILES => 'Device-Firmata-*' },
);
9 changes: 4 additions & 5 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,14 @@ You can also look for information at:
http://search.cpan.org/dist/Device-Firmata/


LICENSE AND COPYRIGHT
COPYRIGHT AND LICENSE

Copyright (C) 2011 amimato
Copyright (C) 2010 amimato
Copyright (C) 2012 ntruchsess
Copyright (C) 2016 jnsbyr

This program is free software; you can redistribute it and/or modify it
under the terms of either: the GNU General Public License as published
by the Free Software Foundation; or the Artistic License.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

See http://dev.perl.org/licenses/ for more information.

8 changes: 5 additions & 3 deletions dist.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name = Device-Firmata
version = 0.56
author = Aki Mimoto, Norbert Truchsess
author = Aki Mimoto <[email protected]>, Norbert Truchsess <[email protected]>, Jens B. <[email protected]>
license = Perl_5
copyright_holder = Aki Mimoto, Norbert Truchsess
copyright_holder = Aki Mimoto, Norbert Truchsess, Jens B.
copyright_year = 2010

version = 0.64

[GatherDir]
[MetaYAML]
Expand Down
23 changes: 21 additions & 2 deletions lib/Device/Firmata.pm
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ our $DEBUG = 0;
=head1 SUBROUTINES/METHODS
=head2 open
=head2 open(serialPort)
establish serial connection with an Arduino micro-controller. Single argument is the name of the device file mapped to the arduino. Typically '/dev/ttyUSB0' or 'COM9'
Establish a serial connection with an Arduino micro-controller. The first argument is the name of the serial device mapped to the arduino, e.g. '/dev/ttyUSB0' or 'COM9'.
=cut

Expand All @@ -74,6 +74,12 @@ sub open {
return $platform;
}

=head2 listen(host, port)
Start a TCP server bound to given local address and port for the arduino to connect to.
=cut

sub listen {
# --------------------------------------------------
# Listen on socket and wait for Arduino to establish a connection
Expand All @@ -86,4 +92,17 @@ sub listen {
return $netio->listen( $ip, $port, $opts ) || die "Could not bind to socket";
}

=head1 LICENSE
Copyright (C) 2010 amimato
Copyright (C) 2012 ntruchsess
Copyright (C) 2016 jnsbyr
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
See http://dev.perl.org/licenses/ for more information.
=cut

1;
1 change: 1 addition & 0 deletions lib/Device/Firmata/Base.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package Device::Firmata::Base;

use strict 'vars', 'subs';
use warnings;
use vars qw/
$AUTOLOAD
$FIRMATA_DEBUG_LEVEL
Expand Down
10 changes: 6 additions & 4 deletions lib/Device/Firmata/Constants.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ Device::Firmata::Constants - constants used in the Device::Firmata system
=cut

use strict;
use warnings;
use Exporter;
use vars qw/
@ISA @EXPORT_OK %EXPORT_TAGS
$BASE
$COMMANDS $COMMAND_NAMES
$COMMAND_LOOKUP
/;

@ISA = 'Exporter';

# Basic commands and constants
Expand Down Expand Up @@ -139,7 +141,7 @@ use constant (

}, # /Constants for Version 2.2

V_2_03 => {
V_2_03 => {

MAX_DATA_BYTES => 32, # max number of data bytes in non-Sysex messages

Expand Down Expand Up @@ -356,15 +358,15 @@ use constant (
ONEWIRE => 0x07, # pin configured for 1-Wire commuication
STEPPER => 0x08, # pin configured for stepper motor
ENCODER => 0x09, # pin configured for rotary-encoders
SERIAL => 0x0A, # pin configured for serial port
SERIAL => 0x0A, # pin configured for serial port
PULLUP => 0x0B, # digital pin in digitalInput mode with pullup

# Deprecated entries
deprecated => [
qw( FIRMATA_STRING SYSEX_I2C_REQUEST SYSEX_I2C_REPLY SYSEX_SAMPLING_INTERVAL )
],

}, # /Constants for Version 2.6
}, # /Constants for Version 2.6
}
);

Expand Down Expand Up @@ -393,4 +395,4 @@ use constant { COMMAND_NAMES => [ $COMMAND_NAMES = [ keys %$COMMAND_NAMES ] ] };

%EXPORT_TAGS = ( all => \@EXPORT_OK );

1;
1;
1 change: 1 addition & 0 deletions lib/Device/Firmata/Error.pm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Device::Firmata::Error - Error handlers
=cut

use strict;
use warnings;
use Exporter;
use vars qw/
@ISA
Expand Down
Loading

0 comments on commit 2db1d98

Please sign in to comment.