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:
authorAlan Jhonn Aguiar Schwyn <alanjas@hotmail.com>2013-12-03 17:00:06 (GMT)
committer Walter Bender <walter@sugarlabs.org>2013-12-03 17:00:06 (GMT)
commitc3fe01df954d03839322901fccc43804d31f9f54 (patch)
treea265fe4066fa2e1283ca3ba764843fc037542ff3 /plugins/wedo_plugin/wedo/motor.py
parentad4497c688d4e15275736e235be8194dd68d81e0 (diff)
new wedo plugin from TurtleBot
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