Subject: | [PATCH] to support USB Circus Cannon |
attach a patch to support USB Circus Cannon
http://www.dreamcheeky.com/product/circus-cannon.php
otherwise, i think it is better that user can specify USB Vendor ID and
Product ID via args of new().
thanks!
Subject: | circus-cannon.patch |
--- Device/USB/MissileLauncher/RocketBaby.pm.orig 2008-01-15 14:53:28.000000000 +0900
+++ Device/USB/MissileLauncher/RocketBaby.pm 2008-01-15 15:01:41.000000000 +0900
@@ -5,12 +5,21 @@
our $VERSION = '1.01';
+# [vendor_id, product_id]
+my @USB_IDS = (
+ [0xA81, 0x701],
+ [0x1941, 0x8021], # USB Circus Cannon
+ );
+
sub new
{
my ($class) = @_;
my $usb = Device::USB->new;
- my $dev = $usb->find_device(0xA81, 0x701);
+ my $dev;
+ for my $id (@USB_IDS) {
+ last if $dev = $usb->find_device(@{$id});
+ }
$dev->open;
$dev->detach_kernel_driver_np(0);
$dev->set_configuration(1);