Compare commits

...

49 Commits

Author SHA1 Message Date
mmcwilliams d1c356212a Add new urls and mirrors to Readme 2023-04-07 09:25:52 -04:00
mmcwilliams 3cfa2a28a0 Add sort-stl capabilties to makefile for OpenSCAD models 2023-04-05 23:35:58 -04:00
Matt McWilliams e5a915ae7c Add the reinforced key design from intval2 2022-11-11 13:31:43 -05:00
Matt McWilliams 561bfd784c Work in progress of adding Makefile to build all OpenSCAD models for printing. Based off work in intval2 project with a slightly more automated approach. Hopefully can massage the parseVars.sh script into a single command within the Makefile. 2022-10-09 16:10:27 -04:00
Matt McWilliams ca9ff6b621 Add reinforced motor key design with a notched corner 2021-05-02 14:46:44 -04:00
Matt McWilliams 1d1bb68cd1 Use new standoffs design in exploded view 2021-03-28 14:56:39 -04:00
Matt McWilliams 69190daf45 New standoffs design 2021-03-28 14:56:19 -04:00
Matt McWilliams 2e375086c8 release the laser cutting files as an svg for cutters that use this file type 2021-03-24 09:37:19 -04:00
sixteenmillimeter 46c56ab30b
Merge pull request #22 from sixteenmillimeter/dependabot/npm_and_yarn/handlebars-4.7.6
Bump handlebars from 4.4.3 to 4.7.6
2020-09-17 13:36:36 -04:00
sixteenmillimeter 07eafe4752
Merge pull request #21 from sixteenmillimeter/dependabot/npm_and_yarn/lodash-4.17.19
Bump lodash from 4.17.15 to 4.17.19
2020-09-17 13:36:22 -04:00
dependabot[bot] aa3d1aa15a
Bump handlebars from 4.4.3 to 4.7.6
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.4.3 to 4.7.6.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.4.3...v4.7.6)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-04 10:54:11 +00:00
mmcwilliams 77d1aceb99 Make a state folder before install 2020-08-16 11:38:50 -04:00
mmcwilliams 1d2cc757ec More explicitly watch for undefined env variables. 2020-07-25 11:56:43 -04:00
mmcwilliams 5caa0d17b2 Failed to install with lts, switched back to 9.9.0 2020-07-25 08:26:48 -04:00
mmcwilliams 98937bae82 Target host with build 2020-07-24 14:10:43 -04:00
mmcwilliams d67d55d82f Target version 9 2020-07-24 14:07:12 -04:00
mmcwilliams 2e2751ad1b Add experimental pkg build process for creating portable binaries for debian 2020-07-23 18:04:11 -04:00
dependabot[bot] 9773b10311
Bump lodash from 4.17.15 to 4.17.19
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-16 08:08:53 +00:00
mmcwilliams 8ef21c4991 Motor key is now printable without supports inside the set screw void and the hobbled rod void. 2020-07-09 09:15:11 -04:00
mmcwilliams 1b9abd897d Build script updates config.xml file for cordova build process. 2020-05-20 01:45:45 -04:00
mmcwilliams 8a221f1969 Increment version for release 2020-05-19 23:28:31 -04:00
mmcwilliams 020b273ab2 Monitor the progress of an advanced sequence 2020-05-19 23:23:42 -04:00
mmcwilliams 05af031cba Resolves #19. Resolves #18. Resolves #17.
Creates an "advanced" screen with UI for explicitly declaring the number of loops.
2020-05-19 18:40:19 -04:00
mmcwilliams 7d779bc5c9 Compile ble module with typescript. Add globals file to prevent errors. 2020-05-19 17:31:55 -04:00
mmcwilliams b4091bf06b Fixed single line issue 2020-05-19 17:28:14 -04:00
mmcwilliams 31ad5286de Set sequence state to false when done. 2020-05-19 17:06:36 -04:00
mmcwilliams d4acede481 Install uuid for build script. Increment patch 2020-05-19 17:06:24 -04:00
mmcwilliams f03f83f33e Create a build script for tagging the current build 2020-05-19 17:04:47 -04:00
mmcwilliams f52b1cc861 Move install script into ./scripts 2020-05-19 17:04:36 -04:00
mmcwilliams 27f996684b Throw warning containing raw bluetooth response if JSON parser fails. 2020-05-18 21:45:20 -04:00
Matt 476708de94
Add license to Readme.md 2020-05-17 16:00:36 -04:00
mmcwilliams 2e3cc409b0 PWA wifi functions were not attached to DOM elements, only mobile ones. getWifi, setWifi and editWifi bindings were added to both pwa.init and mobile.init functions and DOM elements were bound to the generic functions. Resolves #7 2020-05-15 23:06:57 -04:00
mmcwilliams 319e7a72ae Add a default icon for app builds 2020-05-15 23:04:08 -04:00
mmcwilliams e6b8d5b723 Update cordova-ios (due to errors on `cordova build ios`). Increment patch to 1.0.6 2020-05-15 21:40:50 -04:00
mmcwilliams 2dc24ce64e Caught issue where frame function doesn't work after sequence is run. 2020-05-15 21:26:04 -04:00
mmcwilliams 31dd4288f3 Typo 2020-05-07 14:02:56 -04:00
mmcwilliams a4d27955f7 Add web app link. Update parts list. 2020-05-07 13:48:16 -04:00
mmcwilliams 9fa6335c48 STATE.sequence is not being reset to false when over. UI issue #20 is appearing in web app as well as iOS app, so this problem is likely occuring in intval3.core.js or replicated in all apps. 2020-05-07 13:23:59 -04:00
mmcwilliams f7d5d0e79a Merge remote-tracking branch 'origin/master' 2020-05-07 13:22:37 -04:00
mmcwilliams a7f6745cf7 Add MIT license to project. Was implicitly MIT licensed before but making it explicit. 2020-05-07 13:22:02 -04:00
mmcwilliams b144faa8e3 No arg.label, just label 2020-01-14 13:34:31 -05:00
mmcwilliams 888cd074e6 Typo in createLogger 2020-01-14 13:33:13 -05:00
mmcwilliams 3ca335b113 Merge branch 'master' of https://github.com/sixteenmillimeter/intval3 2020-01-14 12:00:22 -05:00
mmcwilliams c83bce13f7 update 2020-01-14 11:59:35 -05:00
mmcwilliams 1cf581602b New log format that is more readable, not json. Has timestamps. 2020-01-14 11:59:29 -05:00
mmcwilliams 94e6982adb Remove excessive log point to make them less noisy. 2020-01-14 11:59:12 -05:00
litter 30c78ba58d Got build working again with AppCenter distrobution. 2020-01-02 16:55:22 -05:00
litter a87e81f128 Merge branch 'master' of https://github.com/sixteenmillimeter/intval3
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
Merge server changes with more recent app changes.
2020-01-02 12:41:39 -05:00
litter d4f04ec9f1 Fix error message on app startup. Test to determine this doesn't break functionality with connected app. Must run "getState()" on wake as well as startup. 2020-01-02 12:40:40 -05:00
40 changed files with 216062 additions and 199339 deletions

4
.gitignore vendored
View File

@ -3,4 +3,6 @@ run_dev.sh
state
*/.DS_Store
.DS_Store
*.tsbuildinfo
*.tsbuildinfo
bin/*
!bin/*.md

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020-2022 Matt McWilliams
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,5 +1,10 @@
# INTVAL3
### [Project Home - git.sixteenmillimeter.com/16mm/intval3](https://git.sixteenmillimeter.com/16mm/intval3)
* Github Mirror - [github.com/sixteenmillimeter/intval3](https://github.com/sixteenmillimeter/intval3)
* Gitlab Mirror - [gitlab.com/16mm/intval3](https://gitlab.com/16mm/intval3)
### What is this?
INTVAL3 is an open source intervalometer for the Bolex 16mm camera. The goal of the project is to create a cheap-to-make intervalometer that can be used to automate time-lapse or animation on the Bolex using mobile, web or physical controls.
@ -8,6 +13,10 @@ This is the third incarnation of the INTVAL project, this time utilizing the [Ra
The [INTVAL2](https://github.com/sixteenmillimeter/intval2) project should be used if you prefer a simpler, physical interface approach.
Does your browser support [Web Bluetooth](https://caniuse.com/#feat=web-bluetooth)? Control your INTVAL3 using this web app.
### [intval.sixteenmillimeter.com](https://intval.sixteenmillimeter.com)
### Components
* [Firmware](#firmware) for the Raspberry Pi Zero W running [Node.js](https://nodejs.org) on Raspian
@ -50,17 +59,49 @@ Prototype of the bare PCB of the "bonnet" for the Raspberry Pi Zero W are availa
<br />
<a name="parts-list"></a>
## PARTS
## Parts
1. Raspberry Pi Zero W - [[Adafruit](https://www.adafruit.com/product/3400)] [[Sparkfun](https://www.sparkfun.com/products/14277)]
2. L298N Breakout Board - ?
3. 120RPM 12VDC Motor - ?
4. Microswitch w/ Roller - [[Adafruit](https://www.adafruit.com/product/819)]
5. L7805 5V Regulator - [[Adafruit](https://www.adafruit.com/product/2164)] [Sparkfun](https://www.sparkfun.com/products/107)]
1. Raspberry Pi Zero W - [[Adafruit](https://www.adafruit.com/product/3400)] [[Sparkfun](https://www.sparkfun.com/products/14277)] [[Amazon](https://amzn.to/2Wf46J8)]
2. L298N Breakout Board - [[BC Robotics](https://www.bc-robotics.com/shop/l298n-motor-driver-board/)] [[Amazon](https://amzn.to/35CRFKa)]
3. 120RPM 12VDC Motor - [[Amazon](https://amzn.to/2YDGFe2)]
4. Microswitch w/ Roller - [[Adafruit](https://www.adafruit.com/product/819)] [[Amazon](https://amzn.to/2YDGFe2)]
5. L7805 5V Regulator - [[Adafruit](https://www.adafruit.com/product/2164)] [Sparkfun](https://www.sparkfun.com/products/107)] [[Amazon](https://amzn.to/2WaF39O)]
6. 2x Thru-hole Resistors - 330 Ohm
7. 1x Thru-hole Capacitor - 10 uF
8. 1x Thru-hole Capacitor - 100 uF
9. 4x Terminal blocks
10. 1x 3.5mm Socket Audio Connector - [[Amazon](https://amzn.to/2SGFVAY)]
11. 1x 3.5mm Stereo Audio Cable - [[Amazon](https://amzn.to/3beNPrQ)]
12. 1x Momentary Push Button 7mm Diameter - [[Amazon](https://amzn.to/2LavqBK)]
13. 1x Micro Switch w/ Roller Lever 28mm x 30.2mm x 10.2mm - [[Adafruit](https://www.adafruit.com/products/819)] [[Amazon](https://amzn.to/2SMBFzX)]
14. 1x Skateboard bearing 608-2RS - [[Amazon](https://amzn.to/3b7X2lC)]
15. 4x M3.5 - 0.6 x 20mm Screws
16. 3x M2 - 0.6 x 15mm Bolts
17. 6x M5 - 0.8 x 25mm Bolts
18. 4x M5 - 0.8 Nuts
* (Optional) Proto Bonnet - [[Adafruit](https://www.adafruit.com/product/3203)]
* (Optional) INTVAL3 Bonnet - [[OSH Park](https://oshpark.com/shared_projects/SkPyOK5S)]
## License
MIT License
Copyright (c) 2020 Matt McWilliams
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.sixteenmillimeter.intval3" version="1.0.4" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="com.sixteenmillimeter.intval3" version="1.0.7" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>INTVAL3</name>
<description>
Mobile control app for the INTVAL intervalometer for Bolex 16mm cameras
@ -15,6 +15,9 @@
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<icon src="res/icon/ios/icon-60@3x.png" />
<platform name="android">
<allow-intent href="market:*" />
<icon density="mdpi" src="res/icon/android/mdpi.png" />
@ -30,19 +33,20 @@
<icon height="120" src="res/icon/ios/icon-60@2x.png" width="120" />
<icon height="60" src="res/icon/ios/icon-60.png" width="60" />
<splash src="res/screen/ios/Default@2x~universal~anyany.png" />
<preference name="APP_SECRET" value="d9cbb435-e432-43d3-ae20-747fccbc8190" />
</platform>
<preference name="DisallowOverscroll" value="true" />
<preference name="StatusBarBackgroundColor" value="#212121" />
<preference name="CameraUsesGeolocation" value="false" />
<plugin name="cordova-plugin-whitelist" spec="1" />
<plugin name="cordova-plugin-splashscreen" spec="~4.1.0" />
<plugin name="cordova-plugin-device" spec="^1.1.7" />
<plugin name="cordova-plugin-dialogs" spec="^1.3.4" />
<plugin name="cordova-plugin-ble-central" spec="^1.2.2">
<plugin name="cordova-plugin-device" spec="^2.0.3" />
<plugin name="cordova-plugin-dialogs" spec="^2.0.2" />
<plugin name="cordova-plugin-ble-central" spec="^1.2.4">
<variable name="BLUETOOTH_USAGE_DESCRIPTION" value="INTVAL3 intervalometer controls" />
</plugin>
<plugin name="cordova-plugin-statusbar" spec="^2.4.2" />
<plugin name="cordova-plugin-camera-with-exif" spec="^1.2.4" />
<engine name="android" spec="^6.4.0" />
<plugin name="cordova-plugin-statusbar" spec="^2.4.3" />
<plugin name="cordova-plugin-camera-with-exif" spec="^1.3.1" />
<engine name="ios" spec="^4.5.5" />
<engine name="android" spec="^7.1.4" />
</widget>

929
app/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,25 +1,34 @@
{
"name": "com.sixteenmillimeter.intval3",
"displayName": "INTVAL3",
"version": "1.0.4",
"version": "1.0.7",
"description": "Mobile control app for the INTVAL intervalometer for Bolex 16mm cameras",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"ios": "npm run build && cordova build ios --buildFlag='-UseModernBuildSystem=0'",
"build": "node ./scripts/build.js"
},
"author": "M McWilliams",
"license": "MIT",
"dependencies": {
"cordova-android": "^6.4.0",
"cordova-ios": "^4.5.5",
"cordova-plugin-ble-central": "^1.2.2",
"cordova-plugin-camera-with-exif": "^1.2.4",
"appcenter": "^2.6.1",
"appcenter-analytics": "^2.6.1",
"appcenter-crashes": "^2.6.1",
"cordova-android": "^7.1.4",
"cordova-ios": "^5.1.1",
"cordova-plugin-appcenter-analytics": "^0.5.1",
"cordova-plugin-appcenter-crashes": "^0.5.1",
"cordova-plugin-appcenter-shared": "^0.5.1",
"cordova-plugin-ble-central": "^1.2.4",
"cordova-plugin-camera-with-exif": "^1.3.1",
"cordova-plugin-compat": "^1.2.0",
"cordova-plugin-device": "^1.1.7",
"cordova-plugin-dialogs": "^1.3.4",
"cordova-plugin-splashscreen": "^4.1.0",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3"
"cordova-plugin-device": "^2.0.3",
"cordova-plugin-dialogs": "^2.0.2",
"cordova-plugin-splashscreen": "^5.0.3",
"cordova-plugin-statusbar": "^2.4.3",
"cordova-plugin-whitelist": "^1.3.4",
"uuid": "^8.0.0"
},
"cordova": {
"plugins": {
@ -31,11 +40,13 @@
"BLUETOOTH_USAGE_DESCRIPTION": "INTVAL3 intervalometer controls"
},
"cordova-plugin-splashscreen": {},
"cordova-plugin-camera-with-exif": {}
"cordova-plugin-camera-with-exif": {},
"cordova-plugin-appcenter-analytics": {},
"cordova-plugin-appcenter-crashes": {}
},
"platforms": [
"android",
"ios"
"ios",
"android"
]
}
}

47
app/scripts/build.js Normal file
View File

@ -0,0 +1,47 @@
'use strict';
const fs = require('fs')
const uuid = require('uuid').v4
const PACKAGE = require('../package.json')
const INDEX = './www/index.html'
const CONFIG = './config.xml'
function patch (versionStr) {
const parts = versionStr.split('.');
const patch = parseInt(parts[2])
return `${parts[0]}.${parts[1]}.${patch+1}`
}
async function main () {
const build = uuid()
const short = build.split('-')[0]
const index = fs.readFileSync(INDEX, 'utf8')
const config = fs.readFileSync(CONFIG, 'utf8')
let lines = index.split('\n')
let output
for (let i = 0; i < lines.length; i++) {
if (lines[i].indexOf('id="version"') !== -1) {
lines[i] = ` <div id="version">v${PACKAGE.version} build ${short}</div>`
break
}
}
output = lines.join('\n')
fs.writeFileSync(INDEX, output, 'utf8')
lines = config.split('\n')
for (let i = 0; i < lines.length; i++) {
if (lines[i].indexOf('id="com.sixteenmillimeter.intval3"') !== -1) {
lines[i] = `<widget id="com.sixteenmillimeter.intval3" version="${PACKAGE.version}" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">`
break
}
}
output = lines.join('\n')
fs.writeFileSync(CONFIG, output, 'utf8')
}
main()

View File

@ -7,4 +7,6 @@ cordova plugin add cordova-plugin-device
cordova plugin add cordova-plugin-dialogs
cordova plugin add cordova-plugin-ble-central --variable BLUETOOTH_USAGE_DESCRIPTION="INTVAL3 intervalometer controls"
cordova plugin add cordova-plugin-statusbar
cordova plugin add cordova-plugin-camera-with-exif
cordova plugin add cordova-plugin-camera-with-exif
cordova plugin add cordova-plugin-appcenter-analytics
cordova plugin add cordova-plugin-appcenter-crashes

View File

@ -73,21 +73,22 @@
Local IP: null
</div>
<div>
<select id="available" class="" onchange="mobile.editWifi();">
<select id="available" class="" onchange="editWifi();">
<option>N/A</option>
</select>
</div>
<div>
<input type="password" id="password" class="" placeholder="Wifi Password" />
</div>
<button id="wifi" class="" onclick="mobile.setWifi();">CONNECT</button>
<button id="wifiRefresh" class="" onclick="mobile.getWifi();">REFRESH WIFI</button>
<button id="wifi" class="" onclick="setWifi();">CONNECT</button>
<button id="wifiRefresh" class="" onclick="getWifi();">REFRESH WIFI</button>
</div>
<div>
<button id="reset" onclick="reset();">RESET</button>
<button id="restart" onclick="restart();">RESTART</button>
<button id="update" onclick="update();">UPDATE</button>
</div>
<div id="version">v1.0.7 build a90cc072</div>
</div>
<!--<div id="mscript" class="page">
<h2>MSCRIPT</h2>
@ -107,7 +108,7 @@
<input type="number" class="fstop" placeholder="5.6" value="5.6" onchange="mobile.refreshExposure();" />
</div>
<div class="setting">
<div class="label">Rex-o-fader</div>
<div class="label">Variable Shutter</div>
<select class="angle">
<option value="133" selected>0 (Normal)</option>
<option value="66">1 Stop</option>
@ -157,6 +158,31 @@
</div>
</div>
</div>
<div id="advanced" class="page">
<h2>ADVANCED</h2>
<div>
<div class="label">Loops</div>
<input type="number" id="len" value="1" step="1" min="1" />
</div>
<div>
<div class="label">Frame Multiplier</div>
<input type="number" id="multiple" value="1" step="1" min="1" />
</div>
<div>
<div id="stats">
<div><label>Real time</label> <span id="realTime">0 s</span></div>
<div><label>Film time</label> <span id="filmTime">0 s</span></div>
<div><label>Frame end</label> <span id="frameEnd">0</span></div>
</div>
</div>
<div>
<button id="run" onclick="advanced();">RUN</button>
</div>
<div id="progress">
<div id="progressVal" style="width:0%;"></div>
<div id="progressText">0%</div>
</div>
</div>
<footer>
<div id="settingsIcon" onclick="settingsPage();" class="icon">
<div> </div>
@ -164,9 +190,9 @@
<div id="appIcon" onclick="appPage();" class="icon selected">
<div></div>
</div>
<!--<div id="mscriptIcon" onclick="mscriptPage();" class="icon">
<div id="advancedIcon" onclick="advancedPage();" class="icon">
<div></div>
</div>-->
</div>
<div id="cameraIcon" onclick="cameraPage();" class="icon">
<div class="cameraIcon"></div>
</div>

View File

@ -237,6 +237,11 @@ button.focus{
.cameraIcon{
background: url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8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RROLM3UbYrHleGU8pIFKjiCGFkzkXZRyvIX4Qx/B7J+p0TS1HVEXhKuZqNVuRAGVI556McR+BwlJ+uSnCLsFEtyFticx3ZgEXMY20VgiIx2pdhBPmOwBsqJmaDyrNTlR27HXU4UiRmpwTbkgWPZxpAPY4M4ETk2dTpgW7ebYvt4UwD6kILR+LvBzs90M2Rydh+UrNBOfg4tkkjsi6232QoHsHutv8vyMvZC1vWXfKpJSg2wZxNaLflidSeDL6xyHEmRWg+CuUU1E5Z7sgvGXyrI8d8p5tJS1kiOnEPdOhLRccVsJsjRS3q2orKxoTdeCleq8gH18X2jxShrwXPq5x2b8KxKH9SKDCcFuZHzmSfiJxfpQi9HYWmEpW1O3Es/q8LT0Tetzrd7BZaX8b2/gRFY/gAd+BbPIJfE+R7obDlixShzcojSj8TtMmREG34IfJP9nj2IgwKsV1U03vhc805Afcp51zHKOoWWheEehM83YeiRSEcH1ZvOBUobNgv2JaEcWHzWZBecKgTG4UXNadiYkVZjDtUk1FV8L7MVJdw1ipKoztrMCoVu6LuWdyQS9ZeDprIJUvApBBOLTXWg4sQm7Uy82WDsGhkh9RSDOEdpTNNjsyk0okDGihmX6105pxQPKsbu5ThdCDqbARDwkeaIr84IoRBLjYqV6cinJr84vwPtiuHf1GoO22Vlm8MCDv2m5GjCNsV+dDTjjVCpfwv5Zs8IZRZd+BuYfkeideoMLd24FXl2aklhNO0GpbYHKzFMzqntr2uk0JuX3nHLlBH6llgEPfgIeHNbxC+1l4T758VqpffCUfxD4XzWfLZ6QouB/wNDUkks50hozcAAAAASUVORK5CYII=) no-repeat;
background-size: 33px 33px;
}
button i {
display: block;
@ -255,8 +260,8 @@ footer{
}
footer .icon {
/*width: 33.33%;*/
width: 50%;
width: 33.33%;
/*width: 50%;*/
height: 50px;
float: left;
box-sizing: border-box;
@ -264,8 +269,8 @@ footer .icon {
}
body.mobile footer .icon{
/*width: 25%;*/
width: 33.33%;
width: 25%;
/*width: 33.33%;*/
}
footer .icon:last-child{
@ -440,4 +445,53 @@ body.mobile footer{
line-height: 100vh;
text-shadow: 1px 1px 0px #999;
font-size: 24px;
}
#version{
bottom: 70px;
position: absolute;
color: #666;
}
#stats{
margin: 10px 0;
font-size: 18px;
}
#stats label {
color: #666;
width: 100px;
display: inline-block;
}
#stats span{
color: #fff;
}
#progress{
display: none;
position: absolute;
height: 18px;
margin: 0 2%;
width: 96%;
bottom: 58px;
left: 0;
border-radius: 4px;
overflow: hidden;
}
#progress.active{
display: block;
}
#progressVal{
height: 18px;
background: #999;
}
#progressText{
position: absolute;
top: 0;
margin: 0 auto;
width: 100%;
text-align: center;
color: #999;
mix-blend-mode: difference;
}

View File

@ -13,7 +13,8 @@ const STATE = {
scale : 'ms',
delayScale : 'ms',
counter : 0,
sequence : false
sequence : false,
advanced : 0
};
//functions
@ -27,6 +28,7 @@ window.sequence = null;
window.reset = null;
window.restart = null;
window.update = null;
window.advanced = null;
//ms
var shutter = function (exposure) {
@ -183,27 +185,43 @@ var setState = function (res) {
document.getElementById('delayScale').value = delayScale;
setDelayScale();
calcStats();
if (res.sequence == true) {
STATE.sequence = true;
if (mobile.ble) mobile.ble.active = true;
if (pwa.wble) pwa.wble.active = true;
seqState(true);
} else {
if (mobile.ble) mobile.ble.active = false;
if (pwa.wble) pwa.wble.active = false;
seqState(false);
}
};
var seqState = function (state) {
const elem = document.getElementById('seq')
const elem = document.getElementById('seq');
const advancedElem = document.getElementById('run');
if (state) {
if (!elem.classList.contains('focus')) {
elem.classList.add('focus');
elem.innerHTML = 'STOP SEQUENCE';
}
if (!advancedElem.classList.contains('focus')) {
advancedElem.classList.add('focus');
}
elem.innerHTML = 'STOP SEQUENCE';
advancedElem.innerHTML = 'STOP';
STATE.sequence = true;
} else {
if (elem.classList.contains('focus')) {
elem.classList.remove('focus');
elem.innerHTML = 'START SEQUENCE';
}
if (advancedElem.classList.contains('focus')) {
advancedElem.classList.remove('focus');
}
elem.innerHTML = 'START SEQUENCE';
advancedElem.innerHTML = 'RUN';
STATE.sequence = false;
}
};
@ -228,11 +246,129 @@ var cameraPage = function () {
document.getElementById('camera').classList.add('selected');
document.getElementById('cameraIcon').classList.add('selected');
};
var advancedPage = function () {
unsetPages();
document.getElementById('advanced').classList.add('selected');
document.getElementById('advancedIcon').classList.add('selected');
};
var isNumeric = function (n) {
return !isNaN(parseFloat(n)) && isFinite(n);
};
var calcStats = function () {
const extraFwd = BOLEX.expected;
const extraBwd = BOLEX.expected + 150;
const total = parseInt(document.getElementById('len').value);
const multiple = parseInt(document.getElementById('multiple').value);
const filmTime = (total * multiple) / 24;
const delays = total - 1;
const frameEnd = STATE.counter + (STATE.dir ? total * multiple : -total * multiple);
let exp;
let realTime;
let realTimePartial;
let realTimeDisplay;
let filmTimeDisplay;
if (STATE.exposure > BOLEX.expected) {
exp = STATE.exposure + (STATE.dir ? extraFwd : extraBwd);
} else {
exp = BOLEX.expected;
}
realTime = (exp * total * multiple) + (delays * STATE.delay);
STATE.advanced = realTime;
if (realTime < 60 * 1000) { //1min
realTimeDisplay = Math.floor(realTime * 100) / 100000;
realTimeDisplay += ' sec';
} else if (realTime >= 60 * 1000 && realTime < 60 * 60 * 1000) { //1hr
realTimePartial = Math.floor(realTime * 100) / (60 * 100000);
realTimeDisplay = Math.floor(realTimePartial);
realTimeDisplay += ' min';
if (realTimePartial > Math.floor(realTimePartial)) {
realTimeDisplay += ' ' + Math.round((realTimePartial - Math.floor(realTimePartial) ) * 60);
realTimeDisplay += ' sec'
}
} else if (realTime >= 60 * 60 * 1000 && realTime < 24 * 60 * 60 * 1000) { //1day
realTimePartial = Math.floor(realTime * 100) / (60 * 60 * 100000);
realTimeDisplay = Math.floor(realTimePartial);
realTimeDisplay += ' hr';
if (realTimePartial > Math.floor(realTimePartial)) {
realTimeDisplay += ' ' + Math.round((realTimePartial - Math.floor(realTimePartial) ) * 60);
realTimeDisplay += ' min'
}
} else if (realTime >= 24 * 60 * 60 * 1000 && realTime < 24 * 60 * 60 * 1000) { //1day
realTimePartial = Math.floor(realTime * 100) / (60 * 60 * 100000);
realTimeDisplay = Math.floor(realTimePartial);
realTimeDisplay += ' day';
if (realTimePartial > Math.floor(realTimePartial)) {
realTimeDisplay += ' ' + Math.round((realTimePartial - Math.floor(realTimePartial) ) * 24);
realTimeDisplay += ' hr'
}
}
if (filmTime < 60 * 1000) { //1min
filmTimeDisplay = Math.floor(filmTime * 100) / 100;
filmTimeDisplay += ' sec';
} else if (filmTime >= 60 * 1000) {
filmTimePartial = Math.floor(filmTime * 100) / (60 * 100000);
filmTimeDisplay = Math.floor(filmTimePartial);
filmTimeDisplay += ' min';
if (filmTimePartial > Math.floor(filmTimePartial)) {
filmTimeDisplay += ' ' + Math.round((filmTimePartial - Math.floor(filmTimePartial) ) * 60);
filmTimeDisplay += ' sec'
}
}
document.getElementById('realTime').innerHTML = realTimeDisplay;
document.getElementById('filmTime').innerHTML = filmTimeDisplay;
document.getElementById('frameEnd').innerHTML = frameEnd;
};
var seqProgress = function () {
console.log('sequence progress')
const extraFwd = BOLEX.expected;
const extraBwd = BOLEX.expected + 150;
const loops = parseInt(document.getElementById('len').value);
const multiple = parseInt(document.getElementById('multiple').value);
const progressElem = document.getElementById('progress');
const total = loops * multiple;
let delay = 0;
let exp;
if (STATE.exposure > BOLEX.expected) {
exp = STATE.exposure + (STATE.dir ? extraFwd : extraBwd);
} else {
exp = BOLEX.expected;
}
if (!progressElem.classList.contains('active')) {
progressElem.classList.add('active');
}
for (let x = 0; x < loops; x++) {
for (let y = 0; y < multiple; y++) {
let progress = ((x * multiple) + y + 1) / total;
let time = (((x * multiple) + y) * exp) + delay;
setTimeout(() => {
//console.log(progress);
document.getElementById('progressVal').style = `width: ${progress * 100}%;`;
document.getElementById('progressText').innerHTML = `${Math.round(progress * 100)}%`;
}, time);
}
delay += STATE.delay;
}
setTimeout(() => {
//console.log(progress);
document.getElementById('progressVal').style = `width: 100%;`;
document.getElementById('progressText').innerHTML = `100%`;
}, (exp * total) + ((loops - 1) * STATE.delay));
}
var UI = {};
UI.overlay = {
@ -315,4 +451,6 @@ var init = function () {
document.querySelector('.fstop').oninput = function () {
BOLEX.fstop = parseFloat(this.value);
};
document.getElementById('len').oninput = calcStats;
document.getElementById('multiple').oninput = calcStats;
};

View File

@ -82,7 +82,7 @@ mobile.ble.onConnect = function (peripheral, device) {
scan.classList.remove('active');
getState();
mobile.getWifi();
getWifi();
};
mobile.ble.disconnect = function () {
@ -148,6 +148,10 @@ mobile.init = function () {
window.reset = mobile.reset;
window.restart = mobile.restart;
window.update = mobile.update;
window.getWifi = mobile.getWifi;
window.setWifi = mobile.setWifi;
window.editWifi = mobile.editWifi;
window.advanced = mobile.advanced;
//show ble-specific fields in settings
for (let i of bleInputs) {
@ -162,6 +166,7 @@ mobile.init = function () {
mobile.getState = function () {
if (!mobile.ble.connected) {
//returning here will prevent error alert
return true
}
ble.read(mobile.ble.device.id,
mobile.ble.SERVICE_ID,
@ -169,6 +174,7 @@ mobile.getState = function () {
mobile.stateSuccess,
mobile.ble.onError);
};
mobile.stateSuccess = function (data) {
let str = bytesToString(data);
let res = JSON.parse(str);
@ -201,13 +207,13 @@ mobile.frameSuccess = function () {
console.log('Frame finished, getting state.');
mobile.ble.active = false;
document.getElementById('frame').classList.remove('focus');
mobile.getState();
getState();
} else {
setTimeout(() => {
console.log('Frame finished, getting state.');
mobile.ble.active = false;
document.getElementById('frame').classList.remove('focus');
mobile.getState();
getState();
}, STATE.exposure + 500)
}
}
@ -226,7 +232,7 @@ mobile.setDir = function () {
};
mobile.dirSuccess = function () {
console.log('Set direction');
mobile.getState();
getState();
setTimeout(() => {
setDirLabel(STATE.dir);
}, 50);
@ -251,7 +257,7 @@ mobile.setExposure = function () {
};
mobile.exposureSuccess = function () {
console.log('Set exposure');
mobile.getState();
getState();
};
mobile.setDelay = function () {
@ -271,7 +277,7 @@ mobile.setDelay = function () {
mobile.delaySuccess = function () {
console.log('Set delay');
mobile.getState();
getState();
};
mobile.setCounter = function () {
@ -303,7 +309,7 @@ mobile.setCounter = function () {
mobile.counterSuccess = function () {
console.log('Set counter');
mobile.getState();
getState();
};
mobile.sequence = function () {
@ -330,18 +336,65 @@ mobile.sequence = function () {
mobile.sequenceSuccess = function () {
console.log('Sequence state changed');
mobile.getState();
getState();
setTimeout(() => {
if (STATE.sequence) {
mobile.ble.active = true;
seqState(true);
} else {
mobile.ble.active = false;
seqState(false);
}
}, 20);
}, 42);
};
mobile.advanced = function () {
const len = parseInt(document.getElementById('len').value);
const multiple = parseInt(document.getElementById('multiple').value);
const opts = {
type : 'sequence',
len,
multiple
};
if (!opts.len) {
return mobile.alert('You must set a total frame count.');
}
if (!opts.multiple) {
return mobile.alert('You must set a frame multiple value.');
}
const elem = document.getElementById('run');
if (!mobile.ble.connected) {
return mobile.alert('Not connected to an INTVAL3 device.');
}
ble.write(mobile.ble.device.id,
mobile.ble.SERVICE_ID,
mobile.ble.CHAR_ID,
stringToBytes(JSON.stringify(opts)), //check length?
mobile.advancedSuccess,
mobile.ble.onError);
if (!elem.classList.contains('focus')) {
elem.classList.add('focus');
}
mobile.ble.active = true;
};
mobile.advancedSuccess = function () {
console.log('Sequence state changed');
if (STATE.sequence === false) {
seqProgress();
}
getState();
document.getElementById('seq').blur();
document.getElementById('run').blur();
setTimeout(() => {
console.log('Sequence complete');
getState();
}, STATE.advanced + 1000);
};
//retreive object with list of available Wifi APs,
//and state of current connection, if available
@ -467,6 +520,23 @@ mobile.setWifiSuccess = function () {
console.log('Set new wifi credentials');
setTimeout(mobile.getWifi, 100);
};
mobile.getInfo = function () {
const opts = {
type : 'info'
};
ble.write(mobile.ble.device.id,
mobile.ble.SERVICE_ID,
mobile.ble.CHAR_ID,
stringToBytes(JSON.stringify(opts)), //check length?
mobile.dirSuccess,
mobile.ble.onError);
};
mobile.infoSuccess = function () {
console.dir()
};
mobile.exif = {}
mobile.getCamera = function () {
@ -667,7 +737,7 @@ mobile.reset = function () {
mobile.resetSuccess = function () {
console.log('Reset to default settings');
setTimeout(() => {
mobile.getState();
getState();
}, 100)
};

View File

@ -129,7 +129,7 @@ pwa.wble.onConnect = function (peripheral, device, service) {
scan.classList.remove('active');
getState();
pwa.getWifi();
getWifi();
};
pwa.wble.disconnect = function () {
@ -176,6 +176,7 @@ pwa.wble.read = async function (characteristicId) {
let characteristic;
let value;
let json;
let obj;
if (typeof pwa.wble.characteristics[characteristicId] === 'undefined') {
try {
@ -199,7 +200,14 @@ pwa.wble.read = async function (characteristicId) {
json = decoder.decode(value);
return JSON.parse(json);
try {
obj = JSON.parse(json);
} catch (err) {
console.warn(json);
throw err;
}
return obj;
}
pwa.wble.write = async function ( characteristicId, json) {
@ -252,6 +260,10 @@ pwa.init = function () {
window.reset = pwa.reset;
window.restart = pwa.restart;
window.update = pwa.update;
window.getWifi = pwa.getWifi;
window.setWifi = pwa.setWifi;
window.editWifi = pwa.editWifi;
window.advanced = pwa.advanced;
//show ble-specific fields in settings
for (let i of bleInputs) {
@ -316,13 +328,13 @@ pwa.frameSuccess = function () {
console.log('Frame finished, getting state.');
pwa.wble.active = false;
document.getElementById('frame').classList.remove('focus');
pwa.getState();
getState();
} else {
setTimeout(() => {
console.log('Frame finished, getting state.');
pwa.wble.active = false;
document.getElementById('frame').classList.remove('focus');
pwa.getState();
getState();
}, STATE.exposure + 500)
}
}
@ -344,7 +356,7 @@ pwa.setDir = async function () {
};
pwa.dirSuccess = function () {
console.log('Set direction');
pwa.getState();
getState();
setTimeout(() => {
setDirLabel(STATE.dir);
}, 50);
@ -374,7 +386,7 @@ pwa.setExposure = async function () {
pwa.exposureSuccess = function () {
console.log('Set exposure');
pwa.getState();
getState();
};
pwa.setDelay = async function () {
@ -398,7 +410,7 @@ pwa.setDelay = async function () {
pwa.delaySuccess = function () {
console.log('Set delay');
pwa.getState();
getState();
};
pwa.setCounter = async function () {
@ -427,7 +439,7 @@ pwa.setCounter = async function () {
pwa.counterSuccess = function () {
console.log('Set counter');
pwa.getState();
getState();
};
pwa.sequence = async function () {
@ -457,7 +469,7 @@ pwa.sequence = async function () {
pwa.sequenceSuccess = function () {
console.log('Sequence state changed');
pwa.getState();
getState();
setTimeout(() => {
if (STATE.sequence) {
pwa.wble.active = true;
@ -470,6 +482,55 @@ pwa.sequenceSuccess = function () {
};
pwa.advanced = async function () {
const len = parseInt(document.getElementById('len').value);
const multiple = parseInt(document.getElementById('multiple').value);
const opts = {
type : 'sequence',
len,
multiple
};
if (!opts.len) {
return pwa.alert('You must set a total frame count.');
}
if (!opts.multiple) {
return pwa.alert('You must set a frame multiple value.');
}
const elem = document.getElementById('run');
if (!pwa.wble.connected) {
return pwa.alert('Not connected to an INTVAL3 device.');
}
try {
await pwa.wble.write(pwa.wble.CHAR_ID, opts);
} catch (err) {
console.error(err);
pwa.wble.onError(err.message);
return false;
}
pwa.advancedSuccess();
if (!elem.classList.contains('focus')) {
elem.classList.add('focus');
}
pwa.wble.active = true;
};
pwa.advancedSuccess = function () {
console.log('Sequence state changed');
if (STATE.sequence === false) {
seqProgress();
}
getState();
setTimeout(() => {
console.log('Sequence complete');
getState();
}, STATE.advanced + 1000);
};
//retreive object with list of available Wifi APs,
//and state of current connection, if available
pwa.getWifi = async function () {
@ -497,7 +558,8 @@ pwa.getWifiSuccess = function (res) {
UI.spinner.hide();
UI.overlay.hide();
elem.innerHTML = ''
elem.innerHTML = '';
console.dir(res);
if (!res.available || res.available.length === 0) {
if (elem.classList.contains('active')) {
elem.classList.remove('active');

View File

@ -160,6 +160,50 @@ web.sequenceSuccess = function (res) {
mobile.getState();
}
};
web.advanced = function () {
const len = parseInt(document.getElementById('len').value);
const multiple = parseInt(document.getElementById('multiple').value);
const params = {
len,
multiple
}
const opts = {
method : 'POST',
headers : web._header,
body : JSON.stringify(params)
}
if (!params.len) {
return alert('You must set a total frame count.');
}
if (!params.multiple) {
return alert('You must set a frame multiple value.');
}
fetch('/sequence', opts)
.then(web.useJson)
.then(web.advancedSuccess)
.catch(err => {
console.error('Error getting /sequence');
console.error(err);
})
};
web.advancedSuccess = function (res) {
if (res.started && res.started != false) {
STATE.sequence = true;
document.getElementById('seq').focus();
seqState(true);
seqProgress();
} else if (res.stopped) {
STATE.sequence = false;
document.getElementById('seq').blur();
seqState(false);
getState();
}
setTimeout(() => {
console.log('Sequence complete');
getState();
}, STATE.advanced + 1000);
};
web.reset = function () {
const opts = {
method : 'POST',
@ -228,5 +272,6 @@ web.init = function () {
window.reset = web.reset;
window.restart = web.restart;
window.update = web.update;
window.advanced = web.advanced;
console.log('started web')
};

1
bin/Readme.md Normal file
View File

@ -0,0 +1 @@
# experimental build

55
hardware/Makefile Normal file
View File

@ -0,0 +1,55 @@
###################
#
# intval3 OpenSCAD Makefile
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
###################
PREFIX=intval3
OPENSCAD=openscad
OPENSCAD_OPTIONS_STL=--enable sort-stl -D VERBOSE=false
OPENSCAD_OPTIONS_DXF=-D VERBOSE=false
STL=./stl
DXF=./dxf
MODELS=$(shell bash ./parseVars.sh MODEL)
LASER=$(shell bash ./parseVars.sh LASER)
all: directories models
directories:
mkdir -p $(STL) $(DXF)
models: directories $(MODELS) $(LASER)
clean:
rm -f $(STL)/$(PREFIX)_*
cleanall:
rm -rf $(STL)
# Dependencies for models
$(MODELS) : $(STL)/$(PREFIX)_%.stl : $(PREFIX).scad
$(OPENSCAD) $(OPENSCAD_OPTIONS_STL) -o $@ -D MODEL=\"$(subst $(PREFIX)_,,$(subst .stl,,$(@F)))\" $<
$(LASER) : $(DXF)/$(PREFIX)_%.dxf : $(PREFIX).scad
$(OPENSCAD) $(OPENSCAD_OPTIONS_DXF) -o $@ -D LASER=\"$(subst $(PREFIX)_,,$(subst .dxf,,$(@F)))\" $<

View File

@ -124,14 +124,4 @@ module reference_projector_shaft () {
cube([60, 60, 3], center = true);
bearing_laser(hole=false);
}
}
difference() {
union () {
//reference_projector_shaft();
translate([0, 0, 17.5]) color("red")rotate([180, 0, 0]) motor_key_bottom();
}
//translate([30, 0, 0]) cube([60, 60, 60], center = true);
}
//translate([0, 0, 7]) motor_key_120();
}

View File

@ -30,7 +30,7 @@ module intval_panel_laser () {
difference () {
translate ([0, 0, 8.5]) {
union () {
translate([12 - 10, , 0]) {
translate([12 - 10, 0]) {
rotate([0, 0, -13]) {
rounded_cube([panel_2_x + 20 + 20, panel_2_y, 25.4/8], d = 20, center = true);
}
@ -136,6 +136,22 @@ module bolex_pin_laser (x, y) {
}
}
module bolex_pin_laser_alt (x, y) {
in = innerD;
$fn = 120;
translate ([x, y, 1]) {
difference () {
union () {
translate([0, 0, (height / 2) + 1.5]) cylinder(r = (outerD + 1.5) / 2, h = 2, center = true);
translate([0, 0, 1.175/2]) cylinder(r = outerD / 2, h = height + 1.175 - 1 , center = true);
}
cylinder(r = in / 2, h = height * 2, center = true);
translate([0, 0, (height / 2) - 1.9]) cylinder(r1 =4.5 / 2, r2 = 6.7 / 2, h = 2, center = true);
translate([0, 0, (height / 2) + 1]) cylinder(r = 6.7 / 2, h = 4, center = true);
}
}
}
module intval_laser_standoffs () {
$fn = 40;
for (i = [0 : len(xArray) - 1]) {
@ -143,6 +159,13 @@ module intval_laser_standoffs () {
}
}
module intval_laser_standoffs_alt () {
$fn = 40;
for (i = [0 : len(xArray) - 1]) {
bolex_pin_laser_alt(xArray[i], yArray[i]);
}
}
module intval_laser_standoffs_plate () {
$fn = 40;
rotate ([0, 180, 0]) {
@ -155,6 +178,18 @@ module intval_laser_standoffs_plate () {
//translate([7, 7, 0]) decoys(23, 5.5, 6);
}
module intval_laser_standoffs_plate_alt () {
$fn = 40;
rotate ([0, 180, 0]) {
bolex_pin_laser_alt(0, 0);
bolex_pin_laser_alt(15, 0);
bolex_pin_laser_alt(0, 15);
bolex_pin_laser_alt(15, 15);
}
//decoys
//translate([7, 7, 0]) decoys(23, 5.5, 6);
}
module bolex_pin_inner_laser (x, y) {
$fn = 40;
//innerD = 6.75;
@ -285,6 +320,7 @@ module intval_laser_panel_cover (LASER = false, DEBUG = false, ALL_RED = false)
}
}
//DEP
module intval_laser_panel_cover_standoff (DECOYS = false) {
tight = 0.2;
cover_h = 21;

View File

@ -1,6 +1,8 @@
include <./case.scad>
include <./mount.scad>
include <./plunger.scad>
//include <./anyeye_revere.scad>
/*
INTVAL 3
@ -32,29 +34,49 @@ module exploded_view () {
translate([0, 0, 20]) motor_key_120();
translate([one_to_one_x, one_to_one_y, 50]) geared_motor_mount_120();
translate([one_to_one_x, one_to_one_y, 50]) motor_cap_120(false);
translate([0, 0, 60]) intval_laser_panel_cover(false, ALL_RED=true);
//translate([0, 0, 60]) intval_laser_panel_cover(false, ALL_RED=true);
translate([0, 0, -10]) intval_laser_standoffs_alt();
}
//exploded_view();
MODEL = "stl_plate";
if (MODEL == "stl_plate") {
stl_plate();
} else if (MODEL == "plunger_plate") {
plunger_plate();
} else if (MODEL == "standoffs_plate") {
intval_laser_standoffs_plate();
} else if (MODEL == "standoff") {
bolex_pin_laser(0, 0);
} else if (MODEL == "electronics_mount") {
intval_electronics_mount();
} else if (MODEL == "motor_mount_bottom") {
motor_mount_bottom();
} else if (MODEL == "motor_mount_120") {
geared_motor_mount_120();
} else if (MODEL == "motor_key_120") {
motor_key_120();
} else if (MODEL == "motor_key_120_reinforced") {
motor_key_120_reinforced();
} else if (MODEL == "motor_key_120_reinforced_roller") {
motor_key_120_reinforced_roller();
}
//rotate([0, 180, 0]) key_cap();
//bolex_pin_laser(0, 0);
//intval_laser_standoffs_plate();
//intval_electronics_mount("METRO");
//motor_mount_bottom();
//projection () intval_panel_laser();
//intval_laser_panel_cover(true, ALL_RED=true);
//rotate([0, 0, 13]) intval_panel_laser();
//rotate([0, 0, 13]) intval_laser_panel_cover();
rotate([0, 180, 0]) key_cap();
//geared_motor_mount_120();
//motor_key();
//motor_key_120();
//plunger_plate();
//plunger();
//rotate([0, 180, 0]) plunger_top();
//plunger_top();
//motor_cap(false);
//rotate([0, 180, 0]) motor_cap_120(false);
//translate([0, 0, 39 / 2 + 5.75]) bolt_guide();
//intval_laser_standoffs_alt();
//intval_laser_standoffs_plate_alt();
//exploded_view();
//stl_plate();
//dxf_plate();
LASER = "dxf_plate";
if (LASER == "laser_plate") {
dxf_plate();
} else if (LASER == "panel") {
intval_panel_laser();
} else if (LASER == "panel_cover") {
intval_laser_panel_cover(true, ALL_RED=true);
}

View File

@ -58,15 +58,43 @@ module motor_key_120 (half = false, DECOYS = false, sides = 1, ALT = false) {
}
}
// translate([one_to_one_x, one_to_one_y, 17]) translate([6.42 - .2, 0, 6 - 1.7]) rotate([0, 90, 0]) motor_set_screw_120_alt();
if (DECOYS) {
translate([one_to_one_x, one_to_one_y, 20.5]) decoys(24);
}
}
module motor_key_120_reinforced () {
motor_key_120();
intersection () {
motor_key_120();
translate([one_to_one_x, one_to_one_y, 4]) union () {
cylinder(r = 16 / 2, h = 25, center = true);
translate([0, 0, 10]) cube([20, 12, 5], center = true);
translate([0, 0, 10]) cube([12, 20, 5], center = true);
translate([-(12 / 2) - (4 / 2), -(12 / 2) - (4 / 2), 10]) difference () {
cube([4, 4, 5], center = true);
rotate([0, 0, -45]) translate([0, -4, 0]) cube([8, 8, 5 + 1], center = true);
}
}
}
}
module motor_key_120_reinforced_roller () {
difference () {
motor_key_120();
translate([one_to_one_x, one_to_one_y, 4]) union () {
cylinder(r = 16 / 2, h = 25, center = true);
translate([0, 0, 10]) cube([20.2, 12.2, 5.1], center = true);
translate([0, 0, 10]) cube([12.2, 20.2, 5.1], center = true);
translate([-(12 / 2) - (4 / 2), -(12 / 2) - (4 / 2), 10]) difference () {
cube([4, 4, 5], center = true);
rotate([0, 0, -45]) translate([0, -4.2, 0]) cube([8, 8, 5 + 1], center = true);
}
hobbled_rod_120(40);
//nut
translate([5, 0, 0]) cube([2.5 + .5, 5.25 + .5, 42], center = true);
//half
//translate([0, 50, 0]) cube([100, 100, 100], center = true);
}
}
}
module motor_key_120_master_mold () {
@ -86,17 +114,25 @@ module motor_set_screw_120 () {
module motor_set_screw_120_alt () {
$fn = 60;
cylinder(r = 2.95 / 2, h = 10.19, center= true);
D1 = 2.95;
H1 = 10.19;
cylinder(r = D1 / 2, h = H1, center= true);
translate([0.25, 0, 0]) scale([1, .75, 1]) rotate([0, 0, 45]) difference () {
cube([D1, D1, H1], center = true);
rotate([0, 0, 45]) translate([0, D1, 0]) cube([D1 * 2, D1 * 2, H1], center = true);
}
translate([0, 0, (10.19 / 2) - (2.56 / 2)]) cylinder(r = 5.8 / 2, h = 2.56, center = true);
}
module hobbled_rod_120 (h = 10) {
d = 4.00;
diff = 3.33;
d = 4.00;
diff = 3.33;
difference () {
cylinder(r = d/2, h = h, center = true, $fn = 60);
translate([d/2 + ((d/2) - (d - diff)), 0, 0]) cube([d, d, h + 1], center = true);
union () {
cylinder(r = d/2, h = h, center = true, $fn = 60);
translate([0, 0, -h / 2 - (d / 4) + .01]) cylinder(r2 = d / 2, r1 = 0.4 / 2, h = d / 2, center = true, $fn = 60);
}
translate([d/2 + ((d/2) - (d - diff)), 0, 0]) cube([d, d, h + 10], center = true);
}
}
@ -169,8 +205,8 @@ module motor_mount_bottom () {
translate([2.5, 19.5, 0]) cylinder(r=10/2, h = 60, center=true); // hole for panel bolt
translate([22.5, 19.5, 0]) cube([40, 40, 60], center = true); //remove front entirely
translate([-6.5, 0, 7.5]) {
translate([0, screw_distance/2, 0]) sphere(r=screw_d, center = true);
translate([0, -screw_distance/2, 0]) sphere(r=screw_d, center = true);
translate([0, screw_distance/2, 0]) sphere(r=screw_d);
translate([0, -screw_distance/2, 0]) sphere(r=screw_d);
}
}
translate ([-one_to_one_x, -one_to_one_y, 0]) bolt_holder([mm_x[0], mm_y[0], -shelf_h / 2], mm_r[0], height - shelf_h, mm_l[0], tight = 0.2); //Bottom bolt holder
@ -219,14 +255,8 @@ module motor_mount_bottom () {
microswitch_holder();
bolt_holder([mm_x[2], mm_y[2], ((height - shelf_h)/ 2) + 3.75], 0, height - shelf_h - 4, 6); //bottom left mount
bolt_holder([mm_x[3], mm_y[3], ((height - shelf_h)/ 2) + 3.75], 180, height - shelf_h - 4, 6); //bottom right mount
if (DECOYS) {
difference () {
translate([35, 0 , 0]) decoys(44, 8, 6);
}
translate([0, 0, 8]) cube([4, 4, 4], center = true);
translate([40, 55, 8]) cube([4, 4, 4], center = true);
}
}
module bolt_holder (position = [0, 0, 0], rotate_z = 0, h = 17, length = 4.5, hole = true, tight = 0) {
bolt_r = 6;

17
hardware/parseVars.sh Normal file
View File

@ -0,0 +1,17 @@
#!/bin/bash
STOPWORD="${1}"
FILE=$(mktemp)
TMPFILE=$(mktemp)
cat intval3.scad | grep -e "${STOPWORD} ==" | awk -F'== "' '{print $2}' | awk -F'"' '{print $1}' > ${TMPFILE}
if [[ "${STOPWORD}" == "MODEL" ]]; then
cat ${TMPFILE} | sed 's/^/.\/stl\/intval3_/' | sed 's/$/.stl/' > ${FILE}
elif [[ "${STOPWORD}" == "LASER" ]]; then
cat ${TMPFILE} | sed 's/^/.\/dxf\/intval3_/' | sed 's/$/.dxf/' > ${FILE}
fi
rm -f ${TMPFILE}
cat ${FILE} | tr '\n' ' '
rm -f ${FILE}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

235
hardware/svg/intval3.svg Normal file
View File

@ -0,0 +1,235 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="322mm" height="212mm" viewBox="-120 -106 322 212" xmlns="http://www.w3.org/2000/svg" version="1.1">
<title>OpenSCAD Model</title>
<path d="
M 6.9913,-62.7736 L 32.4913,-62.7736 L 32.4913,-102.124 L 6.9913,-102.124 L 6.9913,-105.124 L -23.5087,-105.124
L -23.5087,-102.124 L -53.4212,-102.124 L -53.4212,-91.0486 L -56.5087,-91.0486 L -56.5087,-73.8486 L -53.4212,-73.8486
L -53.4212,-62.7736 L -23.5087,-62.7736 L -23.5087,-59.7736 L 6.9913,-59.7736 z
M 193.513,54.427 L 195.039,54.0607 L 196.489,53.4601 L 197.827,52.6403 L 199.02,51.6212 L 200.039,50.4279
L 200.859,49.09 L 201.459,47.6403 L 201.826,46.1144 L 201.949,44.5501 L 201.949,39.8269 L 181.697,-55.4499
L 61.9487,-55.4499 L 60.3844,-55.3268 L 58.8586,-54.9605 L 57.4088,-54.36 L 56.0709,-53.5401 L 54.8777,-52.521
L 53.8586,-51.3277 L 53.0387,-49.9898 L 52.4382,-48.5401 L 52.0719,-47.0142 L 51.9487,-45.4499 L 51.9487,44.5501
L 52.0719,46.1144 L 52.4382,47.6403 L 53.0387,49.09 L 53.8586,50.4279 L 54.8777,51.6212 L 56.0709,52.6402
L 57.4088,53.4601 L 58.8586,54.0607 L 60.3844,54.427 L 61.9487,54.5501 L 191.949,54.5501 z
M 58.1284,-50.0199 L 61.3035,-50.0199 L 61.3035,-28.2699 L 58.1284,-28.2699 z
M 90.9261,-46.6065 L 90.9261,-49.7815 L 121.426,-49.7815 L 121.426,-46.6065 z
M 154.005,-44.2332 L 153.61,-44.2992 L 153.231,-44.4262 L 152.876,-44.611 L 152.554,-44.849 L 152.274,-45.1344
L 152.042,-45.4602 L 151.863,-45.8183 L 151.743,-46.1999 L 151.684,-46.5956 L 151.687,-46.9958 L 151.753,-47.3904
L 151.88,-47.7699 L 152.065,-48.1248 L 152.303,-48.4465 L 152.588,-48.7269 L 152.914,-48.9593 L 153.272,-49.1378
L 153.654,-49.2581 L 154.049,-49.3173 L 154.45,-49.3138 L 154.844,-49.2478 L 155.224,-49.1208 L 155.579,-48.936
L 155.9,-48.698 L 156.181,-48.4126 L 156.413,-48.0869 L 156.592,-47.7287 L 156.712,-47.3471 L 156.771,-46.9514
L 156.768,-46.5513 L 156.702,-46.1566 L 156.575,-45.7771 L 156.39,-45.4222 L 156.152,-45.1006 L 155.866,-44.8201
L 155.541,-44.5877 L 155.183,-44.4092 L 154.801,-44.2889 L 154.405,-44.2297 z
M 173.173,-38.5448 L 172.477,-38.6613 L 171.807,-38.8854 L 171.181,-39.2114 L 170.613,-39.6315 L 170.118,-40.1351
L 169.708,-40.71 L 169.393,-41.3419 L 169.181,-42.0154 L 169.077,-42.7138 L 169.083,-43.4199 L 169.199,-44.1163
L 169.423,-44.786 L 169.749,-45.4123 L 170.169,-45.9799 L 170.673,-46.4749 L 171.248,-46.8849 L 171.88,-47.2
L 172.553,-47.4123 L 173.252,-47.5167 L 173.958,-47.5105 L 174.654,-47.394 L 175.324,-47.1699 L 175.95,-46.8439
L 176.518,-46.4239 L 177.013,-45.9202 L 177.423,-45.3453 L 177.738,-44.7134 L 177.95,-44.0399 L 178.055,-43.3416
L 178.048,-42.6355 L 177.932,-41.939 L 177.708,-41.2694 L 177.382,-40.643 L 176.962,-40.0754 L 176.458,-39.5805
L 175.883,-39.1704 L 175.251,-38.8553 L 174.578,-38.643 L 173.88,-38.5386 z
M 113.137,-31.8683 L 112.44,-31.9849 L 111.77,-32.2089 L 111.144,-32.535 L 110.576,-32.955 L 110.082,-33.4586
L 109.672,-34.0335 L 109.356,-34.6655 L 109.144,-35.3389 L 109.04,-36.0373 L 109.046,-36.7434 L 109.162,-37.4398
L 109.386,-38.1095 L 109.713,-38.7358 L 110.133,-39.3035 L 110.636,-39.7984 L 111.211,-40.2085 L 111.843,-40.5235
L 112.516,-40.7359 L 113.215,-40.8402 L 113.921,-40.8341 L 114.617,-40.7175 L 115.287,-40.4935 L 115.913,-40.1674
L 116.481,-39.7474 L 116.976,-39.2437 L 117.386,-38.6689 L 117.701,-38.0369 L 117.913,-37.3635 L 118.018,-36.6651
L 118.012,-35.959 L 117.895,-35.2625 L 117.671,-34.5929 L 117.345,-33.9666 L 116.925,-33.3989 L 116.421,-32.904
L 115.846,-32.4939 L 115.214,-32.1789 L 114.541,-31.9665 L 113.843,-31.8622 z
M 174.449,-13.0439 L 172.755,-13.3275 L 171.125,-13.8727 L 169.601,-14.6661 L 168.22,-15.6882 L 167.016,-16.9137
L 166.018,-18.3126 L 165.251,-19.8503 L 164.734,-21.489 L 164.48,-23.1884 L 164.495,-24.9066 L 164.779,-26.6013
L 165.324,-28.2308 L 166.118,-29.7549 L 167.14,-31.1361 L 168.365,-32.3404 L 169.764,-33.3382 L 171.302,-34.1049
L 172.941,-34.6216 L 174.64,-34.8756 L 176.358,-34.8606 L 178.053,-34.577 L 179.682,-34.0318 L 181.206,-33.2384
L 182.588,-32.2163 L 183.792,-30.9908 L 184.79,-29.5919 L 185.556,-28.0542 L 186.073,-26.4155 L 186.327,-24.7161
L 186.312,-22.9979 L 186.028,-21.3032 L 185.483,-19.6738 L 184.69,-18.1496 L 183.668,-16.7684 L 182.442,-15.5641
L 181.043,-14.5663 L 179.506,-13.7996 L 177.867,-13.2829 L 176.168,-13.0289 z
M 119.297,-6.38835 L 119.297,-31.3884 L 134.297,-31.3884 L 134.297,-6.38835 z
M 88.063,-25.6846 L 87.9286,-25.7059 L 87.7972,-25.7411 L 87.6701,-25.7899 L 87.5489,-25.8516 L 87.4348,-25.9258
L 87.329,-26.0114 L 87.2328,-26.1076 L 87.1472,-26.2134 L 87.0731,-26.3275 L 87.0113,-26.4487 L 86.9625,-26.5758
L 86.9273,-26.7072 L 86.906,-26.8416 L 86.8989,-26.9775 L 86.906,-27.1134 L 86.9273,-27.2478 L 86.9625,-27.3792
L 87.0113,-27.5062 L 87.0731,-27.6275 L 87.1472,-27.7416 L 87.2328,-27.8474 L 87.329,-27.9436 L 87.4348,-28.0292
L 87.5489,-28.1033 L 87.6701,-28.1651 L 87.7972,-28.2139 L 87.9286,-28.2491 L 88.063,-28.2704 L 88.1989,-28.2775
L 88.3348,-28.2704 L 88.4692,-28.2491 L 88.6006,-28.2139 L 88.7276,-28.1651 L 88.8489,-28.1033 L 88.963,-28.0292
L 89.0688,-27.9436 L 89.165,-27.8473 L 89.2506,-27.7416 L 89.3247,-27.6275 L 89.3865,-27.5062 L 89.4353,-27.3792
L 89.4705,-27.2478 L 89.4918,-27.1134 L 89.4989,-26.9775 L 89.4918,-26.8416 L 89.4705,-26.7072 L 89.4353,-26.5758
L 89.3865,-26.4487 L 89.3247,-26.3275 L 89.2506,-26.2133 L 89.165,-26.1076 L 89.0688,-26.0114 L 88.963,-25.9258
L 88.8489,-25.8516 L 88.7276,-25.7899 L 88.6006,-25.7411 L 88.4692,-25.7059 L 88.3348,-25.6846 L 88.1989,-25.6775
z
M 141.003,-22.7579 L 140.608,-22.8239 L 140.229,-22.9509 L 139.874,-23.1357 L 139.552,-23.3737 L 139.272,-23.6591
L 139.039,-23.9849 L 138.861,-24.343 L 138.74,-24.7246 L 138.681,-25.1203 L 138.685,-25.5204 L 138.751,-25.9151
L 138.878,-26.2946 L 139.062,-26.6495 L 139.3,-26.9712 L 139.586,-27.2516 L 139.912,-27.484 L 140.27,-27.6625
L 140.651,-27.7828 L 141.047,-27.842 L 141.447,-27.8385 L 141.842,-27.7725 L 142.221,-27.6455 L 142.576,-27.4607
L 142.898,-27.2227 L 143.178,-26.9373 L 143.411,-26.6115 L 143.589,-26.2534 L 143.71,-25.8718 L 143.769,-25.4761
L 143.765,-25.076 L 143.699,-24.6813 L 143.572,-24.3018 L 143.387,-23.9469 L 143.149,-23.6252 L 142.864,-23.3448
L 142.538,-23.1124 L 142.18,-22.9339 L 141.799,-22.8136 L 141.403,-22.7544 z
M 140.742,-8.32939 L 140.347,-8.39543 L 139.968,-8.5224 L 139.613,-8.70717 L 139.291,-8.94519 L 139.011,-9.23058
L 138.778,-9.55635 L 138.6,-9.91444 L 138.479,-10.2961 L 138.42,-10.6918 L 138.424,-11.0919 L 138.49,-11.4866
L 138.617,-11.8661 L 138.801,-12.221 L 139.039,-12.5426 L 139.325,-12.8231 L 139.651,-13.0555 L 140.009,-13.234
L 140.39,-13.3543 L 140.786,-13.4135 L 141.186,-13.41 L 141.581,-13.3439 L 141.96,-13.217 L 142.315,-13.0322
L 142.637,-12.7942 L 142.917,-12.5088 L 143.15,-12.183 L 143.328,-11.8249 L 143.449,-11.4433 L 143.508,-11.0476
L 143.504,-10.6474 L 143.438,-10.2528 L 143.311,-9.87334 L 143.127,-9.5184 L 142.888,-9.19673 L 142.603,-8.91628
L 142.277,-8.68391 L 141.919,-8.50537 L 141.538,-8.38506 L 141.142,-8.3259 z
M 58.1284,-8.26993 L 61.3035,-8.26993 L 61.3035,15.23 L 58.1284,15.2301 z
M 188.751,6.24445 L 188.356,6.17842 L 187.977,6.05145 L 187.622,5.86668 L 187.3,5.62866 L 187.019,5.34326
L 186.787,5.0175 L 186.609,4.65939 L 186.488,4.27779 L 186.429,3.88205 L 186.433,3.48192 L 186.499,3.08727
L 186.626,2.70779 L 186.81,2.35286 L 187.048,2.0312 L 187.334,1.75073 L 187.66,1.51839 L 188.018,1.33983
L 188.399,1.21951 L 188.795,1.16037 L 189.195,1.16386 L 189.59,1.2299 L 189.969,1.35687 L 190.324,1.54164
L 190.646,1.77965 L 190.926,2.06505 L 191.159,2.39082 L 191.337,2.74892 L 191.458,3.13054 L 191.517,3.52628
L 191.513,3.92639 L 191.447,4.32106 L 191.32,4.70052 L 191.135,5.05545 L 190.897,5.37711 L 190.612,5.65758
L 190.286,5.88994 L 189.928,6.06848 L 189.546,6.1888 L 189.151,6.24796 z
M 124.563,10.8154 L 124.429,10.7941 L 124.297,10.7589 L 124.17,10.7101 L 124.049,10.6483 L 123.935,10.5742
L 123.829,10.4886 L 123.733,10.3924 L 123.647,10.2866 L 123.573,10.1725 L 123.511,10.0513 L 123.463,9.92421
L 123.427,9.79279 L 123.406,9.65839 L 123.399,9.52249 L 123.406,9.38661 L 123.427,9.25221 L 123.463,9.12077
L 123.511,8.99373 L 123.573,8.8725 L 123.647,8.75838 L 123.733,8.65263 L 123.829,8.55641 L 123.935,8.47078
L 124.049,8.39667 L 124.17,8.33488 L 124.297,8.28612 L 124.429,8.2509 L 124.563,8.22961 L 124.699,8.2225
L 124.835,8.22961 L 124.969,8.2509 L 125.101,8.28612 L 125.228,8.33488 L 125.349,8.39667 L 125.463,8.47078
L 125.569,8.55641 L 125.665,8.65263 L 125.751,8.75838 L 125.825,8.8725 L 125.887,8.99374 L 125.935,9.12076
L 125.97,9.25221 L 125.992,9.38661 L 125.999,9.52249 L 125.992,9.65837 L 125.97,9.79279 L 125.935,9.92421
L 125.886,10.0513 L 125.825,10.1725 L 125.751,10.2866 L 125.665,10.3924 L 125.569,10.4886 L 125.463,10.5742
L 125.349,10.6483 L 125.228,10.7101 L 125.101,10.7589 L 124.969,10.7941 L 124.835,10.8154 L 124.699,10.8225
z
M 88.063,10.8154 L 87.9286,10.7941 L 87.7972,10.7589 L 87.6701,10.7101 L 87.5489,10.6483 L 87.4348,10.5742
L 87.329,10.4886 L 87.2328,10.3924 L 87.1472,10.2866 L 87.073,10.1725 L 87.0113,10.0513 L 86.9625,9.92421
L 86.9273,9.79279 L 86.906,9.65839 L 86.8989,9.52249 L 86.906,9.38661 L 86.9273,9.25221 L 86.9625,9.12077
L 87.0113,8.99374 L 87.073,8.87248 L 87.1472,8.75838 L 87.2328,8.65263 L 87.329,8.55643 L 87.4348,8.47078
L 87.5489,8.39667 L 87.6701,8.3349 L 87.7972,8.28613 L 87.9286,8.25092 L 88.063,8.22963 L 88.1989,8.2225
L 88.3348,8.22963 L 88.4692,8.25092 L 88.6006,8.28615 L 88.7276,8.3349 L 88.8489,8.39667 L 88.963,8.47076
L 89.0687,8.55641 L 89.165,8.65262 L 89.2506,8.75836 L 89.3247,8.8725 L 89.3865,8.99373 L 89.4353,9.12077
L 89.4705,9.2522 L 89.4918,9.3866 L 89.4989,9.52249 L 89.4918,9.65839 L 89.4705,9.79277 L 89.4353,9.92421
L 89.3865,10.0513 L 89.3247,10.1725 L 89.2506,10.2866 L 89.165,10.3924 L 89.0688,10.4886 L 88.963,10.5742
L 88.8489,10.6483 L 88.7276,10.7101 L 88.6006,10.7589 L 88.4692,10.7941 L 88.3348,10.8154 L 88.1989,10.8225
z
M 175.298,19.1002 L 174.903,19.0341 L 174.524,18.9072 L 174.169,18.7224 L 173.847,18.4844 L 173.567,18.199
L 173.334,17.8732 L 173.156,17.5151 L 173.035,17.1335 L 172.976,16.7378 L 172.98,16.3376 L 173.046,15.943
L 173.173,15.5635 L 173.357,15.2086 L 173.595,14.8869 L 173.881,14.6065 L 174.207,14.3741 L 174.565,14.1956
L 174.946,14.0753 L 175.342,14.0161 L 175.742,14.0196 L 176.137,14.0856 L 176.516,14.2126 L 176.871,14.3974
L 177.193,14.6354 L 177.473,14.9208 L 177.706,15.2466 L 177.884,15.6046 L 178.005,15.9863 L 178.064,16.382
L 178.06,16.7821 L 177.994,17.1768 L 177.867,17.5562 L 177.682,17.9112 L 177.444,18.2328 L 177.159,18.5133
L 176.833,18.7457 L 176.475,18.9242 L 176.094,19.0445 L 175.698,19.1037 z
M 124.894,20.9945 L 124.532,20.8099 L 124.244,20.5223 L 124.06,20.1599 L 123.996,19.7581 L 124.059,19.3564
L 124.244,18.994 L 124.532,18.7064 L 124.894,18.5218 L 125.296,18.4581 L 125.698,18.5218 L 126.06,18.7064
L 126.348,18.994 L 126.532,19.3564 L 126.596,19.7581 L 126.532,20.1599 L 126.348,20.5223 L 126.06,20.8099
L 125.698,20.9945 L 125.296,21.0582 z
M 66.8941,20.9945 L 66.5318,20.8099 L 66.2442,20.5223 L 66.0595,20.1599 L 65.9959,19.7581 L 66.0595,19.3564
L 66.2442,18.994 L 66.5318,18.7064 L 66.8941,18.5218 L 67.2959,18.4581 L 67.6976,18.5218 L 68.06,18.7064
L 68.3476,18.994 L 68.5322,19.3564 L 68.5959,19.7582 L 68.5322,20.1599 L 68.3476,20.5223 L 68.06,20.8099
L 67.6976,20.9945 L 67.2959,21.0582 z
M 136.81,27.9857 L 136.415,27.9197 L 136.036,27.7927 L 135.681,27.608 L 135.359,27.37 L 135.079,27.0846
L 134.847,26.7588 L 134.668,26.4007 L 134.548,26.0191 L 134.489,25.6233 L 134.492,25.2232 L 134.558,24.8286
L 134.685,24.4491 L 134.87,24.0942 L 135.108,23.7725 L 135.393,23.492 L 135.719,23.2597 L 136.077,23.0811
L 136.459,22.9608 L 136.854,22.9017 L 137.255,22.9052 L 137.649,22.9712 L 138.029,23.0982 L 138.384,23.2829
L 138.705,23.521 L 138.986,23.8064 L 139.218,24.1321 L 139.397,24.4902 L 139.517,24.8718 L 139.576,25.2676
L 139.573,25.6677 L 139.507,26.0624 L 139.38,26.4418 L 139.195,26.7968 L 138.957,27.1184 L 138.671,27.3989
L 138.346,27.6312 L 137.988,27.8098 L 137.606,27.9301 L 137.21,27.9892 z
M 142.926,49.3154 L 141.611,49.0952 L 140.346,48.672 L 139.163,48.0561 L 138.091,47.2627 L 137.156,46.3114
L 136.381,45.2255 L 135.786,44.0319 L 135.385,42.7598 L 135.188,41.4406 L 135.2,40.1069 L 135.42,38.7914
L 135.843,37.5265 L 136.459,36.3434 L 137.252,35.2712 L 138.203,34.3363 L 139.289,33.5618 L 140.483,32.9666
L 141.755,32.5656 L 159.294,28.5164 L 160.613,28.3193 L 161.947,28.3309 L 163.262,28.5511 L 164.527,28.9743
L 165.71,29.5902 L 166.782,30.3836 L 167.717,31.3349 L 168.492,32.4208 L 169.087,33.6144 L 169.488,34.8865
L 169.685,36.2057 L 169.673,37.5394 L 169.453,38.8549 L 169.03,40.1198 L 168.414,41.3029 L 167.621,42.3751
L 166.67,43.31 L 165.584,44.0845 L 164.39,44.6797 L 163.118,45.0807 L 145.579,49.1299 L 144.26,49.327
z
M 106.698,42.4858 L 106.001,42.3692 L 105.331,42.1452 L 104.705,41.8191 L 104.137,41.3991 L 103.643,40.8955
L 103.232,40.3206 L 102.917,39.6887 L 102.705,39.0152 L 102.601,38.3168 L 102.607,37.6107 L 102.723,36.9143
L 102.947,36.2446 L 103.274,35.6183 L 103.694,35.0507 L 104.197,34.5557 L 104.772,34.1457 L 105.404,33.8306
L 106.077,33.6183 L 106.776,33.5139 L 107.482,33.5201 L 108.178,33.6366 L 108.848,33.8607 L 109.474,34.1867
L 110.042,34.6067 L 110.537,35.1104 L 110.947,35.6853 L 111.262,36.3172 L 111.474,36.9906 L 111.579,37.689
L 111.573,38.3951 L 111.456,39.0916 L 111.232,39.7612 L 110.906,40.3876 L 110.486,40.9552 L 109.982,41.4501
L 109.407,41.8602 L 108.775,42.1753 L 108.102,42.3876 L 107.404,42.492 z
M 190.795,46.6753 L 190.099,46.5587 L 189.429,46.3347 L 188.803,46.0086 L 188.235,45.5886 L 187.74,45.0849
L 187.33,44.5101 L 187.015,43.8781 L 186.803,43.2047 L 186.699,42.5063 L 186.705,41.8002 L 186.821,41.1037
L 187.045,40.4341 L 187.371,39.8078 L 187.791,39.2401 L 188.295,38.7452 L 188.87,38.3352 L 189.502,38.0201
L 190.175,37.8077 L 190.874,37.7034 L 191.58,37.7095 L 192.276,37.8261 L 192.946,38.0501 L 193.572,38.3762
L 194.14,38.7962 L 194.635,39.2999 L 195.045,39.8747 L 195.36,40.5067 L 195.572,41.1801 L 195.677,41.8785
L 195.67,42.5846 L 195.554,43.2811 L 195.33,43.9507 L 195.004,44.577 L 194.584,45.1447 L 194.08,45.6396
L 193.505,46.0497 L 192.873,46.3647 L 192.2,46.5771 L 191.501,46.6814 z
M 124.894,43.9945 L 124.532,43.8099 L 124.244,43.5223 L 124.06,43.1599 L 123.996,42.7582 L 124.059,42.3564
L 124.244,41.994 L 124.532,41.7064 L 124.894,41.5218 L 125.296,41.4581 L 125.698,41.5218 L 126.06,41.7064
L 126.348,41.994 L 126.532,42.3564 L 126.596,42.7582 L 126.532,43.1599 L 126.348,43.5223 L 126.06,43.8099
L 125.698,43.9945 L 125.296,44.0582 z
M 66.8941,43.9945 L 66.5318,43.8099 L 66.2442,43.5223 L 66.0595,43.1599 L 65.9959,42.7582 L 66.0595,42.3564
L 66.2441,41.994 L 66.5318,41.7064 L 66.8941,41.5218 L 67.2959,41.4582 L 67.6976,41.5218 L 68.06,41.7064
L 68.3476,41.994 L 68.5322,42.3564 L 68.5959,42.7581 L 68.5322,43.1599 L 68.3476,43.5223 L 68.06,43.8099
L 67.6976,43.9945 L 67.2959,44.0582 z
M 128.687,50.3831 L 128.687,47.2081 L 136.187,47.2081 L 136.187,50.3831 z
M 74.6866,50.3831 L 74.6867,47.2081 L 93.6867,47.2081 L 93.6867,50.3831 z
M 41.0453,54.9452 L 42.0791,54.7815 L 43.0901,54.5106 L 44.0674,54.1355 L 45,53.6602 L 45.8778,53.0902
L 46.6913,52.4314 L 47.4314,51.6913 L 48.0901,50.8778 L 48.6602,50 L 49.1354,49.0674 L 49.5106,48.0902
L 49.7814,47.0791 L 49.9452,46.0453 L 50,45 L 50,6.34322 L 49.4658,6.38057 L 46.3275,6.27098
L 43.2179,5.83395 L 40.171,5.07428 L 37.2203,4.00029 L 34.3979,2.62373 L 31.7349,0.959702 L 29.2604,-0.973557
L 27.0016,-3.15489 L 24.9831,-5.56039 L 23.2272,-8.16368 L 21.753,-10.9363 L 20.5766,-13.8478 L 19.7111,-16.8663
L 19.6989,-16.9357 L 19.5417,-16.8722 L 18.7367,-16.6414 L 17.9121,-16.4959 L 17.0767,-16.4375 L 16.2399,-16.4668
L 15.4106,-16.5833 L 14.5981,-16.7859 L 13.8113,-17.0723 L 13.0586,-17.4394 L 12.3485,-17.8831 L 11.6886,-18.3986
L 11.0863,-18.9803 L 10.548,-19.6218 L 10.0798,-20.316 L 9.68663,-21.0554 L 9.37296,-21.8318 L 9.14215,-22.6367
L 8.99673,-23.4614 L 8.93832,-24.2967 L 8.96754,-25.1335 L 9.08409,-25.9628 L 9.28667,-26.7753 L 9.57307,-27.5621
L 9.94016,-28.3148 L 10.3839,-29.0249 L 10.8994,-29.6848 L 11.4811,-30.2871 L 12.1226,-30.8254 L 12.8168,-31.2936
L 13.5562,-31.6868 L 14.3326,-32.0005 L 15.1375,-32.2313 L 15.9622,-32.3767 L 16.7975,-32.4351 L 17.6344,-32.4059
L 18.4636,-32.2893 L 19.2761,-32.0867 L 20.063,-31.8003 L 20.1022,-31.7812 L 20.253,-32.386 L 21.327,-35.3368
L 22.7036,-38.1591 L 24.3676,-40.8221 L 26.3009,-43.2966 L 28.4822,-45.5555 L 28.9127,-45.9167 L 28.599,-46.5067
L 28.0109,-47.9624 L 27.5781,-49.4717 L 27.3055,-51.0179 L 27.1959,-52.5842 L 27.2507,-54.1533 L 27.3697,-55
L -60,-55 L -61.0453,-54.9452 L -62.0791,-54.7815 L -63.0901,-54.5106 L -64.0674,-54.1355 L -65,-53.6602
L -65.8779,-53.0902 L -66.6913,-52.4314 L -67.4314,-51.6913 L -68.0902,-50.8778 L -68.6602,-50 L -69.1354,-49.0674
L -69.5105,-48.0902 L -69.7815,-47.0791 L -69.9452,-46.0453 L -70,-45 L -70,45 L -69.9452,46.0453
L -69.7815,47.0791 L -69.5106,48.0902 L -69.1355,49.0674 L -68.6602,50 L -68.0901,50.8778 L -67.4314,51.6913
L -66.6913,52.4314 L -65.8778,53.0901 L -65,53.6602 L -64.0674,54.1354 L -63.0902,54.5105 L -62.0791,54.7815
L -61.0453,54.9452 L -60,55 L 40,55 z
M -34.0739,-46.6065 L -34.0739,-49.7815 L -3.57385,-49.7815 L -3.57385,-46.6065 z
M -66.8715,-40.2699 L -63.6965,-40.2699 L -63.6965,-28.2699 L -66.8715,-28.2699 z
M -11.7763,-32.8645 L -12.1391,-32.9155 L -12.4945,-33.0041 L -12.8388,-33.1294 L -13.1681,-33.29 L -13.4787,-33.4842
L -13.7674,-33.7097 L -14.031,-33.9642 L -14.2665,-34.2448 L -14.4713,-34.5486 L -14.6433,-34.872 L -14.7805,-35.2117
L -14.8815,-35.5639 L -14.9451,-35.9247 L -14.9707,-36.2901 L -14.9579,-36.6562 L -14.9069,-37.019 L -14.8183,-37.3745
L -14.693,-37.7188 L -14.5324,-38.048 L -14.3383,-38.3587 L -14.1127,-38.6474 L -13.8582,-38.9109 L -13.5776,-39.1464
L -13.2739,-39.3513 L -12.9504,-39.5233 L -12.6107,-39.6605 L -12.2586,-39.7615 L -11.8978,-39.8251 L -11.5323,-39.8507
L -11.1662,-39.8379 L -10.8034,-39.7869 L -10.4479,-39.6983 L -10.1037,-39.573 L -9.7744,-39.4124 L -9.46371,-39.2182
L -9.17502,-38.9927 L -8.91151,-38.7382 L -8.67603,-38.4576 L -8.47116,-38.1538 L -8.29918,-37.8304 L -8.16193,-37.4907
L -8.06094,-37.1385 L -7.99733,-36.7777 L -7.97179,-36.4123 L -7.98457,-36.0462 L -8.03555,-35.6834 L -8.12418,-35.3279
L -8.24947,-34.9836 L -8.41006,-34.6544 L -8.6042,-34.3437 L -8.82976,-34.055 L -9.08424,-33.7915 L -9.36488,-33.556
L -9.66859,-33.3511 L -9.99208,-33.1791 L -10.3317,-33.0419 L -10.6839,-32.9409 L -11.0447,-32.8773 L -11.4101,-32.8517
z
M -66.8715,11.7301 L -66.8715,-8.26993 L -63.6965,-8.26993 L -63.6965,11.7301 z
M 9.64082,9.01192 L 9.42834,8.98204 L 9.22014,8.93013 L 9.01849,8.85675 L 8.82565,8.76268 L 8.64368,8.64897
L 8.47458,8.51686 L 8.32022,8.36781 L 8.1823,8.20343 L 8.0623,8.02554 L 7.96158,7.83607 L 7.8812,7.63713
L 7.82205,7.43086 L 7.78479,7.21954 L 7.76982,7.00549 L 7.7773,6.79103 L 7.80717,6.57855 L 7.85909,6.37035
L 7.93246,6.1687 L 8.02654,5.97586 L 8.14024,5.79388 L 8.27234,5.62479 L 8.4214,5.47043 L 8.58578,5.3325
L 8.76367,5.21251 L 8.95314,5.11179 L 9.15208,5.0314 L 9.35837,4.97226 L 9.56967,4.935 L 9.78372,4.92003
L 9.99818,4.92751 L 10.2107,4.95738 L 10.4189,5.00928 L 10.6205,5.08267 L 10.8134,5.17674 L 10.9953,5.29045
L 11.1644,5.42255 L 11.3188,5.57161 L 11.4567,5.73599 L 11.5767,5.91388 L 11.6774,6.10335 L 11.7578,6.30229
L 11.817,6.50856 L 11.8542,6.71988 L 11.8692,6.93393 L 11.8617,7.14838 L 11.8318,7.36087 L 11.7799,7.56908
L 11.7065,7.77071 L 11.6125,7.96356 L 11.4988,8.14554 L 11.3667,8.31464 L 11.2176,8.46898 L 11.0532,8.6069
L 10.8753,8.7269 L 10.6859,8.82764 L 10.4869,8.90802 L 10.2807,8.96716 L 10.0693,9.00443 L 9.85529,9.01939
z
M -66.8715,43.73 L -66.8715,31.73 L -63.6965,31.73 L -63.6965,43.73 z
M -38.3133,50.3831 L -38.3133,47.2081 L 1.18666,47.2081 L 1.18666,50.3831 z
M -77.3892,39.3829 L -84.0642,39.3829 L -84.0642,24.3829 L -77.3892,24.3829 L -77.3892,15.3829 L -74.3892,15.3829
L -74.3892,-8.11703 L -77.3892,-8.11703 L -77.3892,-28.1171 L -74.3892,-28.117 L -74.3892,-49.867 L -88.3142,-49.867
L -88.3142,-47.0295 L -105.814,-47.0295 L -105.814,-49.867 L -116.739,-49.867 L -116.739,-40.117 L -119.739,-40.117
L -119.739,-28.1171 L -116.739,-28.117 L -116.739,-8.11703 L -119.739,-8.11703 L -119.739,11.8829 L -116.739,11.8829
L -116.739,31.8829 L -119.739,31.8829 L -119.739,43.8829 L -116.739,43.8829 L -116.739,50.1329 L -105.814,50.1329
L -105.814,46.9954 L -88.3142,46.9954 L -88.3142,50.1329 L -77.3892,50.1329 z
M 21.0087,102.124 L 33.0087,102.124 L 33.0087,62.7736 L 11.0087,62.7736 L 11.0087,59.7736 L -28.4913,59.7736
L -28.4913,62.7736 L -54.4038,62.7736 L -54.4038,73.8986 L -57.4913,73.8986 L -57.4913,90.9986 L -54.4038,90.9986
L -54.4038,102.124 L -40.4913,102.124 L -40.4913,105.124 L -21.4913,105.124 L -21.4913,102.124 L -16.4913,102.124
L -16.4913,92.4486 L 13.5087,92.4486 L 13.5087,105.124 L 21.0087,105.124 z
M 20.8815,80.4157 L 20.2612,80.3175 L 19.6546,80.155 L 19.0682,79.9299 L 18.5087,79.6448 L 17.9819,79.3027
L 17.4939,78.9075 L 17.0498,78.4634 L 16.6546,77.9753 L 16.3125,77.4486 L 16.0274,76.889 L 15.8023,76.3027
L 15.6398,75.6961 L 15.5415,75.0758 L 15.5087,74.4486 L 15.5415,73.8214 L 15.6398,73.2011 L 15.8023,72.5945
L 16.0274,72.0082 L 16.3125,71.4486 L 16.6546,70.9219 L 17.0498,70.4338 L 17.4939,69.9897 L 17.9819,69.5945
L 18.5087,69.2525 L 19.0682,68.9673 L 19.6546,68.7423 L 20.2612,68.5797 L 20.8815,68.4815 L 21.5087,68.4486
L 22.1358,68.4815 L 22.7561,68.5797 L 23.3628,68.7423 L 23.9491,68.9673 L 24.5087,69.2525 L 25.0354,69.5945
L 25.5234,69.9897 L 25.9675,70.4338 L 26.3628,70.9219 L 26.7048,71.4486 L 26.9899,72.0082 L 27.215,72.5945
L 27.3775,73.2012 L 27.4758,73.8214 L 27.5087,74.4486 L 27.4758,75.0758 L 27.3775,75.6961 L 27.215,76.3027
L 26.9899,76.8891 L 26.7048,77.4486 L 26.3628,77.9753 L 25.9675,78.4634 L 25.5234,78.9075 L 25.0354,79.3027
L 24.5087,79.6448 L 23.9491,79.9299 L 23.3628,80.155 L 22.7561,80.3175 L 22.1358,80.4157 L 21.5087,80.4486
z
M 5.19507,75.4322 L 4.88493,75.3831 L 4.58162,75.3018 L 4.28847,75.1893 L 4.00868,75.0467 L 3.74532,74.8757
L 3.50128,74.6781 L 3.27924,74.456 L 3.08162,74.212 L 2.9106,73.9486 L 2.76804,73.6688 L 2.6555,73.3757
L 2.57423,73.0724 L 2.52512,72.7622 L 2.50868,72.4486 L 2.52512,72.135 L 2.57423,71.8249 L 2.6555,71.5216
L 2.76804,71.2284 L 2.9106,70.9486 L 3.08162,70.6853 L 3.27924,70.4412 L 3.50128,70.2192 L 3.74532,70.0216
L 4.00868,69.8505 L 4.28847,69.708 L 4.58162,69.5954 L 4.88493,69.5142 L 5.19508,69.4651 L 5.50868,69.4486
L 5.82227,69.4651 L 6.13242,69.5142 L 6.43573,69.5954 L 6.72888,69.708 L 7.00868,69.8505 L 7.27203,70.0216
L 7.51607,70.2192 L 7.73811,70.4412 L 7.93573,70.6853 L 8.10675,70.9486 L 8.24931,71.2284 L 8.36185,71.5216
L 8.44312,71.8249 L 8.49223,72.135 L 8.50868,72.4486 L 8.49223,72.7622 L 8.44312,73.0724 L 8.36185,73.3757
L 8.24931,73.6688 L 8.10675,73.9486 L 7.93573,74.212 L 7.73811,74.456 L 7.51605,74.6781 L 7.27203,74.8757
L 7.00868,75.0467 L 6.72887,75.1893 L 6.43573,75.3018 L 6.13242,75.3831 L 5.82227,75.4322 L 5.50867,75.4486
z
" stroke="black" fill="lightgray" stroke-width="0.5"/>
</svg>

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -1,14 +1,14 @@
'use strict'
const restify = require('restify')
const log = require('./lib/log')('main')
const log = require('./lib/log/index.js')('main')
const { readFile } = require('fs-extra')
const { exec } = require('child_process')
const BLE = require('./lib/ble')
const Intval = require('./lib/intval')
const BLE = require('./lib/ble/index.js')
const Intval = require('./lib/intval/index.js')
const intval = new Intval()
const Sequence = require('./lib/sequence')
const Sequence = require('./lib/sequence/index.js')
const sequence = new Sequence(intval)
const PACKAGE = require('./package.json')

View File

@ -11,10 +11,10 @@ const fs_extra_1 = require("fs-extra");
const log = require('../log')('ble');
const wifi_1 = require("../wifi");
const wifi = new wifi_1.Wifi();
const DEVICE_NAME = process.env.DEVICE_NAME || 'intval3';
const SERVICE_ID = process.env.SERVICE_ID || 'intval3_ble';
const CHAR_ID = process.env.CHAR_ID || 'intval3char';
const WIFI_ID = process.env.WIFI_ID || 'wifichar';
const DEVICE_NAME = typeof process.env.DEVICE_NAME !== 'undefined' ? process.env.DEVICE_NAME : 'intval3';
const SERVICE_ID = typeof process.env.SERVICE_ID !== 'undefined' ? process.env.SERVICE_ID : 'intval3_ble';
const CHAR_ID = typeof process.env.CHAR_ID !== 'undefined' ? process.env.CHAR_ID : 'intval3char';
const WIFI_ID = typeof process.env.WIFI_ID !== 'undefined' ? process.env.WIFI_ID : 'wifichar';
const NETWORK = os_1.networkInterfaces(); //?type?
const MAC = getMac() || spoofMac();
//Give the device a unique device name, needs to be in env
@ -164,8 +164,8 @@ class BLE {
this.listeners = {};
log.info('Starting bluetooth service');
getState = bleGetState;
bleno_1.default.on('stateChange', state => {
log.info('stateChange', { state: state });
bleno_1.default.on('stateChange', (state) => {
log.info('stateChange', { state });
if (state === 'poweredOn') {
log.info('Starting advertising', { DEVICE_NAME, DEVICE_ID: process.env.BLENO_DEVICE_NAME });
bleno_1.default.startAdvertising(DEVICE_NAME, [CHAR_ID]);
@ -174,7 +174,7 @@ class BLE {
bleno_1.default.stopAdvertising();
}
});
bleno_1.default.on('advertisingStart', err => {
bleno_1.default.on('advertisingStart', (err) => {
log.info('advertisingStart', { res: (err ? 'error ' + err : 'success') });
createChars(this._onWrite.bind(this), this._onRead.bind(this));
if (!err) {
@ -186,11 +186,11 @@ class BLE {
]);
}
});
bleno_1.default.on('accept', clientAddress => {
log.info('accept', { clientAddress: clientAddress });
bleno_1.default.on('accept', (clientAddress) => {
log.info('accept', { clientAddress });
});
bleno_1.default.on('disconnect', clientAddress => {
log.info('disconnect', { clientAddress: clientAddress });
bleno_1.default.on('disconnect', (clientAddress) => {
log.info('disconnect', { clientAddress });
});
this._refreshWifi();
}

File diff suppressed because one or more lines are too long

View File

@ -270,7 +270,7 @@ class Intval {
if (!this._micro.primed) {
this._micro.primed = true;
this._micro.time = now;
log.info('Microswitch primed to stop motor');
//log.info('Microswitch primed to stop motor');
}
}
else if (val === 1 && this._state.frame.active) {

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
'use strict'
const winston = require('winston')
const { transports, format, createLogger } = require('winston')
/**
* createLog() - Returns a winston logger configured to service
@ -10,12 +10,19 @@ const winston = require('winston')
* @returns {object} Winston logger
*/
function createLog (label, filename = null) {
const transports = [ new (winston.transports.Console)({ label : label }) ]
const transportsArr = [ new (transports.Console)({ label : label }) ]
if (filename !== null) {
transports.push( new (winston.transports.File)({ label : label, filename : filename }) )
transportsArr.push( new (transports.File)({ label : label, filename : filename }) )
}
return new (winston.createLogger)({
transports: transports
return new (createLogger)({
format: format.combine(
format.label({ label : label || 'intval3' }),
format.timestamp({
format: 'YYYY-MM-DD HH:mm:ss'
}),
format.printf((info) => `${info.timestamp} [${info.label}] ${info.level}: ${info.message}`+(info.splat!==undefined?`${info.splat}`:" "))
),
transports: transportsArr
})
}

View File

@ -25,6 +25,7 @@ class Sequence {
this.active = false;
this.count = 0;
this.delay = 0;
this.intval._state.sequence = false;
log.info('_stop', { id: this.id, stopped: true });
};
this.intval = intval;

View File

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sequence/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;;;;;AAEZ,iDAA2B;AAC3B,MAAM,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC;AACrC,oCAAiC;AAEjC,MAAM,WAAW,GAAG,UAAU,CAAC;AAc/B,+BAA+B;AAC/B,MAAa,QAAQ;IAUpB;;;;QAII;IAEJ,YAAa,MAAY;QAbjB,WAAM,GAAa,KAAK,CAAA;QAExB,UAAK,GAAY,CAAC,CAAA;QAClB,UAAK,GAAY,CAAC,CAAA;QAwE1B;;YAEI;QACI,UAAK,GAAG;YACf,IAAI,CAAC,MAAM,G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AAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;aACvB;YAED,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;gBACjB,MAAK;aACL;SACD;QAED,IAAI,CAAC,KAAK,EAAE,CAAA;IACb,CAAC;IACD;;QAEI;IACG,IAAI;QACV,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;IACpB,CAAC;CAcD;AA1FD,4BA0FC;AAED,MAAM,CAAC,OAAO,GAAG,QAAQ,CAAA"}

77
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "intval3",
"version": "3.1.3",
"version": "3.1.4",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -43,11 +43,6 @@
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.0.tgz",
"integrity": "sha1-4mifjzVvrWLMplo6kcXfX5VRaS8="
},
"lodash": {
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
}
}
},
@ -514,14 +509,6 @@
"dev": true,
"requires": {
"lodash": "^4.17.14"
},
"dependencies": {
"lodash": {
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
"dev": true
}
}
},
"chalk": {
@ -1559,15 +1546,30 @@
"integrity": "sha512-d4sze1JNC454Wdo2fkuyzCr6aHcbL6PGGuFAz0Li/NcOm1tCHGnWDRmJP85dh9IhQErTc2svWFEX5xHIOo//kQ=="
},
"handlebars": {
"version": "4.4.3",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.4.3.tgz",
"integrity": "sha512-B0W4A2U1ww3q7VVthTKfh+epHx+q4mCt6iK+zEAzbMBpWQAwxCeKxEGpj/1oQTpzPXDNSOG7hmG14TsISH50yw==",
"version": "4.7.6",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz",
"integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==",
"dev": true,
"requires": {
"minimist": "^1.2.5",
"neo-async": "^2.6.0",
"optimist": "^0.6.1",
"source-map": "^0.6.1",
"uglify-js": "^3.1.4"
"uglify-js": "^3.1.4",
"wordwrap": "^1.0.0"
},
"dependencies": {
"minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"dev": true
},
"wordwrap": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
"integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=",
"dev": true
}
}
},
"har-schema": {
@ -2061,9 +2063,9 @@
}
},
"lodash": {
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
"version": "4.17.19",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ=="
},
"lodash.camelcase": {
"version": "4.3.0",
@ -2587,16 +2589,6 @@
"lodash.debounce": "^4.0.8"
}
},
"optimist": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
"integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=",
"dev": true,
"requires": {
"minimist": "~0.0.1",
"wordwrap": "~0.0.2"
}
},
"optionator": {
"version": "0.8.3",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
@ -3048,14 +3040,6 @@
"dev": true,
"requires": {
"lodash": "^4.17.14"
},
"dependencies": {
"lodash": {
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
"dev": true
}
}
},
"resolve": {
@ -3118,13 +3102,6 @@
"assert-plus": "^1.0.0",
"lodash": "^4.17.15",
"safe-json-stringify": "^1.0.4"
},
"dependencies": {
"lodash": {
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
}
}
},
"ret": {
@ -4072,12 +4049,6 @@
"integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
"dev": true
},
"wordwrap": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
"integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=",
"dev": true
},
"wordwrapjs": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-3.0.0.tgz",

View File

@ -1,6 +1,6 @@
{
"name": "intval3",
"version": "3.1.3",
"version": "3.1.4",
"description": "Intervalometer for the Bolex",
"main": "index.js",
"scripts": {
@ -11,7 +11,8 @@
"version": "",
"postversion": "git push && git push --tags",
"u": "npm run git -- -m \"update\"",
"git": "npm version patch --force"
"git": "npm version patch --force",
"pkg": "pkg . --output ./bin/intval3"
},
"repository": {
"type": "git",
@ -52,5 +53,23 @@
"pkg": "^4.4.0",
"qunit": "^2.9.3",
"typescript": "^3.6.4"
},
"bin": "index.js",
"pkg": {
"scripts": [
"./lib/ble/index.js",
"./lib/db/index.js",
"./lib/delay/index.js",
"./lib/intval/index.js",
"./lib/log/index.js",
"./lib/mscript/index.js",
"./lib/onoff/index.js",
"./lib/sequence/index.js",
"./lib/wifi/index.js"
],
"targets": [
"host"
],
"out-file": "./bin/intval3"
}
}

View File

@ -7,11 +7,13 @@ sudo apt install git ufw nginx jq -y
echo "Installing node.js dependencies.."
sudo apt install nodejs npm -y
sudo npm install -g n
sudo n lts
sudo n 9.9.0
sudo npm install -g npm@latest
sudo npm install -g pm2 node-gyp node-pre-gyp
echo "Installing bluetooth dependencies..."
sudo apt install bluetooth bluez libbluetooth-dev libudev-dev -y
sudo mkdir -p /root/state
echo "Finished installing intval3 dependencies"

View File

@ -8,7 +8,7 @@ sudo apt install git ufw nginx jq -y
echo "Installing node.js dependencies.."
sudo apt install nodejs npm -y
sudo npm install -g n
sudo n lts
sudo n 9.9.0
sudo npm install -g npm@latest
sudo npm install -g pm2 node-gyp node-pre-gyp
@ -39,6 +39,8 @@ sudo rm /etc/nginx/sites-enabled/default
sudo nginx -t
sudo service nginx restart
sudo mkdir -p /root/state
echo "Install node"
npm install

View File

@ -11,10 +11,10 @@ const log = require('../log')('ble')
import { Wifi } from '../wifi'
const wifi = new Wifi()
const DEVICE_NAME : string = process.env.DEVICE_NAME || 'intval3'
const SERVICE_ID : string = process.env.SERVICE_ID || 'intval3_ble'
const CHAR_ID : string = process.env.CHAR_ID || 'intval3char'
const WIFI_ID : string = process.env.WIFI_ID || 'wifichar'
const DEVICE_NAME : string = typeof process.env.DEVICE_NAME !== 'undefined' ? process.env.DEVICE_NAME : 'intval3'
const SERVICE_ID : string = typeof process.env.SERVICE_ID !== 'undefined' ? process.env.SERVICE_ID : 'intval3_ble'
const CHAR_ID : string = typeof process.env.CHAR_ID !== 'undefined' ? process.env.CHAR_ID : 'intval3char'
const WIFI_ID : string = typeof process.env.WIFI_ID !== 'undefined' ? process.env.WIFI_ID : 'wifichar'
const NETWORK : any = networkInterfaces() //?type?
const MAC : string = getMac() || spoofMac()
@ -198,8 +198,8 @@ class BLE {
getState = bleGetState
bleno.on('stateChange', state => {
log.info('stateChange', { state : state })
bleno.on('stateChange', (state : any ) => {
log.info('stateChange', { state })
if (state === 'poweredOn') {
log.info('Starting advertising', { DEVICE_NAME, DEVICE_ID : process.env.BLENO_DEVICE_NAME })
bleno.startAdvertising(DEVICE_NAME, [CHAR_ID])
@ -208,7 +208,7 @@ class BLE {
}
})
bleno.on('advertisingStart', err => {
bleno.on('advertisingStart', (err : Error) => {
log.info('advertisingStart', { res : (err ? 'error ' + err : 'success') })
createChars(this._onWrite.bind(this), this._onRead.bind(this))
if (!err) {
@ -221,12 +221,12 @@ class BLE {
}
})
bleno.on('accept', clientAddress => {
log.info('accept', { clientAddress : clientAddress })
bleno.on('accept', (clientAddress : any) => {
log.info('accept', { clientAddress })
})
bleno.on('disconnect', clientAddress => {
log.info('disconnect', { clientAddress : clientAddress })
bleno.on('disconnect', (clientAddress : any) => {
log.info('disconnect', { clientAddress })
})
this._refreshWifi()

1
src/globals.d.ts vendored Normal file
View File

@ -0,0 +1 @@
declare module 'bleno';

View File

@ -324,7 +324,7 @@ export default class Intval {
if (!this._micro.primed) {
this._micro.primed = true;
this._micro.time = now;
log.info('Microswitch primed to stop motor');
//log.info('Microswitch primed to stop motor');
}
} else if (val === 1 && this._state.frame.active) {
if (this._micro.primed && !this._micro.paused && (now - this._state.frame.start) > this._frame.open) {

View File

@ -105,6 +105,8 @@ export class Sequence {
this.count = 0
this.delay = 0
this.intval._state.sequence = false;
log.info('_stop', { id : this.id, stopped : true })
}
}