File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,11 @@ function BigRedButton(index)
5555util . inherits ( BigRedButton , events . EventEmitter ) ;
5656
5757BigRedButton . prototype . askForStatus = function ( ) {
58- this . hid . write ( cmdStatus ) ;
58+ try {
59+ this . hid . write ( cmdStatus ) ;
60+ } catch ( e ) {
61+ this . close ( ) ;
62+ }
5963} ;
6064
6165BigRedButton . prototype . interpretData = function ( error , data ) {
@@ -98,3 +102,7 @@ BigRedButton.prototype.isLidDown = function() {
98102
99103exports . BigRedButton = BigRedButton ;
100104exports . deviceCount = function ( ) { return getAllDevices ( ) . length ; }
105+ exports . resetDevices = function ( ) {
106+ allDevices = null
107+ getAllDevices ( ) ;
108+ }
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " BigRedButtonNodeHID" ,
3+ "version" : " 1.0.0" ,
4+ "description" : " Big red button helper." ,
5+ "main" : " BigRedButton.js" ,
6+ "scripts" : {
7+ "test" : " echo \" Error: no test specified\" && exit 1"
8+ },
9+ "repository" : {
10+ "type" : " git" ,
11+ "url" :
" [email protected] :codepope/BigRedButtonNodeHID.git" 12+ },
13+ "keywords" : [
14+ " big" ,
15+ " red" ,
16+ " button" ,
17+ " helper" ,
18+ " io" ,
19+ " usb" ,
20+ " hid"
21+ ],
22+ "author" : " codepope" ,
23+ "license" : " MIT" ,
24+ "bugs" : {
25+ "url" : " https://github.com/codepope/BigRedButtonNodeHID/issues"
26+ },
27+ "homepage" : " https://github.com/codepope/BigRedButtonNodeHID"
28+ }
You can’t perform that action at this time.
0 commit comments