Push dev work to master #2
|
@ -0,0 +1,6 @@
|
||||||
|
<a name="Blootstrap"></a>
|
||||||
|
|
||||||
|
## Blootstrap
|
||||||
|
Class representing the bluetooth interface
|
||||||
|
|
||||||
|
**Kind**: global class
|
|
@ -6,6 +6,7 @@ function capitalize (s) {
|
||||||
return s[0].toUpperCase() + s.slice(1)
|
return s[0].toUpperCase() + s.slice(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Class representing the bluetooth interface */
|
||||||
class Blootstrap {
|
class Blootstrap {
|
||||||
constructor () {
|
constructor () {
|
||||||
this._onData = () => {}
|
this._onData = () => {}
|
||||||
|
@ -24,6 +25,13 @@ class Blootstrap {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Blootstrap.on() -
|
||||||
|
* Binds functions to events that are triggered by BLE messages
|
||||||
|
*
|
||||||
|
* @param {string} eventName Name of the event to to bind
|
||||||
|
* @param {function} callback Invoked when the event is triggered
|
||||||
|
*/
|
||||||
on (eventName, callback) {
|
on (eventName, callback) {
|
||||||
this[`_on${capitalize(eventName)}`] = callback
|
this[`_on${capitalize(eventName)}`] = callback
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
<a name="Intval"></a>
|
||||||
|
|
||||||
|
## Intval
|
||||||
|
Class representing the intval3 features
|
||||||
|
|
||||||
|
**Kind**: global class
|
Loading…
Reference in New Issue