Commit Graph

1295 Commits

Author SHA1 Message Date
Andrew Stewart c055f1e857 Example updates 2014-11-25 14:39:24 -08:00
Andrew Stewart 0541c225d8 Update examples 2014-11-25 10:02:29 -08:00
Ron Evans b0f99d3ff3 Merge pull request #242 from hybridgroup/add/imperative-connection-and-device
Extract out Connection/Device initialization
2014-11-20 09:28:58 -08:00
Andrew Stewart 15c9b96333 Extract out Connection/Device initialization
Simple extraction out of Connection/Device initialization code inside
Robot.

This yields an interesting boon, however - this is now a valid Cylon
program:

    var Cylon = require('cylon');

    Cylon
      .robot()
      .connection({ name: 'loopback', adaptor: 'loopback' })
      .device({ name: 'ping', driver: 'ping' })
      .on('ready', function(bot) {
        console.log("Bot working!");

        every(1000, function() {
          console.log(bot.ping.ping());
        })
      });

    Cylon.start();

For those that prefer imperative programs with Cylon, this is a nice
syntax addition.
2014-11-20 08:43:08 -08:00
Andrew Stewart 668acf1e18 Add support for specifying API configuration to Cylon#api 2014-11-14 13:05:16 -08:00
Andrew Stewart 25119c170f Refer to correct element for proxying 2014-11-14 11:34:37 -08:00
Andrew Stewart 5ff743a4c5 Correct API inconsistency 2014-11-14 11:06:21 -08:00
Andrew Stewart 8da2a17929 Fix broken test 2014-11-14 11:01:57 -08:00
Andrew Stewart 38bf5fdfed Refer to Adaptor instances as 'Connection' 2014-11-14 10:56:45 -08:00
Edgar O Silva 4500824f30 Merge pull request #239 from hybridgroup/remove/connection-and-device-classes
Remove Connection and Device classes. :shipit: 🚀
2014-11-12 11:52:15 -06:00
Andrew Stewart 39f9c8b637 Fix up API errors 2014-11-11 13:41:09 -08:00
Andrew Stewart ce87a355f0 Modifications, fix test suite 2014-11-11 11:41:23 -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
Edgar O Silva aac7bd0de8 Merge pull request #238 from hybridgroup/change/specifying-multiple-connections-or-devices
Support providing connections/devices as an object
2014-11-10 15:46:03 -06:00
Andrew Stewart e93e27989a Update examples for new Connection/Device syntax 2014-11-10 12:37:37 -08:00
Andrew Stewart f1b982fedd Support providing connections/devices as an object
Before:

  connections: [
    { name: 'loopback', adaptor: 'loopback', port: 13 }
  ],

Now:

  connections: {
    loopback: { adaptor: 'loopback', port: 13 }
  }

Array syntax still works, but has been marked as deprecated.
2014-11-10 10:52:55 -08:00
deadprogram efe3d8fef1 Correct link to Robeaux 2014-11-07 16:15:25 -08:00
Andrew Stewart b8a7fab75b Remove extraneous Leap Motion config hash argument 2014-11-07 14:25:11 -08:00
deadprogram 7b9cb8eef5 Almost forgot MQTT, the list is getting long 2014-11-07 06:05:39 -08:00
deadprogram b8e7f058df Add missing devices to README 2014-11-07 06:01:50 -08:00
Andrew Stewart 6d0d13e5b6 Bump version to "0.20.2" 2014-11-06 09:48:47 -08:00
Andrew Stewart 4c539ab9d1 Better configuration for TDR test mode 2014-11-06 09:48:21 -08:00
Andrew Stewart 277d4a51ee Correct API errors 2014-11-06 09:10:56 -08:00
deadprogram 328841b80c Add API and browser support to README 2014-11-06 07:00:17 -08:00
Andrew Stewart e0d3ffbe22 Bump version to "0.20.1" 2014-11-05 15:56:37 -08:00
Andrew Stewart 19f9d57f1a Bump version to "0.20.0" 2014-11-05 15:48:24 -08:00
Andrew Stewart e9f73228f1 Move requires around to make Browserify cooperate 2014-11-05 15:24:50 -08:00
Andrew Stewart c43978bea2 Add logging for module registration 2014-11-05 14:26:18 -08:00
Javier Cervantes f5e427614b Improving README information about browser support 2014-11-05 12:44:38 -06:00
Andrew Stewart 60e89c9671 If key supplied in hash, use it to find module in Registry 2014-11-05 10:04:45 -08:00
Ron Evans e17dd743c9 Merge pull request #237 from hybridgroup/add/repository
Add Repository class, restructure external module loading
2014-11-04 09:14:14 -08:00
Andrew Stewart 966f8aa530 s/Repository/Registry/g 2014-10-31 14:14:02 -07:00
Andrew Stewart d62673bc8a Stop using extraParams 2014-10-31 13:50:22 -07:00
Andrew Stewart 1c922f02c1 Address bugs w/ connections 2014-10-31 13:48:05 -07: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 63e43cc553 Repository module added, not integrated yet 2014-10-29 15:25:35 -07:00
Ron Evans 0cd85988e4 Merge pull request #236 from hybridgroup/fix/move-logger-config
Move Logger configuration into Cylon#config
2014-10-28 23:03:54 +00:00
Andrew Stewart 0f59645fd7 Move Logger configuration into Cylon#config 2014-10-28 15:53:03 -07:00
Ron Evans 903f8a9518 Merge pull request #235 from hybridgroup/add/log-levels
Add log levels
2014-10-28 17:38:00 +00:00
Ron Evans 3ceb6cda85 Merge pull request #234 from hybridgroup/workMode
Work mode configuration
2014-10-28 17:37:24 +00:00
Andrew Stewart a8b16a3469 Proxy all opts that aren't already used internally 2014-10-27 13:40:38 -07:00
Andrew Stewart 2cb2fc232d Basic log level implementation 2014-10-27 08:59:36 -07:00
Andrew Stewart d65742bb49 Generate code! It's what the cool kids are doing! 2014-10-24 14:54:56 -07:00
Andrew Stewart f5de644af7 Not sure why these were classes to begin with 2014-10-24 14:02:03 -07:00
Adrian Zankich 7379ce5eea Update README.markdown 2014-10-22 04:23:39 -07:00
Adrian Zankich 98ad45ce25 Update README.markdown 2014-10-22 04:10:41 -07:00
Adrian Zankich 2a822ad947 Update README.markdown 2014-10-22 04:06:56 -07:00
Andrew Stewart 3f9a7cf148 Fixup some Browserify errors, indicate support in README 2014-10-21 11:31:22 -07:00
Andrew Stewart bd95f9eb3c Reorganize tests, under 'spec' directory now 2014-10-20 14:55:25 -07:00
Andrew Stewart 9be0f779ae Update dependencies 2014-10-20 14:38:41 -07:00