-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from WasabiFan/develop
Merge changes for release of v1.0
- Loading branch information
Showing
34 changed files
with
1,986 additions
and
558 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
language: node_js | ||
node_js: | ||
- "4.1" | ||
- "0.10" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"files": [ | ||
"extras.ts", | ||
"motors.ts", | ||
"sensors.ts", | ||
"index.ts" | ||
"src/extras.ts", | ||
"src/motors.ts", | ||
"src/sensors.ts", | ||
"src/index.ts" | ||
], | ||
"templateDir": "templates/" | ||
} |
Submodule docs
updated
41 files
Submodule ev3dev-lang
updated
23 files
+0 −13 | README.md | |
+28 −0 | README.rst | |
+0 −45 | autogen/README.md | |
+90 −0 | autogen/README.rst | |
+7 −7 | autogen/autogen.js | |
+8 −4 | autogen/config.js | |
+14 −0 | docs/_static/custom.css | |
+5 −0 | docs/_templates/page.html | |
+1 −0 | docs/autogen.rst | |
+945 −0 | docs/classes.rst | |
+305 −0 | docs/conf.py | |
+56 −0 | docs/constants.rst | |
+15 −0 | docs/index.rst | |
+339 −0 | docs/sensors.rst | |
+62 −0 | docs/spec.rst | |
+7 −0 | spec-autogen/autogen-config.json | |
+33 −0 | spec-autogen/main-spec-classes.liquid | |
+0 −0 | spec-autogen/md_generic-class-description.liquid | |
+0 −0 | spec-autogen/md_generic-property-table.liquid | |
+0 −0 | spec-autogen/md_led-color-methods.liquid | |
+37 −0 | spec-autogen/special-sensor-classes.liquid | |
+169 −102 | spec.json | |
+0 −494 | wrapper-specification.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
var ev3dev = require('../bin/index.js'); | ||
|
||
console.log('fading LEDs from green to red...'); | ||
|
||
for (var pct = 0; pct < 100; pct += 1) { | ||
var brightnessVal = (pct / 100); | ||
var invertedBrightnessVal = 1 - brightnessVal; | ||
|
||
ev3dev.Ev3Leds.left.setColor([ brightnessVal, invertedBrightnessVal ]); | ||
ev3dev.Ev3Leds.right.setColor([ brightnessVal, invertedBrightnessVal ]); | ||
|
||
if(pct % 10 == 0) | ||
console.log(pct + '%'); | ||
|
||
{ //Hack to sleep for time | ||
// SHOULD NOT BE USED IN PRODUCTION CODE | ||
var start = new Date().getTime(); | ||
while(new Date().getTime() < start + 100) { | ||
; | ||
} | ||
} | ||
} | ||
|
||
console.log('done'); | ||
|
||
ev3dev.Ev3Leds.left.allOff(); | ||
ev3dev.Ev3Leds.right.allOff(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
var ev3dev = require('../bin/index.js'); | ||
|
||
var greenANSI = "\033[42m"; | ||
var redANSI = "\033[41m"; | ||
var resetANSI = "\033[0m"; | ||
|
||
var touchSensor = new ev3dev.TouchSensor(); | ||
if (!touchSensor.connected) { | ||
console.error("No touch sensor could be found! Please verify that a touch sensor is plugged in and try again."); | ||
process.exit(1); | ||
} | ||
|
||
touchSensor.registerEventCallback(function(error, touchInfo) { | ||
if(error) throw error; | ||
console.log("Sensor is " + (touchInfo.lastPressed ? greenANSI + "PRESSED" : redANSI + "RELEASED") + resetANSI); | ||
}, | ||
function(userData) { | ||
var isPressed = touchSensor.isPressed; | ||
var changed = isPressed != userData.lastPressed; | ||
|
||
userData.lastPressed = isPressed; | ||
return changed; | ||
}, false, { lastPressed: false }); | ||
|
||
console.log("Press the touch sensor to trigger the press event."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.