Commit Graph

4 Commits

Author SHA1 Message Date
Rico Tiongson
602b148fb4 Move library to root 2019-02-12 19:04:31 +08:00
Rico Tiongson
b5c701994b
Move regex constants to swipe_gesture static class member (#44)
* Move regex constants to swipe_gesture static class member

* Unlink util/regex from library index
2019-02-07 22:01:03 +08:00
Rico Tiongson
b171fb2cdf Update test 2019-02-07 18:09:58 +08:00
Rico Tiongson
e3453c1bbb
Perform microoptimizations (#40)
* Remove unused device and stamp from swipe_impl

* Use constants for regex patterns

* Compile regex outside of buffer function to avoid runtime hiccup

* Optimize reading of config file

* Revert "Optimize reading of config file"

This reverts commit 88b85d3941.

* Improve tokenizing of config file

* Make sentence string static

* Improve README; change default threshold to 20.0

* Add a flag for gesture begin to ignore unneeded update/end

* Pre-compute for square of threshold and scale to lessen computation

* Compare fingers string with only one digit

* Use fgets_unlocked for faster input stream reading

* Don't buffer error stream

* Set some variables to static

* Catch dash symbol before event, remove trimming

* Use const char* for conf_filename

* Fix error in printing help

* Add some test scripts
2019-02-07 17:51:47 +08:00