Document remaining functions in lib/intval

This commit is contained in:
mmcwilliams 2017-09-19 15:40:42 -04:00
parent aadf6aef37
commit bc077a24a1
2 changed files with 33 additions and 0 deletions

View File

@ -13,7 +13,9 @@ Class representing the intval3 features
* [._stop()](#Intval+_stop)
* [._watchMicro(err, val)](#Intval+_watchMicro)
* [._watchRelease(err, val)](#Intval+_watchRelease)
* [.setDir([dir])](#Intval+setDir)
* [.frame([dir], [time], [delay])](#Intval+frame)
* [.sequence()](#Intval+sequence)
<a name="Intval+_declarePins"></a>
@ -87,6 +89,19 @@ Button + 10K ohm resistor
| err | <code>object</code> | Error object present if problem reading pin |
| val | <code>integer</code> | Current value of the pin |
<a name="Intval+setDir"></a>
### intval.setDir([dir])
Set the default direction of the camera.
* forward = true
* backward = false
**Kind**: instance method of [<code>Intval</code>](#Intval)
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| [dir] | <code>boolean</code> | <code>true</code> | Direction of the camera |
<a name="Intval+frame"></a>
### intval.frame([dir], [time], [delay])
@ -100,3 +115,9 @@ Begin a single frame with set variables or defaults
| [time] | <code>integer</code> | <code>&quot;null&quot;</code> | (optional) Exposure time, 0 = minimum |
| [delay] | <code>integer</code> | <code>&quot;null&quot;</code> | (optional) Delay after frame before another can be started |
<a name="Intval+sequence"></a>
### intval.sequence()
Start a sequence of frames, using defaults or explicit instructions
**Kind**: instance method of [<code>Intval</code>](#Intval)

View File

@ -177,6 +177,14 @@ class Intval {
}
}
}
/**
* Set the default direction of the camera.
* * forward = true
* * backward = false
*
* @param {boolean} [dir=true] Direction of the camera
*
*/
setDir (val = true) {
if (typeof val !== 'boolean') {
return console.warn('Direction must be represented as either true or false')
@ -231,6 +239,10 @@ class Intval {
}
}
}
/**
* Start a sequence of frames, using defaults or explicit instructions
*
*/
sequence () {
console.log(`Started sequence`)
}