Commit Graph

22 Commits

Author SHA1 Message Date
Andrew Stewart 0b48851885 Remove unnecessary comments at start of files 2015-06-22 09:16:43 -07:00
Andrew Stewart ad2db2d459 Update ESLint, use local for make tasks 2015-06-11 12:16:43 -07:00
Andrew Stewart cccb376679 Consistent top-of-file doc blocks 2015-04-15 08:59:12 -07:00
Andrew Stewart eccdde81a9 Update copyright years 2015-01-07 12:58:50 -08:00
Andrew Stewart cf0d24f785 Add API event publication
This update gives Cylon support for the latest changes to the CPPP-IO
spec.
2015-01-05 12:20:53 -08:00
Andrew Stewart ac6b09fe50 Clean up lib for JSHint 2014-12-15 11:15:29 -08:00
Andrew Stewart e67ae19882 Remove Connection and Device classes
They are now functions that return instances of Adaptors and Drivers
respectively.
2014-11-10 16:06:10 -08:00
Andrew Stewart 44075a1a30 Hook Repository class up, change-up module loading
Cylon modules were previously styled something like this:

    module.exports = {
      adaptor: function(args) {
        return new Adaptor(args);
      },

      register: function(robot) {
        Cylon.Logger.debug("Registering Firmata adaptor for " + robot.name);
        robot.registerAdaptor('cylon-firmata', 'firmata');

        GPIO.register(robot);
        I2C.register(robot);
      }
    };

Now, they should be something more like this:

    module.exports = {
      adaptors: ['firmata'],
      dependencies: ['cylon-gpio', 'cylon-i2c'],

      adaptor: function(args) {
        return new Adaptor(args);
      },
    };
2014-10-30 13:29:06 -07:00
Andrew Stewart 8e0790ad9f Default to manual mode, prevent multiple #starts
Additionally adds #halt/#disconnect to built-in loopback/ping
2014-09-30 12:17:02 -07:00
Andrew Stewart 75c8d47676 Remove commands array from Adaptor base class 2014-09-29 15:41:13 -07:00
Andrew Stewart b48f5c3a57 Add no-op #connect and #start methods to built-ins 2014-09-08 09:31:16 -07:00
Andrew Stewart 6e9ceee6cf Fixes to driver commands 2014-08-11 15:30:01 -07:00
Andrew Stewart 7a481f6767 Correctly execute device commands 2014-08-07 13:56:06 -07:00
Andrew Stewart e6c567a090 Add new command structure 2014-08-07 12:24:29 -07:00
Andrew Stewart 715d9c89af Emit 'ping' when Ping is told to #ping
sorry
2014-07-18 14:44:50 -07:00
Andrew Stewart 1832e20e17 Expose commands as array, instead of function
For appropriate classes, #commands is now an array, instead of a function that
returns the same array.
2014-06-10 12:29:44 -07:00
Andrew Stewart f91dd7d5c3 Refactor Utils (mostly) out of global namespace
This commit reframes the Utils module to be more self-contained, and now only
the Number prototype methods and the every/after/constantly methods are exposed
globally.

I'm unsure about whether these methods can be more scoped such that people can
turn them off if they want, but that's potentially something to look into in the
future.

This commit also updates most of the other source files in Cylon, requiring the
Utils module rather than assuming the methods are in the global namespace.

A similar batch of commits will need to be made for all other Cylon modules to
make sure they don't explode when they can't find #subclass or something like
that.

To make the previously-global methods available, both in submodules and for
people looking for them, all the utility functions are exported in Cylon.Utils.
2014-06-05 12:17:29 -07:00
Andrew Stewart d46de63379 Remove node-namespace from Test Drivers/Adaptors 2014-05-06 18:56:13 -07:00
Andrew Stewart c8cb7f0e40 Remove node-namespace from Driver 2014-05-06 18:24:43 -07:00
Andrew Stewart 637bce0e6d Remove node-namespace from Adaptor 2014-05-06 18:19:56 -07:00
deadprogram 1a63cefd60 Make tests all green, now the real work begins 2014-02-27 06:55:08 -08:00
deadprogram b27756abfc WIP on pure JS revamp 2014-02-27 06:44:53 -08:00