]> mj.ucw.cz Git - home-hw.git/blobdiff - dmx/test/test.c
Auto: Meditation mode turned off
[home-hw.git] / dmx / test / test.c
index 210b13663644b594f00223ca60df8853d2c64a92..af27b646b4ada9eb8e33961346278982faa1e5db 100644 (file)
@@ -44,10 +44,12 @@ static libusb_device *find_device(void)
 
 int main(int argc, char **argv)
 {
-  if (argc != 3)
-    die("Usage: test <val1> <val2>");
-  int x = atoi(argv[1]);
-  int y = atoi(argv[2]);
+  if (argc != 5)
+    die("Usage: test <val1> <val2> <val3> <val4>");
+  int a1 = atoi(argv[1]);
+  int a2 = atoi(argv[2]);
+  int a3 = atoi(argv[3]);
+  int a4 = atoi(argv[4]);
 
   int err;
   if (err = libusb_init(&usb_ctxt))
@@ -61,7 +63,7 @@ int main(int argc, char **argv)
   if (err = libusb_claim_interface(devh, 0))
     die("Cannot claim interface: error %d", err);
 
-  byte packet[5] = { 0, x, y, 0, 0 };
+  byte packet[5] = { 0, a1, a2, a3, a4 };
   int len = sizeof(packet);
   int transferred;
   if (err = libusb_bulk_transfer(devh, 0x01, packet, len, &transferred, 1000))