@@ -0,0 +1,2528 @@
+package com.easternedgerobotics.rov.integration;%0A%0Aimport com.easternedgerobotics.rov.event.BroadcastEventPublisher;%0Aimport com.easternedgerobotics.rov.event.EventPublisher;%0Aimport com.easternedgerobotics.rov.io.Light;%0Aimport com.easternedgerobotics.rov.io.pololu.Maestro;%0Aimport com.easternedgerobotics.rov.math.Range;%0Aimport com.easternedgerobotics.rov.value.SpeedValue;%0Aimport com.easternedgerobotics.rov.value.TestSpeedValue;%0A%0Aimport com.pi4j.io.serial.Serial;%0Aimport com.pi4j.io.serial.SerialFactory;%0Aimport rx.broadcast.BasicOrder;%0Aimport rx.broadcast.UdpBroadcast;%0A%0Aimport java.net.DatagramSocket;%0Aimport java.net.InetAddress;%0Aimport java.net.SocketException;%0Aimport java.net.UnknownHostException;%0A%0A@SuppressWarnings(%7B%22checkstyle:magicnumber%22%7D)%0Apublic final class IndividualLightTest %7B%0A    private IndividualLightTest() %7B%0A%0A    %7D%0A%0A    public static void main(final String%5B%5D args) throws InterruptedException, SocketException, UnknownHostException %7B%0A        final byte deviceNumber = Byte.parseByte(args%5B0%5D);%0A        final byte channel = Byte.parseByte(args%5B1%5D);%0A        final int baudRate = 115200;%0A%0A        final Serial serial = SerialFactory.createInstance();%0A        serial.open(%22/dev/ttyACM0%22, baudRate);%0A%0A        final InetAddress broadcastAddress = InetAddress.getByName(%22255.255.255.255%22);%0A        final int broadcastPort = BroadcastEventPublisher.DEFAULT_BROADCAST_PORT;%0A        final EventPublisher eventPublisher = new BroadcastEventPublisher(new UdpBroadcast%3C%3E(%0A            new DatagramSocket(broadcastPort), broadcastAddress, broadcastPort, new BasicOrder%3C%3E()));%0A%0A        final Light light = new Light(%0A            eventPublisher.valuesOfType(TestSpeedValue.class).cast(SpeedValue.class),%0A            new Maestro%3C%3E(serial, deviceNumber).get(channel).setOutputRange(new Range(Light.MAX_REV, Light.MAX_FWD)));%0A%0A        System.out.println(%22Test Started%22);%0A        System.out.println(%22Light is off%22);%0A        Thread.sleep(1000);%0A%0A        eventPublisher.emit(new TestSpeedValue(.5f));%0A        Thread.sleep(1000);%0A        System.out.println(%22Light is at half brightness%22);%0A        light.write();%0A%0A        eventPublisher.emit(new TestSpeedValue(0f));%0A        Thread.sleep(1000);%0A        System.out.println(%22Light is off%22);%0A        light.write();%0A%0A        eventPublisher.emit(new TestSpeedValue(1f));%0A        Thread.sleep(1000);%0A        System.out.println(%22Light is at full brightness%22);%0A        light.write();%0A%0A        Thread.sleep(1000);%0A        System.out.println(%22Light is off%22);%0A        light.writeZero();%0A    %7D%0A%7D%0A

Add an integration test for debugging lights