From cd3f79a3a00b746dfd1142a0ba76144185b09bce Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Thu, 23 Nov 2017 09:29:44 -0500 Subject: [PATCH] Use an integer to track direction, boolean is not an sqlite3 datatype. --- lib/db/index.js | 2 +- lib/intval/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/db/index.js b/lib/db/index.js index 882af58..890bc10 100644 --- a/lib/db/index.js +++ b/lib/db/index.js @@ -14,7 +14,7 @@ class DB { createTable () { const query = `CREATE TABLE IF NOT EXISTS ${this._table} ( - dir BOOLEAN, + dir INTEGER, exposure INTEGER, start INTEGER, stop INTEGER, diff --git a/lib/intval/index.js b/lib/intval/index.js index d1d2fed..5cecdff 100644 --- a/lib/intval/index.js +++ b/lib/intval/index.js @@ -197,7 +197,7 @@ intval._stop = function () { entry.start = intval._state.frame.start entry.stop = now entry.len = len - entry.dir = intval._state.frame.current.dir + entry.dir = intval._state.frame.current.dir ? 1 : 0 entry.exposure = intval._state.frame.current.exposure entry.counter = intval._state.counter