From 9180bff0fb56d4f7170c62055976e6235125b287 Mon Sep 17 00:00:00 2001 From: Tristan Rowley Date: Sun, 16 Feb 2020 21:39:07 +0000 Subject: [PATCH] better automation speed control handling, remove debug output --- data_centre/plugin_collection.py | 6 +++++- plugins/WJSendPlugin.py | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/data_centre/plugin_collection.py b/data_centre/plugin_collection.py index dd43126..5d29c6c 100644 --- a/data_centre/plugin_collection.py +++ b/data_centre/plugin_collection.py @@ -48,7 +48,11 @@ class SequencePlugin(Plugin): ] def set_speed(self, speed): - self.speed = 2.0 * (2.0*(speed-0.5)) + #self.speed = 2.0 * (2.0*(speed-0.5)) + speed = 2.0*(speed-0.5) # adjust to range -1 to +1 + negative = speed<0.0 # remember negative state cos we'll lose it in next + self.speed = (speed * speed) * 2.0 + if negative: self.speed *= -1 print ("automation speed is now %s" % self.speed) """def position(self, now): diff --git a/plugins/WJSendPlugin.py b/plugins/WJSendPlugin.py index 2f0cedf..133bb75 100644 --- a/plugins/WJSendPlugin.py +++ b/plugins/WJSendPlugin.py @@ -72,15 +72,15 @@ class WJSendPlugin(ActionsPlugin, SequencePlugin, DisplayPlugin, ModulationRecei return diff def merge_data(self, data1, data2): - print (">>>merge_data passed\n\t%s\nand\n\t%s" % (data1,data2)) + #print (">>>merge_data passed\n\t%s\nand\n\t%s" % (data1,data2)) output = {} if data1 is None: output = data2.copy() else: output = data1.copy() output.update(data2) - print("merge_data returning\n\t%s" % output) - print("<<<<<<") + #print("merge_data returning\n\t%s" % output) + #print("<<<<<<") return output def recall_frame_data(self, data):