chronojump r404 - in trunk: . build/data build/windows glade images images/mini images/xcf src src/gui
- From: xaviblas svn gnome org
- To: svn-commits-list gnome org
- Subject: chronojump r404 - in trunk: . build/data build/windows glade images images/mini images/xcf src src/gui
- Date: Sat, 26 Jul 2008 22:57:21 +0000 (UTC)
Author: xaviblas
Date: Sat Jul 26 22:57:20 2008
New Revision: 404
URL: http://svn.gnome.org/viewvc/chronojump?rev=404&view=rev
Log:
0.7.4
chronojump_mini prints data suitable to be on a csv (separated by ';')
chronojump_mini small text improvements
chronojump sorts ok countries translated
done: 543782 Pulses optimization. AVGs at difference. And
explanation on what "difference" does on every pulse type
Added:
trunk/images/mini/pulse_custom.png (contents, props changed)
trunk/images/mini/pulse_free.png (contents, props changed)
trunk/images/pulse_custom.png (contents, props changed)
trunk/images/pulse_free.png (contents, props changed)
trunk/images/xcf/
trunk/images/xcf/chronojump_icon.xcf (contents, props changed)
trunk/images/xcf/chronojump_icon_graph.xcf (contents, props changed)
trunk/images/xcf/chronojump_logo.png (contents, props changed)
trunk/images/xcf/delete_last.xcf (contents, props changed)
trunk/images/xcf/pulses.xcf (contents, props changed)
Modified:
trunk/Makefile
trunk/build/data/chronojump.prg
trunk/build/data/chronojump_mini.prg
trunk/build/data/version.txt
trunk/build/windows/chronojump_mini.bat
trunk/changelog.txt
trunk/glade/chronojump.glade
trunk/src/chronojump_mini.cs
trunk/src/gui/chronojump.cs
trunk/src/gui/person.cs
trunk/src/pulseType.cs
trunk/src/treeViewPulse.cs
trunk/src/util.cs
trunk/version.txt
Modified: trunk/Makefile
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Sat Jul 26 22:57:20 2008
@@ -69,6 +69,8 @@
-resource:images/jump_rj_in.png,jump_rj_in.png -resource:images/mini/jump_rj_in.png,mini/jump_rj_in.png \
-resource:images/run_simple.png,run_simple.png -resource:images/mini/run_simple.png,mini/run_simple.png \
-resource:images/run_interval.png,run_interval.png -resource:images/mini/run_interval.png,mini/run_interval.png \
+ -resource:images/pulse_free.png,pulse_free.png -resource:images/mini/pulse_free.png,mini/pulse_free.png \
+ -resource:images/pulse_custom.png,pulse_custom.png -resource:images/mini/pulse_custom.png,mini/pulse_custom.png \
-resource:images/stock_bell.png,stock_bell.png \
-resource:images/stock_bell_green.png,stock_bell_green.png \
-resource:images/stock_bell_red.png,stock_bell_red.png \
Modified: trunk/build/data/chronojump.prg
==============================================================================
Binary files. No diff available.
Modified: trunk/build/data/chronojump_mini.prg
==============================================================================
Binary files. No diff available.
Modified: trunk/build/data/version.txt
==============================================================================
--- trunk/build/data/version.txt (original)
+++ trunk/build/data/version.txt Sat Jul 26 22:57:20 2008
@@ -1 +1 @@
-0.7.3.4
+0.7.3.5
Modified: trunk/build/windows/chronojump_mini.bat
==============================================================================
--- trunk/build/windows/chronojump_mini.bat (original)
+++ trunk/build/windows/chronojump_mini.bat Sat Jul 26 22:57:20 2008
@@ -16,5 +16,5 @@
:ExecuteChronojump
cd ..\data
-"%monoFullPath%" "chronojump_mini.prg %*"
+"%monoFullPath%" "chronojump_mini.prg"
pause
Modified: trunk/changelog.txt
==============================================================================
--- trunk/changelog.txt (original)
+++ trunk/changelog.txt Sat Jul 26 22:57:20 2008
@@ -1,5 +1,13 @@
CHRONOJUMP DETAILED CHANGELOG:
+27 jul 2008
+ 0.7.4
+ chronojump_mini prints data suitable to be on a csv (separated by ';')
+ chronojump_mini small text improvements
+ chronojump sorts ok countries translated
+ done: 543782 Pulses optimization. AVGs at difference. And
+ explanation on what "difference" does on every pulse type
+
23 jul 2008
0.7.3.5
done: 543783 chronojump_mini output file and params
Modified: trunk/glade/chronojump.glade
==============================================================================
--- trunk/glade/chronojump.glade (original)
+++ trunk/glade/chronojump.glade Sat Jul 26 22:57:20 2008
@@ -12265,6 +12265,7 @@
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="on_button_pulse_free_activate" last_modification_time="Mon, 01 May 2006 17:43:47 GMT"/>
+ <signal name="enter" handler="on_button_enter" last_modification_time="Sat, 26 Jul 2008 22:08:49 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
@@ -12283,6 +12284,7 @@
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="on_button_pulse_custom_activate" last_modification_time="Mon, 01 May 2006 17:44:15 GMT"/>
+ <signal name="enter" handler="on_button_enter" last_modification_time="Sat, 26 Jul 2008 22:09:00 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
Added: trunk/images/mini/pulse_custom.png
==============================================================================
Binary file. No diff available.
Added: trunk/images/mini/pulse_free.png
==============================================================================
Binary file. No diff available.
Added: trunk/images/pulse_custom.png
==============================================================================
Binary file. No diff available.
Added: trunk/images/pulse_free.png
==============================================================================
Binary file. No diff available.
Added: trunk/images/xcf/chronojump_icon.xcf
==============================================================================
Binary file. No diff available.
Added: trunk/images/xcf/chronojump_icon_graph.xcf
==============================================================================
Binary file. No diff available.
Added: trunk/images/xcf/chronojump_logo.png
==============================================================================
Binary file. No diff available.
Added: trunk/images/xcf/delete_last.xcf
==============================================================================
Binary file. No diff available.
Added: trunk/images/xcf/pulses.xcf
==============================================================================
Binary file. No diff available.
Modified: trunk/src/chronojump_mini.cs
==============================================================================
--- trunk/src/chronojump_mini.cs (original)
+++ trunk/src/chronojump_mini.cs Sat Jul 26 22:57:20 2008
@@ -67,6 +67,7 @@
//output file stuff
fileName = manageFileName(fileName, defaultFileName);
writer = File.CreateText(fileName);
+
//detection of ports
string messageInfo;
@@ -160,7 +161,10 @@
Console.WriteLine(Catalog.GetString("Press CTRL-c for ending session"));
Console.WriteLine("-----------------------------------------");
- int count = 1;
+ double count = 1.0;
+
+ Console.WriteLine("\tcount\tTC(ms)\tTF(ms)");
+ writer.WriteLine("count;TC(ms);TF(ms)");
while(true) {
//-- Esperar a que llegue una trama
@@ -184,8 +188,8 @@
toff = timestamp;
//-- Imprimir informacion
- Console.WriteLine(count + " TF: {0:f1} ms",toff);
- writer.WriteLine(count + " TF: {0:f1} ms",toff);
+ Console.WriteLine("{0:f1}",toff);
+ writer.WriteLine("{0:f1}",toff);
}
break;
@@ -201,15 +205,15 @@
ton = timestamp;
//-- Imprimir informacion
- Console.WriteLine(count + " TC: {0:f1} ms",ton);
- writer.WriteLine(count + " TC: {0:f1} ms",ton);
+ Console.Write(count + "\t{0:f1}\t",ton);
+ writer.Write(count + ";{0:f1};",ton);
}
break;
}
writer.Flush();
- count ++;
+ count += .5;
}
}
@@ -270,6 +274,8 @@
Console.WriteLine(Catalog.GetString("Do you want to output data to a file?") + " [y/n]");
string option=Console.ReadLine();
if(option == "Y" || option == "y") {
+ Console.WriteLine(Catalog.GetString("If you want to open it with an Spreadsheet like Gnumeric, OpenOffice or MS Office, we recomend to use .csv extension.\neg: 'test.csv'"));
+ Console.WriteLine(string.Format(Catalog.GetString("File will be available at directory: {0}"), Path.GetFullPath(".." + Path.DirectorySeparatorChar + "data")));
Console.WriteLine(Catalog.GetString("Please, write filename:"));
fileName=Console.ReadLine();
}
Modified: trunk/src/gui/chronojump.cs
==============================================================================
--- trunk/src/gui/chronojump.cs (original)
+++ trunk/src/gui/chronojump.cs Sat Jul 26 22:57:20 2008
@@ -120,6 +120,7 @@
[Widget] Gtk.Button button_run_interval_by_time;
[Widget] Gtk.Button button_run_interval_unlimited;
[Widget] Gtk.Button button_reaction_time_execute;
+ [Widget] Gtk.Button button_pulse_free;
[Widget] Gtk.Button button_pulse_custom;
[Widget] Gtk.Button button_pulse_more;
@@ -2228,9 +2229,13 @@
currentEventType = new RunType("byTime");
} else if(o == (object) button_run_interval_unlimited) {
currentEventType = new RunType("unlimited");
- }
//reactionTime
//pulse
+ } else if(o == (object) button_pulse_free) {
+ currentEventType = new PulseType("Free");
+ } else if(o == (object) button_pulse_custom) {
+ currentEventType = new PulseType("Custom");
+ }
changeTestImage(currentEventType.Type.ToString(), currentEventType.Name, currentEventType.ImageFileName);
}
Modified: trunk/src/gui/person.cs
==============================================================================
--- trunk/src/gui/person.cs (original)
+++ trunk/src/gui/person.cs Sat Jul 26 22:57:20 2008
@@ -1033,6 +1033,8 @@
countriesTranslated[i++] = myStrFull[2];
}
}
+ //sort array (except first row)
+ System.Array.Sort(countriesTranslated, 1, countriesTranslated.Length-1);
UtilGtk.ComboUpdate(combo_countries, countriesTranslated, "");
combo_countries.Active = UtilGtk.ComboMakeActive(countriesTranslated,
Modified: trunk/src/pulseType.cs
==============================================================================
--- trunk/src/pulseType.cs (original)
+++ trunk/src/pulseType.cs Sat Jul 26 22:57:20 2008
@@ -21,6 +21,7 @@
using System;
using System.Data;
+using Mono.Unix;
public class PulseType : EventType
{
@@ -38,9 +39,22 @@
this.name = name;
//if this changes, sqlite/pulseType.cs initialize table should change
- if(name == "Free" || name == "Custom") {
+ if(name == "Free") {
fixedPulse = -1;
totalPulsesNum = -1;
+ imageFileName = "pulse_free.png";
+ description = Catalog.GetString("Pulse free");
+ longDescription =
+ Catalog.GetString("User executes a pulse without a predefined tempo. <i>Difference</i> will show the difference between a pulse and it's preceeding pulse.");
+
+ } else if(name == "Custom") {
+ fixedPulse = -1;
+ totalPulsesNum = -1;
+ imageFileName = "pulse_custom.png";
+ description = Catalog.GetString("Pulse custom");
+ longDescription =
+ Catalog.GetString("User executes a pulse trying to follow a predefined tempo and optionally with a fixed number of pulsations. <i>Difference</i> will show the difference between a a pulse and the predefined pulse.");
+
}
}
Modified: trunk/src/treeViewPulse.cs
==============================================================================
--- trunk/src/treeViewPulse.cs (original)
+++ trunk/src/treeViewPulse.cs Sat Jul 26 22:57:20 2008
@@ -102,19 +102,8 @@
{
Pulse newPulse = (Pulse)myObject;
- //check the time
- string [] myStringFull = newPulse.TimesString.Split(new char[] {'='});
- string timeInterval = myStringFull[lineCount];
-
-
- //if fixedPulse is not defined, comparate each pulse with the averave
- double pulseToComparate = 0;
- if(newPulse.FixedPulse == -1)
- pulseToComparate = Util.GetAverage(newPulse.TimesString);
- else
- pulseToComparate = newPulse.FixedPulse;
-
-
+ string timeInterval = getTimeInterval(newPulse, lineCount);
+ double pulseToComparate = getPulseToComparate(newPulse);
double absoluteError = Convert.ToDouble(timeInterval) - pulseToComparate;
double relativeError = absoluteError * 100 / pulseToComparate;
@@ -154,8 +143,8 @@
int count = 0;
myData[count++] = Catalog.GetString("AVG");
myData[count++] = Util.TrimDecimals( Util.GetAverage(newPulse.TimesString).ToString(), pDN );
- myData[count++] = "";
- myData[count++] = "";
+ myData[count++] = "|" + Util.TrimDecimals( getAVGDifference(newPulse, false).ToString(), pDN ) + "|";
+ myData[count++] = "|" + Util.TrimDecimals( getAVGDifference(newPulse, true).ToString(), pDN ) + "|";
myData[count++] = "";
myData[count++] = newPulse.UniqueID.ToString();
@@ -191,4 +180,41 @@
return myStringFull.Length;
}
+ private string getTimeInterval(Pulse newPulse, int lineCount) {
+ //check the time
+ string [] myStringFull = newPulse.TimesString.Split(new char[] {'='});
+ return myStringFull[lineCount];
+ }
+
+
+ private double getPulseToComparate(Pulse newPulse) {
+ //if fixedPulse is not defined, comparate each pulse with the averave
+ double pulseToComparate = 0;
+ if(newPulse.FixedPulse == -1)
+ pulseToComparate = Util.GetAverage(newPulse.TimesString);
+ else
+ pulseToComparate = newPulse.FixedPulse;
+
+ return pulseToComparate;
+ }
+
+ //gets the absolute (positive) value of differences and makes avg
+ private double getAVGDifference(Pulse newPulse, bool percent) {
+ double pulseToComparate = getPulseToComparate(newPulse);
+
+ double error = 0;
+ double errorCount = 0;
+ string [] times = newPulse.TimesString.Split(new char[] {'='});
+ foreach(string myTime in times) {
+ error = Math.Abs(Convert.ToDouble(myTime) - pulseToComparate);
+ if(percent)
+ error = error * 100 / pulseToComparate;
+
+ errorCount += error;
+ }
+
+ return errorCount / (double) times.Length;
+ }
+
+
}
Modified: trunk/src/util.cs
==============================================================================
--- trunk/src/util.cs (original)
+++ trunk/src/util.cs Sat Jul 26 22:57:20 2008
@@ -861,4 +861,12 @@
return result;
}
+ /*
+ //converts all values to positive
+ public static string StringValuesAbsolute (string myString) {
+ return myString.Trim('-');
+ }
+*/
+
+
}
Modified: trunk/version.txt
==============================================================================
--- trunk/version.txt (original)
+++ trunk/version.txt Sat Jul 26 22:57:20 2008
@@ -1 +1 @@
-0.7.3.5
+0.7.4
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]