Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/plugins/wedo_plugin/wedo/motor.py
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/wedo_plugin/wedo/motor.py')
-rw-r--r--plugins/wedo_plugin/wedo/motor.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/wedo_plugin/wedo/motor.py b/plugins/wedo_plugin/wedo/motor.py
new file mode 100644
index 0000000..e74c00e
--- /dev/null
+++ b/plugins/wedo_plugin/wedo/motor.py
@@ -0,0 +1,7 @@
+def processMotorValues(value):
+ """Check to make sure motor values are sane."""
+ if 0 < value <= 100:
+ return value + 27
+ elif -100 <= value < 0:
+ return value - 27
+ return 0