Expose the timeOut

Fixes #2.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
pull/389/head
Gergely Nagy 8 years ago
parent df28f6db57
commit cb732da530

@ -84,6 +84,16 @@ The plugin provides the `Leader` object, with the following methods:
> are final actions, where one does not wish to continue the leader sequence > are final actions, where one does not wish to continue the leader sequence
> further in the hopes of finding a longer match. > further in the hopes of finding a longer match.
### `.timeOut`
> The number of loop iterations to wait before a sequence times out. Once the
> sequence timed out, if there is a partial match with an action, that will be
> performed, otherwise the Leader sequence will simply reset.
>
> Not strictly a method, it is a variable one can assign a new value to.
>
> Defaults to 20.
## Further reading ## Further reading
Starting from the [example][plugin:example] is the recommended way of getting Starting from the [example][plugin:example] is the recommended way of getting

@ -42,6 +42,7 @@ namespace Akela {
static void configure (const dictionary_t dictionary[]); static void configure (const dictionary_t dictionary[]);
static void reset (void); static void reset (void);
static uint8_t timeOut;
void inject (Key key, uint8_t keyState); void inject (Key key, uint8_t keyState);
@ -49,7 +50,6 @@ namespace Akela {
static Key sequence[LEADER_MAX_SEQUENCE_LENGTH + 1]; static Key sequence[LEADER_MAX_SEQUENCE_LENGTH + 1];
static uint8_t sequencePos; static uint8_t sequencePos;
static uint8_t timer; static uint8_t timer;
static uint8_t timeOut;
static const Leader::dictionary_t *dictionary; static const Leader::dictionary_t *dictionary;
static Key eventHandlerHook (Key mappedKey, byte row, byte col, uint8_t keyState); static Key eventHandlerHook (Key mappedKey, byte row, byte col, uint8_t keyState);

Loading…
Cancel
Save