[chronojump] Encoder sounds are same than chronojump
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Encoder sounds are same than chronojump
- Date: Thu, 5 Apr 2012 16:00:32 +0000 (UTC)
commit a06a8720288bb239a92435b8e4c4882bdda71385
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Apr 5 23:59:16 2012 +0800
Encoder sounds are same than chronojump
encoder/Asterisk.wav | Bin 0 -> 13642 bytes
encoder/Hand.wav | Bin 0 -> 6506 bytes
encoder/Question.wav | Bin 0 -> 12960 bytes
encoder/dialog-error.ogg | Bin 10660 -> 0 bytes
encoder/dialog-question.ogg | Bin 9851 -> 0 bytes
encoder/pyserial_pyper.py | 13 ++++++++-----
encoder/service-login.ogg | Bin 17274 -> 0 bytes
src/gui/encoder.cs | 2 ++
src/util.cs | 3 ++-
web/hardware_store.html | 37 +++++++++++++++++--------------------
web/hardware_store_es.html | 38 ++++++++++++++++----------------------
11 files changed, 45 insertions(+), 48 deletions(-)
---
diff --git a/encoder/Asterisk.wav b/encoder/Asterisk.wav
new file mode 100644
index 0000000..8d278e1
Binary files /dev/null and b/encoder/Asterisk.wav differ
diff --git a/encoder/Hand.wav b/encoder/Hand.wav
new file mode 100644
index 0000000..e683c71
Binary files /dev/null and b/encoder/Hand.wav differ
diff --git a/encoder/Question.wav b/encoder/Question.wav
new file mode 100644
index 0000000..e079718
Binary files /dev/null and b/encoder/Question.wav differ
diff --git a/encoder/pyserial_pyper.py b/encoder/pyserial_pyper.py
index 26c5984..df0c408 100644
--- a/encoder/pyserial_pyper.py
+++ b/encoder/pyserial_pyper.py
@@ -95,9 +95,11 @@ lag=20
#sound stuff
#http://code.activestate.com/recipes/521884-play-sound-files-with-pygame-in-a-cross-platform-m/
# global constants
-FREQ = 44100 # same as audio CD
+#FREQ = 44100 # same as audio CD
+FREQ = 8000 # same as audio CD
BITSIZE = -16 # unsigned 16 bit
-CHANNELS = 2 # 1 == mono, 2 == stereo
+#CHANNELS = 2 # 1 == mono, 2 == stereo
+CHANNELS = 1 # 1 == mono, 2 == stereo
BUFFER = 1024 # audio buffer size in no. of samples
FRAMERATE = 30 # how often to check if playback has finished
def playsound(soundfile):
@@ -107,9 +109,10 @@ def playsound(soundfile):
while pygame.mixer.get_busy():
clock.tick(FRAMERATE)
-soundFileStart = "/home/xavier/informatica/progs_meus/chronojump/chronojump/encoder/service-login.ogg"
-soundFileGood = "/home/xavier/informatica/progs_meus/chronojump/chronojump/encoder/dialog-question.ogg"
-soundFileBad = "/home/xavier/informatica/progs_meus/chronojump/chronojump/encoder/dialog-error.ogg"
+soundFileStart = "/home/xavier/informatica/progs_meus/chronojump/chronojump/encoder/Question.wav"
+soundFileGood = "/home/xavier/informatica/progs_meus/chronojump/chronojump/encoder/Asterisk.wav"
+#soundFileBad = "/home/xavier/informatica/progs_meus/chronojump/chronojump/encoder/Beep.wav"
+soundFileBad = "/home/xavier/informatica/progs_meus/chronojump/chronojump/encoder/Hand.wav"
BLACK = 30
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 9b777a6..e0355cf 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -71,6 +71,8 @@ public partial class ChronoJumpWindow
//TODO: check all repetitive conditions areok on pyserial and on treeview
+ //TODO: fix spinbutton on repetitive conditions (page...) to ensure decimal can be selected
+
//TODO: improve message if chronopic is not connected
//TODO: store encoder data: auto save, and show on a treeview. Put button to delete current (or should be called "last")
diff --git a/src/util.cs b/src/util.cs
index 7c7b875..e034dcd 100644
--- a/src/util.cs
+++ b/src/util.cs
@@ -1014,7 +1014,8 @@ public class Util
System.Media.SystemSounds.Asterisk.Play();
break;
case Constants.SoundTypes.BAD:
- System.Media.SystemSounds.Beep.Play();
+ //System.Media.SystemSounds.Beep.Play();
+ System.Media.SystemSounds.Hand.Play();
break;
}
} catch {}
diff --git a/web/hardware_store.html b/web/hardware_store.html
index 1593e6a..47f6283 100644
--- a/web/hardware_store.html
+++ b/web/hardware_store.html
@@ -51,8 +51,8 @@
<ul>
<li><a href="#chronopic3"><img src="images/chronopic3.png" alt="Chronopic3"></a></li>
<li><a href="#platform-rigid"><img src="images/chronojump_circuit_board_platform_small.png" alt="Platform rigid"></a></li>
- <li><a href="#platform-flexible"><img src="images/chronojump_flexible_platform_small.jpg" alt="Platform flexible"></a></li>
<li><a href="#photocells"><img src="images/velleman_connecting5.jpg" alt="Photocells"></a></li>
+ <li><a href="#encoder"><img src="images/encoder-chronojump-sized.png" alt="Linear encoder"></a></li>
</ul>
</div>
</div>
@@ -69,6 +69,7 @@
<ul>
<li><b>50ms</b>: suitable for jumping on platforms (helps to avoid bogus jumps when jump technique is inadequate)
<li><b>10ms</b>: suitable for running between photocells
+ </ul>
You can <a href="http://forum.chronojump.org/showthread.php?tid=20">change the firmware</a> anytime.
</td></tr>
@@ -95,22 +96,6 @@
</td></tr>
</table>
</div>
- <div id="platform-flexible">
- <table>
- <tr><th colspan="2"><h3>Flexible jump platform</h3></th></tr>
- <tr><td colspan="2" bgcolor="#6c77ab" height="1px"></td></tr>
- <tr valign="top"><td>
- <img src="images/chronojump_flexible_platform_small.jpg" alt="Chronojump flexible platform">
- </td><td width="100%">
- Flexible platform with high contact area. Best balance between price, quality, transport and storage.
- <br><br>Sizes:
- <ul>
- <li>Din A1: 60â
- <li>Din A2: 45â
- </ul>
- </td></tr>
- </tr></table>
- </div>
<div id="photocells">
<table>
<tr><th colspan="2"><h3>Photocells</h3></th></tr>
@@ -131,6 +116,19 @@
</td>
</tr></table>
</div>
+ <div id="encoder">
+ <table>
+ <tr><th colspan="2"><h3>Linear encoder</h3></th></tr>
+ <tr><td colspan="2" bgcolor="#6c77ab" height="1px"></td></tr>
+ <tr valign="top"><td rowspan="2">
+ <img src="images/encoder-chronojump-sized.png" alt="Linear encoder">
+ </td><td width="100%">
+ Soon available.
+ </td></tr>
+ <tr><td valign="bottom">
+ </td>
+ </tr></table>
+ </div>
<div id="typical_uses">
<table id="vert_space">
<tr><th colspan="2"><h3>Typical uses</h3></th></tr>
@@ -162,10 +160,9 @@
Cable using on three different scenarios.
<br>
<ul id="nospace">
- <li><span style="background-color: #6c76ab"><font color="#f7ff19"><b>Yellow</b>:</font></span> USB cable. This cable is standard USB Bidirectional <a href="http://chronojump.org/images/USB_types_2.jpg">male A-male B</a>. Price: 1â.
+ <li><span style="background-color: #6c76ab"><font color="#f7ff19"><b>Yellow</b>:</font></span> USB cable. This cable is standard USB Bidirectional <a href="http://chronojump.org/images/USB_types_2.jpg">male A-male B</a>. Price: 2â.
<li><font color="#191cff"><b>Blue</b></font>: cables and RCA adapter. RCA adapter converts two cables in one:
- <br><font color="#191cff"><b>am</b></font>: <b>a</b>dapter <b>m</b>ale, it connects to Chronopic.
- <br><font color="#191cff"><b>af</b></font>: <b>a</b>dapter <b>f</b>emale, it connects to a cable.
+ <br><font color="#191cff"><b>a</b></font>: adapter.
<br>Prices: RCA Cable 2.5m: 3â; 5m: 4â; 10m: 8â; 25m: 16â; 50m: 30â. RCA-Adapter: 2â.
</ul>
</td></tr>
diff --git a/web/hardware_store_es.html b/web/hardware_store_es.html
index 0b4b344..8593a3d 100644
--- a/web/hardware_store_es.html
+++ b/web/hardware_store_es.html
@@ -51,8 +51,8 @@
<ul>
<li><a href="#chronopic3"><img src="images/chronopic3.png" alt="Chronopic3"></a></li>
<li><a href="#platform-rigid"><img src="images/chronojump_circuit_board_platform_small.png" alt="Platform rigid"></a></li>
- <li><a href="#platform-flexible"><img src="images/chronojump_flexible_platform_small.jpg" alt="Platform flexible"></a></li>
<li><a href="#photocells"><img src="images/velleman_connecting5.jpg" alt="Photocells"></a></li>
+ <li><a href="#encoder"><img src="images/encoder-chronojump-sized.png" alt="Linear encoder"></a></li>
</ul>
</div>
</div>
@@ -70,7 +70,6 @@
<li><b>50ms</b>: ideal para saltos en plataformas (ayuda a prevenir falsos saltos en caso de errores en la tÃcnica)
<li><b>10ms</b>: ideal para carreras con cÃlulas fotoelÃctricas
</ul>
- </div>
<br>Cuando lo desee <a href="http://foro.chronojump.org/showthread.php?tid=19">puede cambiar de firmware</a>.
</td></tr>
<tr><td valign="bottom">
@@ -96,23 +95,6 @@
</td></tr>
</table>
</div>
- <div id="platform-flexible">
- <table>
- <tr><th colspan="2"><h3>Platforma de saltos flexible</h3></th></tr>
- <tr><td colspan="2" bgcolor="#6c77ab" height="1px"></td></tr>
- <tr valign="top"><td rowspan="2">
- <img src="images/chronojump_flexible_platform_small.jpg" alt="Chronojump flexible platform">
- </td><td width="100%">
- Plataforma flexible con elevada superfÃcie de contacto. Muy buena relaciÃn entre precio, calidad, capacidad de transporte y almacenamiento.
- <br><br>TamaÃos:
- <ul>
- <li>Din A1: 60â
- <li>Din A2: 45â
- </ul>
- </td></tr>
- </td>
- </tr></table>
- </div>
<div id="photocells">
<table>
<tr><th colspan="2"><h3>FotocÃlulas</h3></th></tr>
@@ -133,6 +115,19 @@
</td>
</tr></table>
</div>
+ <div id="encoder">
+ <table>
+ <tr><th colspan="2"><h3>Encoder lineal</h3></th></tr>
+ <tr><td colspan="2" bgcolor="#6c77ab" height="1px"></td></tr>
+ <tr valign="top"><td rowspan="2">
+ <img src="images/encoder-chronojump-sized.png" alt="Linear encoder">
+ </td><td width="100%">
+ En breve a a la venta.
+ </td></tr>
+ <tr><td valign="bottom">
+ </td>
+ </tr></table>
+ </div>
<div id="typical_uses">
<table id="vert_space">
<tr><th colspan="2"><h3>Ejemplos de uso</h3></th></tr>
@@ -164,10 +159,9 @@
Uso de los cables en tres situaciones distintas.
<br>
<ul id="nospace">
- <li><span style="background-color: #6c76ab"><font color="#f7ff19"><b>Amarillo</b></font></span> cable USB. Es un cable USB Bidireccional estÃndard <a href="http://chronojump.org/images/USB_types_2.jpg">macho A-macho B</a>. Precio: 1â.
+ <li><span style="background-color: #6c76ab"><font color="#f7ff19"><b>Amarillo</b></font></span> cable USB. Es un cable USB Bidireccional estÃndard <a href="http://chronojump.org/images/USB_types_2.jpg">macho A-macho B</a>. Precio: 2â.
<li><font color="#191cff"><b>Azul</b></font> cables y adaptador RCA. El adaptador RCA convierte dos cables en uno:
- <br><font color="#191cff"><b>am</b></font>: <b>a</b>daptador <b>m</b>acho, se conecta al Chronopic.
- <br><font color="#191cff"><b>af</b></font>: <b>a</b>daptador (<b>f</b>emale), se conecta a un cable.
+ <br><font color="#191cff"><b>a</b></font>: adaptador.
<br>Precios: Cables RCA 2,5m: 3â; 5m: 4â; 10m: 8â; 25m: 16â; 50m: 30â. Adaptador-RCA: 2â.
</ul>
</td></tr>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]