Commit Graph

153 Commits

Author SHA1 Message Date
mmcwilliams f74465cbbc utf8 not uft8. I am a freaking dumbass. 2017-12-12 11:57:04 -05:00
mmcwilliams 05a69e5512 Do not log getState data, but do log utf8 string and parsed object onWrite 2017-12-12 11:54:43 -05:00
mmcwilliams 5f61865366 No need to log state 2017-12-12 11:38:48 -05:00
mmcwilliams 76fcc95327 See what state is before sending 2017-12-11 14:47:05 -05:00
mmcwilliams 5f97c7a4de Pass back actual state object. 2017-12-11 14:44:27 -05:00
mmcwilliams 1fef6d6925 Pass an intval.state object into ble lib 2017-12-11 14:38:46 -05:00
mmcwilliams a71deca9e3 INTBAL?????? 2017-11-23 09:52:49 -05:00
mmcwilliams 6ce6af3abe Log whether or not frame is part of a sequence. 2017-11-23 09:46:18 -05:00
mmcwilliams 6ee022a2a4 Had not declared query const properly. Fixed. 2017-11-23 09:35:47 -05:00
mmcwilliams 64389ab954 Add feature to list all frames and another to find others with a WHERE statement. 2017-11-23 09:34:24 -05:00
mmcwilliams cd3f79a3a0 Use an integer to track direction, boolean is not an sqlite3 datatype. 2017-11-23 09:29:44 -05:00
mmcwilliams e558b0387d State.frame.current, not state.current. 2017-11-23 09:23:05 -05:00
mmcwilliams 320d3fe02f Spell exposure right, ya dingus. 2017-11-23 09:21:56 -05:00
mmcwilliams 73a65d9021 Add sqlite3 and table logging functionality. Track all frames all the time. 2017-11-23 09:19:43 -05:00
mmcwilliams a79d13d382 Add sequence module and db module placeholder 2017-11-22 20:26:10 -05:00
mmcw-dev c827f64510 Update intval module documentation 2017-11-22 09:58:57 -05:00
mmcw-dev 7109e6c52e Add general purpose characteristic for intval3 2017-11-22 09:58:45 -05:00
mmcw-dev 0272ca21f6 Add bleno to main process by adding a module that gets incorporated into the same process running express. 2017-11-22 09:30:08 -05:00
mmcw-dev 8eccf05a68 storage.getItem, not getItem, you scrub. 2017-10-23 20:31:24 -04:00
mmcw-dev 7ac642ee30 Accidentally commented out gpio from intval module 2017-10-23 13:32:45 -04:00
mmcw-dev b307567a51 Persist device state with node-persist. This allows multiple controllers to share state, and for device to maintain settings between shutdowns. 2017-10-23 12:58:37 -04:00
mmcw-dev c508c6e693 Caught nagging bug, will calculate timing if default time is set. 2017-10-23 00:30:08 -04:00
mmcw-dev a9e13ac2a6 Restore device state in app, set counter in webapp, 2017-10-22 19:59:38 -04:00
mmcw-dev d7ca2ebe46 All features added to /frame endpoint, can set direction independent of the state and can set the exposure as well. 2017-10-21 20:12:39 -04:00
mmcw-dev da3908c2e5 Add logic to prevent frames shorter than 250ms. Might work for now. Seemingly only happening with web requests? 2017-10-21 19:31:52 -04:00
mmcw-dev c2f372c7fe Actually pass the required information into the callback function 2017-10-21 12:23:37 -04:00
mmcw-dev 0b245a00c4 Log after frame is complete 2017-10-21 12:21:15 -04:00
mmcw-dev 9302cf1b21 Force example frame before evaluating query and body of post for parameters 2017-10-21 12:10:16 -04:00
mmcw-dev 0848d5bfc0 Add logging to webapp and callback to frame function in intval 2017-10-21 12:08:12 -04:00
mmcw-dev 41360405c3 Lol. Was a little overzealous with a replace all. _state.release.time should never have been changed to exposure. 2017-10-21 11:54:45 -04:00
mmcw-dev e2ee307824 Add logging back because release no longer works 2017-10-21 11:52:41 -04:00
mmcw-dev 186b8324d1 Manage state from the webapp. Build all features there before mobile. 2017-10-21 11:46:06 -04:00
mmcw-dev 58f8d09775 Try catch the connection 2017-10-20 21:45:17 -04:00
mmcw-dev df106e6e90 Remove some logging, clean up others 2017-10-20 21:10:01 -04:00
mmcw-dev 638530d2b2 Try a 400ms backwards open variable 2017-10-20 21:07:43 -04:00
mmcw-dev b22712053c Remove excessive logging 2017-10-20 21:05:00 -04:00
mmcw-dev f4d7d3c593 Wow. Just wow. 2017-10-20 21:03:47 -04:00
mmcw-dev 5079adf04f Paused logging 2017-10-20 21:01:58 -04:00
mmcw-dev cc6311a01a Add logging to backwards from forwards logic 2017-10-20 20:58:55 -04:00
mmcw-dev e09f1adbcd Ok backwards frames are apparently doing fine. This commit uses a better organized object structure for release variables. 2017-10-20 20:54:35 -04:00
mmcw-dev 190732de13 Whoops, referenced "dir" not "val" 2017-10-20 20:45:21 -04:00
mmcw-dev f74fa2798e Reduce "closed" time by 50ms. Is still too long when frame fires. Logging might be the culprit 2017-10-20 20:42:11 -04:00
mmcw-dev 6882c37cf0 Using a "closed" variable. That's the ticket. 2017-10-20 20:39:07 -04:00
mmcw-dev 9ceb17c03b Forget pad, just use open 2017-10-20 20:36:27 -04:00
mmcw-dev 4908ccabca Use a padding value, instead of subtracting the open variable from the desired exposure. 2017-10-20 20:35:00 -04:00
mmcw-dev c95af1693f Reduce open state variable by 50 ms, from 300 to 250 2017-10-20 20:31:28 -04:00
mmcw-dev 32e94fadb0 That was the wrong variable as well 2017-10-20 20:29:14 -04:00
mmcw-dev 58267bf71c Set pause flag before frame is actually paused. To prevent stop events when motor slows. 2017-10-20 20:27:43 -04:00
mmcw-dev ca8f6b2be9 Logging when frames restart. I am still screwing up. 2017-10-20 20:25:45 -04:00
mmcw-dev 243f45c836 Harden the logic which allows exposures at arbitrary exposure times. A "pause" variable has been added to the frame state that tracks when the frame is intentionally paused, preventing the premature pausing of a single frame. 2017-10-20 20:19:29 -04:00
mmcw-dev ef77ecce83 Log microswitch watch function because frames are being stopped prematurely 2017-10-20 20:10:38 -04:00
mmcw-dev 4d16ab8921 Confarnit! Caught the same error in another place, was referencing a variable to an undefined variable. 2017-10-20 20:08:43 -04:00
mmcw-dev 6f73790f5a Was using undefined variable. Silly me. 2017-10-20 20:05:51 -04:00
mmcw-dev 736a0c858b Log variables when pausing frames. 2017-10-20 19:58:16 -04:00
mmcw-dev d511ecdfbe If statements were eating the frame continuance step. This has been altered by using 0 as the default value for arbitrary exposure frames. 2017-10-20 19:53:57 -04:00
mmcw-dev 43213cc6ce Match exposure time to intval2 logic. Try a 5 second exposure time. 2017-10-20 19:44:58 -04:00
mmcw-dev 7e989eeadf Add beginnings of the arbitrary exposure time logic. Test with /tests/index.js file 2017-10-20 19:36:23 -04:00
mmcw-dev 2a08c64878 Stop immediately 2017-10-19 22:13:34 -04:00
mmcw-dev b7dd9e4fa1 Was not actually calling intval._stop(). How embarassing? 2017-10-19 22:03:13 -04:00
mmcw-dev 0b47713c58 Stop resetting frame.start to 0 2017-10-19 21:59:38 -04:00
mmcw-dev 6218d8d585 Refactor intval library to use object. The nature of the GPIO module in use breaks references to this 2017-10-19 21:52:13 -04:00
mmcw-dev 15d9225c04 Log error on uncaught exception 2017-10-19 21:42:52 -04:00
mmcw-dev 53d50e715c No pins exit message 2017-10-19 21:34:14 -04:00
mmcw-dev e27add8da7 Refactor releaseWatch to use a seperate function to determine close state for the release switch 2017-10-19 21:30:07 -04:00
mmcw-dev 2b06eb3b3c Release pin is crashing lib 2017-10-19 21:24:20 -04:00
mmcw-dev cb407b5057 Switched pins for micro and release in the intval lib 2017-10-19 21:21:41 -04:00
mmcwilliams 86ef664cd3 Update intval library documentation 2017-09-25 23:27:04 -04:00
mmcwilliams ceb961ebd6 Add unexport function to onoffsim GPIO object 2017-09-25 23:26:47 -04:00
mmcwilliams 495e59eae2 Use log library in intval module 2017-09-25 23:26:13 -04:00
mmcwilliams 82aa857ffd Use log library instead of ipc log 2017-09-25 23:25:54 -04:00
mmcwilliams a5b4ef2149 Import mscript library from mcopy
Refactored into es6 style, intention is to extend it to accept delays
in looping logic
2017-09-25 23:25:15 -04:00
mmcwilliams 4ec3cf422b Document intval lib logic for microswitch watcher 2017-09-24 22:28:46 -04:00
mmcwilliams 50a335af95 Add log library and microswitch logic 2017-09-24 22:28:26 -04:00
mmcwilliams a9f2040f3f Squash errors on connect (for dev) 2017-09-24 22:28:06 -04:00
mmcwilliams 1b51b50185 Add log library 2017-09-24 22:27:53 -04:00
mmcwilliams 31a5b315bd Try out microswitch logic 2017-09-23 08:53:48 -04:00
mmcwilliams bc077a24a1 Document remaining functions in lib/intval 2017-09-19 15:40:42 -04:00
mmcwilliams aadf6aef37 Remove extra function name from docs
jsdoc does this well enough without repeating. Does not actually
improve readability in code
2017-09-19 15:23:48 -04:00
mmcwilliams 52c0c6f352 Add default optional values to documentation 2017-09-19 15:20:58 -04:00
mmcwilliams bfb28a0448 Add documentation to interval 2017-09-19 15:06:52 -04:00
mmcwilliams 32affb1b72 Use PINS configuration object to initialize pins
TODO: Separate into file, automatically switching out for different
models
2017-09-19 15:06:34 -04:00
mmcwilliams 332399cfd7 Document intval lib 2017-09-18 20:46:18 -04:00
mmcwilliams 78135c4e77 More complex logic to prevent errant closed events from breaking 2017-09-17 20:25:21 -04:00
mmcwilliams 418d33c8f7 Updated default behavior of frame
Also added a parallel example of the logic to gpio.js
2017-09-17 19:51:33 -04:00
mmcwilliams c49c6a5b8d Documentation for blootstrap 2017-09-17 17:54:07 -04:00
mmcwilliams b60334d4b7 Add documentation to wifi library 2017-09-17 15:50:14 -04:00
mmcwilliams e3393e6e7d Add documentation to onoffsim 2017-09-17 15:20:38 -04:00
mmcwilliams 9f308f035f Install jsdoc-to-markdown for documentation
For adding documentation to libraries
2017-09-17 15:13:40 -04:00
mmcwilliams 32625bbbde Unexport buttons on uncaught exception 2017-09-16 13:35:39 -04:00
mmcwilliams a0729ff9d9 Write using template string, not object 2017-08-30 08:59:27 -04:00
mmcwilliams c87d425c57 Add better state object structure
And use in preliminary logic
2017-08-29 22:27:56 -04:00
mmcwilliams ddf89cf6aa Start intval logic in module 2017-08-29 08:23:52 -04:00
mmcwilliams 9eac1e0193 Install with latest node.js and latest npm
Create a sim library as a fallback for the on off module, for
development
2017-08-28 08:49:47 -04:00
mmcwilliams 40cfda8d90 Remove logging. 2017-08-26 19:26:30 -04:00
mmcwilliams 760c6c72ab Require specifically the Gpio function 2017-08-26 19:08:39 -04:00
mmcwilliams 90210e02f3 Dump contents of the onoff to console 2017-08-26 19:06:43 -04:00
mmcwilliams 524aba90d8 Install onoff for better button watching 2017-08-22 01:31:27 -04:00
mmcwilliams 77a10fa80a Add stubb functionality for starting and stopping motor via hbridge 2017-08-22 00:49:08 -04:00
mmcwilliams 0d05b18682 Add startFrame variable for tracking length of frames 2017-08-22 00:30:17 -04:00
mmcwilliams 1c53af9215 Add routes for basic app structure 2017-08-22 00:00:24 -04:00