From 33d4c136bc9c314793cf6e2578cc1bdc2003ecae Mon Sep 17 00:00:00 2001 From: deurstann <tristan.derouet@gmail.com> Date: Tue, 2 Feb 2021 23:07:12 +0100 Subject: [PATCH] Added new commands for lkt --- common/lkt.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/common/lkt.js b/common/lkt.js index 8cb7da4..518e397 100644 --- a/common/lkt.js +++ b/common/lkt.js @@ -180,6 +180,9 @@ class LktClient { logger.info('Unknown play state' + status.state); } } + static commandPlayPos(position) { + return LktClient.__execSimple(`play ${position}`); + } static commandStop() { //return LktClient.idleActualisation(); return LktClient.__execSimple('stop'); @@ -197,13 +200,19 @@ class LktClient { return LktClient.__execSimple('clear'); } static commandMove(from, to) { - var request = 'move ' + from + ' ' + to; - logger.info(request); - return LktClient.__execSimple('move ' + from + ' ' + to); + logger.info("lkt", `move ${from} ${to}`) + return LktClient.__execSimple(`move ${from} ${to}`); } static commandQueueAddId(id) { - return LktClient.__execSimple(`add id ${id}`); + return LktClient.__execSimple(`add id://${id}`); + } + static commandQueueInsertId(id) { + return LktClient.__execSimple(`__insert id://${id}`); + } + static commandQueueDelPos(position) { + logger.info("lkt", `delete ${position}`) + return LktClient.__execSimple(`delete ${position}`); } static commandQueueDelId(id) { return LktClient.__execSimple(`deleteid ${id}`); -- GitLab