OpenROV/openrov-software — pull request #134 by codewithpassion (2013-10-09 23:27:56+00:00)
Title: Cleanup and light toggle

Hey,

I wen't through the code and cleaned up a few things.
For example there was a log of:
if(CONFIG.debug_commands) console.error("command", command);
if(CONFIG.production) serial.write(command);

It was repeated all over the place.

I moved the serial handling into a Hardware.js flile/class that is much easier to mock than to mock the whole OpenROVController.js. Now, if you are using the mock. It just emulates the serial connection.

The only addition is that the cockpit is capable of toggling the light on and off with the letter 'l' (for lights :)
This isn't yet mapped to the gamepad.

Regards,
Dominik