Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPootle daemon <pootle@pootle.sugarlabs.org>2012-02-16 05:31:25 (GMT)
committer Pootle daemon <pootle@pootle.sugarlabs.org>2012-02-16 05:31:25 (GMT)
commitcbaa48e5e611030402c92839c514dd80cf0debcc (patch)
tree32d155fbb7b47854e64600791134eefdd68e2fd8
parent3d204b9298a27be9d9ae2d97aebd1d34e365ae38 (diff)
parent17af37d6edc5651aec21c7cebcf8dfedad1d4ffc (diff)
Merge branch 'master' of git.sugarlabs.org:turtleart/mainline
-rw-r--r--plugins/audio_sensors/audio_sensors.py9
-rw-r--r--taextras.py70
2 files changed, 42 insertions, 37 deletions
diff --git a/plugins/audio_sensors/audio_sensors.py b/plugins/audio_sensors/audio_sensors.py
index b168e05..1cea2ce 100644
--- a/plugins/audio_sensors/audio_sensors.py
+++ b/plugins/audio_sensors/audio_sensors.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-#Copyright (c) 2011 Walter Bender
+#Copyright (c) 2011, 2012 Walter Bender
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -342,17 +342,16 @@ class Audio_sensors(Plugin):
if len(buf) > 0:
# See <http://bugs.sugarlabs.org/ticket/552#comment:7>
# TODO: test this calibration on XO 1.5, XO 1.75
+ avg_buf = float(_avg(buf))
if self.hw == XO1:
- resistance = 2.718 ** ((float(_avg(buf)) * 0.000045788) + \
- 8.0531)
+ resistance = 2.718 ** ((avg_buf * 0.000045788) + 8.0531)
elif self.hw == XO15:
- avg_buf = float(_avg(buf))
if avg_buf > 0:
resistance = (420000000 / avg_buf) - 13500
else:
resistance = 420000000
else: # XO 1.75, 3.0
- return (46000000 / (30514 - avg_buffer)) - 1150
+ return (46000000 / (30514 - avg_buf)) - 1150
if channel == 0:
self._parent.lc.update_label_value('resistance', resistance)
else:
diff --git a/taextras.py b/taextras.py
index f3834a0..f05d471 100644
--- a/taextras.py
+++ b/taextras.py
@@ -255,48 +255,54 @@ WEDO_STRINGS = [
LEGO_STRINGS = [
# TRANS: Lego NXT is a robotics product of the LEGO company
_('Palette of LEGO NXT blocks'),
+ _('touch'),
+ _('ultrasonic'),
+ _('color'),
+ _('light'),
+ _('PORT A'),
+ _('PORT B'),
+ _('PORT C'),
+ _('PORT 1'),
+ _('PORT 2'),
+ _('PORT 3'),
+ _('PORT 4'),
+ _('Please check the connection with the brick.'),
+ _('Please check the port.'),
+ _('The value of power must be between -127 to 127.'),
+ _('An error has ocurred: check all and try reconect.'),
+ _('NXT found'),
+ _('NXT not found'),
+ _('refresh NXT'),
+ _('Search for a connected NXT brick.'),
+ _('play tone'),
+ _('freq'),
+ _('time'),
+ _('Play a tone at freq for time.'),
_('turn motor\nrotations'),
_('port'),
_('power'),
_('turn a motor'),
- _('PORT A'),
- _('port A of the brick'),
- _('PORT B'),
- _('port B of the brick'),
- _('PORT C'),
- _('port C of the brick'),
_('sync motors\nsteering'),
_('rotations'),
_('synchronize two motors'),
+ _('PORT A of the brick'),
+ _('PORT B of the brick'),
+ _('PORT C of the brick'),
_('start motor'),
- _('run a motor forever'),
+ _('Run a motor forever.'),
_('brake motor'),
- _('brake a specified motor'),
- _('read'),
- _('sensor'),
- _('read sensor output'),
- _('touch'),
- _('touch sensor'),
- _('PORT 1'),
- _('port 1 of the brick'),
- _('PORT 2'),
- _('port 2 of the brick'),
- _('PORT 3'),
- _('port 3 of the brick'),
- _('PORT 4'),
- _('port 4 of the brick'),
- _('ultrasonic'),
- _('distance sensor'),
- _('color'),
+ _('Stop a specified motor.'),
+ _('PORT 1 of the brick'),
_('color sensor'),
- _('light'),
_('light sensor'),
- _('play tone'),
- _('freq'),
- _('time'),
- _('play a tone at freq for time'),
+ _('PORT 2 of the brick'),
+ _('touch sensor'),
+ _('distance sensor'),
+ _('PORT 3 of the brick'),
+ _('read'),
+ _('sensor'),
+ _('Read sensor output.'),
+ _('PORT 4 of the brick'),
_('set light'),
- _('set color sensor light'),
- _('refresh NXT'),
- _('search for a connected NXT brick')
+ _('Set color sensor light.')
]