equal
deleted
inserted
replaced
39 |
39 |
40 listenDoorbell: function(doorbellOnCallback, doorbellOffCallback) { |
40 listenDoorbell: function(doorbellOnCallback, doorbellOffCallback) { |
41 this.pyshell.on('message', function (message) { |
41 this.pyshell.on('message', function (message) { |
42 console.log(message); |
42 console.log(message); |
43 switch(message) { |
43 switch(message) { |
44 case 'doorbell_on': |
44 case 'doorbell on': |
45 doorbellOnCallback(); |
45 doorbellOnCallback(); |
46 break; |
46 break; |
47 case 'doorbell_off': |
47 case 'doorbell off': |
48 doorbellOffCallback(); |
48 doorbellOffCallback(); |
49 break; |
49 break; |
50 } |
50 } |
51 }); |
51 }); |
52 } |
52 } |