Commit Graph

74 Commits

Author SHA1 Message Date
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 3f9a7cf148 Fixup some Browserify errors, indicate support in README 2014-10-21 11:31:22 -07:00
Andrew Stewart 157fcec25e Avoid creating functions inside loop, properly terminates now 2014-10-14 10:25:58 -07:00
Adrian Zankich b80ad6e167 start the robots in parallel 2014-10-04 00:56:08 -07:00
Adrian Zankich d4ed3117f3 enable async or sync work modes 2014-10-03 23:07:07 -07:00
Andrew Stewart e74675d65a Small fixes to robot.js 2014-10-02 11:35:33 -07:00
Andrew Stewart d865bac72b Add error triggering 2014-09-30 16:13:20 -07:00
Andrew Stewart 81dfda5732 Fixup specs 2014-09-30 12:22:00 -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 de0a8fc0cb Emit 'ready' event, not 'work', when working 2014-09-29 10:21:29 -07:00
Andrew Stewart 6fa67f0e3b Trigger test mode by checking NODE_ENV
Adds CYLON_TEST var for tests to make sure tests run properly
2014-09-22 15:05:45 -07:00
Andrew Stewart 299ade796b Rename auto_start to 'auto' 2014-09-22 14:20:26 -07:00
Andrew Stewart c182c1316e Auto start by default, implement start of modes 2014-09-08 15:28:16 -07:00
Andrew Stewart 70bd524ebe Explain auto_start better 2014-09-08 14:33:07 -07:00
Adrian Zankich 69f066e432 async the auto start 2014-09-08 14:30:23 -07:00
Andrew Stewart 3ec6c2717a Switch to Logger.debug for default work, add test for #start return val 2014-09-08 14:14:11 -07:00
Andrew Stewart f0d0e4b738 Correct tests for auto-start, allow for non-truthy values 2014-09-08 14:12:14 -07:00
Adrian Zankich 12ae17eeb2 Fix typo 2014-09-08 13:43:11 -07:00
Adrian Zankich 021c1756dc Auto start by default 2014-09-08 13:41:59 -07:00
Andrew Stewart f1544e5a8f Add support for work to be triggered via an event 2014-09-08 12:57:56 -07:00
Andrew Stewart 9fe9700eef Restructure Halt/Disconnect Structure
Moves disconnecting event handlers up a level so adaptors/drivers don't have to
worry about it.

Now, Adaptor/Driver subclasses should simply execute the provided callback to
dindicate they're done disconnecting, rather than calling the superclass method
as before.
2014-09-05 09:38:12 -07:00
Andrew Stewart 179c486c80 Address namespace collisions for robots, devices, and connections 2014-09-04 14:51:44 -07:00
Andrew Stewart 48497b7b0e Default to no-op callbacks for #halt methods 2014-09-04 11:22:00 -07:00
Andrew Stewart d2b00c7d30 Attempt to stop drivers, then adaptors 2014-09-04 10:18:18 -07:00
Andrew Stewart 3b7c96e81e Add user configuration for Cylon internals 2014-09-03 15:08:48 -07:00
Andrew Stewart 11082b44a9 Remove extraneous Connection#halt method 2014-09-02 20:26:26 -07:00
Andrew Stewart 55f9445149 Remove #proxyTestStubs in favor of inline solution 2014-08-13 15:04:25 -07:00
Andrew Stewart bad414be39 Correctly avoid labelling 'work' as a command 2014-08-07 14:00:30 -07:00
Andrew Stewart e6c567a090 Add new command structure 2014-08-07 12:24:29 -07:00
Andrew Stewart 026d3777e6 Simplify coercion of Robot to JSON 2014-07-29 18:49:35 -07:00
Ron Evans 8762820d0c Merge pull request #213 from hybridgroup/refactor/threepio
Threepio Support
2014-07-19 01:08:19 +02:00
Andrew Stewart d7987f959e Fix typo 2014-07-15 11:54:16 -07:00
Adrian Zankich 0184efb4cd Merge pull request #211 from hybridgroup/fix/require-connection
Require a connection if a robot has any devices
2014-07-14 07:57:20 -10:00
Andrew Stewart 1c8e84cfb2 Clean up robot initialization 2014-07-12 10:48:57 -07:00
Andrew Stewart 4dd7e013ed Require a connection if a robot has any devices 2014-07-11 10:46:22 -07:00
Andrew Stewart f0d8b0360b Remove `self` references in favor of #bind 2014-07-03 09:35:24 -07:00
Andrew Stewart 5acfd4aed4 Remove Utils#bind in preference of built-in fn
We were re-implementing Function.prototype.bind, so let's just use that.
2014-06-17 19:35:07 -07:00
Andrew Stewart 6de922f2fc Make halting on SIGINT async
This change gives adaptors/drivers more flexibility in halting. Additionally,
now, by default, all Adaptors/Drivers will remove all their event listeners
before halting, which should prevent some additional commands from being sent to
the adaptor during shutdown.
2014-06-12 15:31:49 -07:00
Andrew Stewart 9c60700c0f Clean up declaration of default work block 2014-06-10 18:38:55 -07:00
Andrew Stewart b66a1d3fee Remove unused param for #start callback 2014-06-10 18:38:00 -07:00
Andrew Stewart 594c73dc60 Declare missingModuleError before it's used 2014-06-10 18:37:19 -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 3672a1b712 General cleanup of single-line statements 2014-06-09 14:02:06 -07:00
Andrew Stewart dd553a55f2 Clean up #start to use Async.series 2014-06-09 13:55:44 -07:00
Andrew Stewart 4e43483e9d Slightly refactor constructor 2014-06-09 13:41:46 -07:00
Andrew Stewart dbde3d5b7d Remove circular reference from Robot 2014-06-09 13:24:42 -07:00
Ron Evans 3717c4dc31 Merge pull request #195 from hybridgroup/refactor/robots-collection
Refactor Robots collection
2014-06-06 18:36:19 -04:00
Andrew Stewart ebdeeccd12 Use implicit object conversion with #toJSON
JSON.stringify, if told to convert an object with a #toJSON method, will instead
stringify the result of the #toJSON method.
2014-06-06 14:15:43 -07:00
Andrew Stewart 81fa260963 Store robots in an dict, rather than array
Also removes the find{Robot,RobotConnection,RobotDevice} methods. Additionally,
stops passing the Master through to the Robot constructor, we can just
require('./cylon') if we need to access anything in there.
2014-06-06 11:36:22 -07:00