Skip to content

Commit

Permalink
add support for node 14, drop support for node 6 (#76)
Browse files Browse the repository at this point in the history
* drop support for node 6

* update dependencies

* add support for node 14
  • Loading branch information
fivdi authored May 1, 2020
1 parent 5427c71 commit a5d918d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 38 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
language: node_js
node_js:
- "14"
- "12"
- "10"
- "8"
- "6"
before_script:
- npm install -g grunt-cli
env:
- CXX=g++-4.8
- CXX=g++-6
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
- g++-6
26 changes: 4 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[Johnny-Five](http://johnny-five.io) IO Plugin for the BeagleBone Black,
BeagleBone Green Wireless and PocketBeagle.

BeagleBone-IO supports Node.js versions 6, 8, 10 and 12.
BeagleBone-IO supports Node.js versions 8, 10, 12 and 14.

## Contents

Expand All @@ -20,28 +20,10 @@ BeagleBone-IO supports Node.js versions 6, 8, 10 and 12.

## News & Updates

### September-2019: BeagleBone-IO v4.0.1
### May-2020: BeagleBone-IO v4.1.0

* Support for Node.js v4 and v9 removed
* Support for Node.js 12 added

### April-2018: BeagleBone-IO v4.0.0

* Support for Node.js v0.10, v0.12, v5 and v7 removed
* Support for Node 10 added

### January-2018: BeagleBone-IO v3.0.0

BeagleBone-IO v3.0.0 released with the following features:

* Support for the [BeagleBone Green Wireless](http://wiki.seeed.cc/SeeedStudio_BeagleBone_Green_Wireless/)
* Support for Linux Kernel 4.11+
* Root privileges no longer required when running on Linux Kernel 4.11+

### November-2017: PocketBeagle Support

BeagleBone-IO v2.3.0 adds support for the
[PocketBeagle](https://beagleboard.org/pocket).
* Support for Node.js 6 removed
* Support for Node.js 14 added

## Installation

Expand Down
12 changes: 6 additions & 6 deletions lib/pwm-output.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function PwmOutput(pinData, period) {
matches = glob.sync(pwmChannelPattern);
if (matches.length === 0) {
// The pwm channel hasn't been exported yet, so export it.
fs.writeFileSync(pwmChipPath + '/export', channel, FS_OPTIONS);
fs.writeFileSync(pwmChipPath + '/export', '' + channel, FS_OPTIONS);
matches = glob.sync(pwmChannelPattern);
}

Expand All @@ -105,10 +105,10 @@ function PwmOutput(pinData, period) {
]);

this.period = period;
fs.writeFileSync(pwmChannelPath + '/period', period, FS_OPTIONS);
fs.writeFileSync(pwmChannelPath + '/period', '' + period, FS_OPTIONS);

this.enableFd = fs.openSync(pwmChannelPath + '/enable', 'r+');
fs.writeSync(this.enableFd, 1, FS_OPTIONS);
fs.writeSync(this.enableFd, '1', FS_OPTIONS);

this.dutyCycleFd = fs.openSync(pwmChannelPath + '/duty_cycle', 'r+');

Expand All @@ -124,13 +124,13 @@ PwmOutput.prototype.pwmWrite = function (dutyCycle) {
// issue.

if (dutyCycle < 10) {
fs.writeSync(this.enableFd, 0, FS_OPTIONS);
fs.writeSync(this.enableFd, '0', FS_OPTIONS);
}

fs.writeSync(this.dutyCycleFd, dutyCycle, FS_OPTIONS);
fs.writeSync(this.dutyCycleFd, '' + dutyCycle, FS_OPTIONS);

if (dutyCycle < 10) {
fs.writeSync(this.enableFd, 1, FS_OPTIONS);
fs.writeSync(this.enableFd, '1', FS_OPTIONS);
}
};

Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"url": "https://github.com/julianduque/beaglebone-io"
},
"engines": {
"node": ">=6.0.0"
"node": ">=8.0.0"
},
"keywords": [
"firmata",
Expand All @@ -25,17 +25,17 @@
},
"homepage": "https://github.com/julianduque/beaglebone-io",
"devDependencies": {
"grunt": "^1.0.4",
"grunt": "^1.1.0",
"grunt-contrib-jshint": "^2.1.0",
"grunt-contrib-nodeunit": "^2.0.0",
"grunt-contrib-nodeunit": "^2.1.0",
"grunt-contrib-watch": "^1.1.0",
"grunt-jsbeautifier": "^0.2.13",
"nodeunit": "^0.11.3",
"rewire": "^4.0.1",
"sinon": "^7.4.2"
"rewire": "^5.0.0",
"sinon": "^9.0.2"
},
"dependencies": {
"linux-io": "^1.0.4",
"glob": "^7.1.4"
"linux-io": "^1.1.0",
"glob": "^7.1.6"
}
}

0 comments on commit a5d918d

Please sign in to comment.