Commit a152e104 authored by Xavier de Blas's avatar Xavier de Blas

0.8.2.8 db 0.67 done takeoff, added in db, created images

0.8.2.8
db 0.67
done takeoff, added in db, created images

RunAnalysis done (only remains to export, report ok)
db 0.66

Added a pulsebar (activity) on upload session
 	
improved running at graphs. Improved margaria graph
	
Better thread on pinging at start

svn path=/trunk/; revision=472
parent 384139ec
......@@ -73,6 +73,7 @@ RESOURCES_IMAGES = -resource:images/mini/no_image.png,mini/no_image.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/mtgug.png,mtgug.png -resource:images/mini/mtgug.png,mini/mtgug.png \
-resource:images/take_off.png,take_off.png -resource:images/mini/take_off.png,mini/take_off.png \
-resource:images/chronopic1.jpg,chronopic1.jpg -resource:images/mini/chronopic1.jpg,mini/chronopic1.jpg \
-resource:images/chronopic2.jpg,chronopic2.jpg -resource:images/mini/chronopic2.jpg,mini/chronopic2.jpg \
-resource:images/chronopic3.jpg,chronopic3.jpg -resource:images/mini/chronopic3.jpg,mini/chronopic3.jpg \
......
......@@ -2,8 +2,8 @@ TODO:
Add Cabedo's tests
add a link to the server page. Develop web stats and survey on web site. Maybe done by R script and calling
to database
add a link to the server page. Develop web stats and survey on web site. Maybe
done by R script and calling to database
http://cran.r-project.org/web/packages/RSQLite/index.html
http://cran.r-project.org/web/packages/RSQLite/INSTALL
http://cran.r-project.org/web/packages/DBI/index.html
......@@ -12,6 +12,56 @@ all this will be release 0.9
do the ping gets real IP
put thread in other server situations:
-upload evaluator
-upload session
do the graph of last jump plot values of jumps before
(maybe show last jumps of this kind on different people, and the avg of this
user and all users (this two in different color))
http://en.csharp-online.net/ASP.NET_Security_Hacks¿Avoiding_SQL_Injection
http://ferruh.mavituna.com/sql-injection-cheatsheet-oku/
every string that gets on server or complex object, sanitize it: see on sql or
c# books. Or look for ; and after alter, insert, delete, drop, update, ...
(low and hight case)
i think there will be no problems because all is parametrized
Fix bug on thread sqlite at start (see png at Desktop)
Put pictures and description of runAnalysis. Do svn add, Makefile, ...
intersession stats only have to show one max or avg, not n max or all jumps
stats all and limit is not updating the treeview stats.
two chronopics in chronojump
when person weight is updated, description of eg. margaria (with power)
doesn't change. Should change or use another thing. Recreate all time in
session.... also same when edit jump.
Maybe is better to don't have it (the power) recorded at any place but generate when it's
required
in execution graph put avgs as horizontal lines
and plot all tests of same type of same person
19 mar 2009
0.8.2.8
db 0.67
done takeoff, added in db, created images
RunAnalysis done (only remains to export, report ok)
db 0.66
Added a pulsebar (activity) on upload session
improved running at graphs. Improved margaria graph
Better thread on pinging at start
10 mar 2009
0.8.2.7
......
This diff is collapsed.
images/margaria.png

5.31 KB | W: | H:

images/margaria.png

4.95 KB | W: | H:

images/margaria.png
images/margaria.png
images/margaria.png
images/margaria.png
  • 2-up
  • Swipe
  • Onion skin
images/mini/margaria.png

2.5 KB | W: | H:

images/mini/margaria.png

2.38 KB | W: | H:

images/mini/margaria.png
images/mini/margaria.png
images/mini/margaria.png
images/mini/margaria.png
  • 2-up
  • Swipe
  • Onion skin
images/mini/run_interval.png

2.72 KB | W: | H:

images/mini/run_interval.png

2.77 KB | W: | H:

images/mini/run_interval.png
images/mini/run_interval.png
images/mini/run_interval.png
images/mini/run_interval.png
  • 2-up
  • Swipe
  • Onion skin
images/mini/run_simple.png

2.55 KB | W: | H:

images/mini/run_simple.png

2.5 KB | W: | H:

images/mini/run_simple.png
images/mini/run_simple.png
images/mini/run_simple.png
images/mini/run_simple.png
  • 2-up
  • Swipe
  • Onion skin
images/run_interval.png

5.75 KB | W: | H:

images/run_interval.png

5.7 KB | W: | H:

images/run_interval.png
images/run_interval.png
images/run_interval.png
images/run_interval.png
  • 2-up
  • Swipe
  • Onion skin
images/run_simple.png

5.42 KB | W: | H:

images/run_simple.png

5.38 KB | W: | H:

images/run_simple.png
images/run_simple.png
images/run_simple.png
images/run_simple.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -106,7 +106,8 @@ public class ChronoJump
//variables to manage the ping thread
string versionAvailable;
bool pinging;
bool pingStart;
bool pingEnd;
bool pulseGTKPingShouldEnd;
protected void sqliteThings () {
......@@ -246,13 +247,19 @@ public class ChronoJump
//connect to server to Ping
versionAvailable = "";
pinging = false;
pingStart = false;
pingEnd = false;
thread = new Thread(new ThreadStart(findVersion));
GLib.Idle.Add (new GLib.IdleHandler (PulseGTKPing));
thread.Start();
while(pinging) {
//wait until pinging process start
while(! pingStart) {
}
//wait until pinging ends (or it's cancelled)
while(! pingEnd) {
}
string versionAvailableKnown = SqlitePreferences.Select("versionAvailable");
......@@ -295,7 +302,7 @@ public class ChronoJump
}
private void findVersion() {
pinging = true;
pingStart = true;
pulseGTKPingShouldEnd = false;
splashShowButton = true;
......@@ -305,14 +312,14 @@ public class ChronoJump
splashShowButton = false;
Console.Write(" version: " + versionAvailable);
pinging = false;
pingEnd = true;
}
private void on_find_version_cancelled(object o, EventArgs args) {
splashShowButton = false;
pulseGTKPingShouldEnd = true;
versionAvailable = Constants.ServerOffline;
pinging = false;
pingEnd = true;
}
protected void readMessageToStart() {
......@@ -386,10 +393,10 @@ public class ChronoJump
protected bool PulseGTK ()
{
if( ( needEndSplashWin && ! pinging)
if( ( needEndSplashWin && pingEnd )
|| ! thread.IsAlive) {
fakeSplashButton.Click();
Log.Write("splash window dying here");
Log.Write("splash window ending here");
return false;
}
//need to do this, if not it crashes because chronopicWin gets died by thread ending
......
......@@ -94,7 +94,7 @@ public class Constants
public const string ChronometerCp1 = "Chronopic1";
public const string ChronometerCp2 = "Chronopic2";
public const string ChronometerCp3 = "Chronopic3";
public const string ChronometerCp3 = "Chronopic32";
public static string [] Chronometers = {
UndefinedDefault,
ChronometerCp1,
......@@ -113,6 +113,10 @@ public class Constants
};
public static string RunAnalysisName = "RunAnalysis"; //Josep Ma Padullés test
public static string TakeOffName = "TakeOff"; //translate (take off?)
public static string TakeOffWeightName = "TakeOffWeight"; //translate (take off?)
/* OLD, check this
......
......@@ -291,6 +291,14 @@ Log.Write("w6 ");
//record the TC
tc = timestamp / 1000.0;
//takeOff jump (only one TC)
//if(fixedValue == 0.5) {
if(type == Constants.TakeOffName || type == Constants.TakeOffWeightName) {
tv = 0;
write ();
success = true;
}
//update event progressbar
Log.Write("w7 ");
//eventExecuteWin.ProgressBarEventOrTimePreExecution(
......@@ -380,7 +388,6 @@ Log.Write("wb ");
//event will be raised, and managed in chronojump.cs
fakeButtonFinished.Click();
//eventExecuteWin.PrepareJumpSimpleGraph(tv, tc);
prepareEventGraphJumpSimple = new PrepareEventGraphJumpSimple(tv, tc);
needUpdateGraphType = eventType.JUMP;
needUpdateGraph = true;
......@@ -905,6 +912,28 @@ public class JumpRjExecute : JumpExecute
}
}
if(type == Constants.RunAnalysisName) {
double speed = (fall /10) / Util.GetTotalTime(tcString, tvString);
/*
string tcStringWithoutFirst = Util.DeleteFirstSubEvent(tcString);
string tvStringWithoutFirst = Util.DeleteFirstSubEvent(tvString);
double averagePlatformTimes = ( Util.GetAverage(tcStringWithoutFirst) + Util.GetAverage(tvStringWithoutFirst) ) / 2;
double freq = 1 / averagePlatformTimes;
//amplitud
double range = speed / freq;
//don't put "=" because can appear problems in different parts of the code
description =
Catalog.GetString ("AVG speed") + "->" + Util.TrimDecimals(speed.ToString(), pDN) + "m/s, " +
Catalog.GetString ("AVG frequencies") + "->" + Util.TrimDecimals(freq.ToString(), pDN) + "Hz, " +
Catalog.GetString ("AVG range") + "->" + Util.TrimDecimals(range.ToString(), pDN) + "m.";
*/
}
if(tempTable)
SqliteJumpRj.Insert(false, Constants.TempJumpRjTable, "NULL", personID, sessionID,
type, Util.GetMax(tvString), Util.GetMax(tcString),
......
......@@ -104,6 +104,7 @@ public class ChronoJumpWindow
[Widget] Gtk.Button button_abk;
[Widget] Gtk.Button button_dj;
[Widget] Gtk.Button button_rocket;
[Widget] Gtk.Button button_take_off;
[Widget] Gtk.Button button_more;
[Widget] Gtk.Button button_rj_j;
[Widget] Gtk.Button button_rj_t;
......@@ -123,6 +124,7 @@ public class ChronoJumpWindow
[Widget] Gtk.Button button_run_interval_by_laps;
[Widget] Gtk.Button button_run_interval_by_time;
[Widget] Gtk.Button button_run_interval_unlimited;
[Widget] Gtk.Button button_run_analysis;
[Widget] Gtk.Button button_run_interval_mtgug;
[Widget] Gtk.Button button_reaction_time_execute;
[Widget] Gtk.Button button_pulse_free;
......@@ -155,6 +157,7 @@ public class ChronoJumpWindow
[Widget] Gtk.MenuItem abk;
[Widget] Gtk.MenuItem dj;
[Widget] Gtk.MenuItem menuitem_jump_rocket;
[Widget] Gtk.MenuItem menuitem_take_off;
[Widget] Gtk.MenuItem more_simple_jumps;
[Widget] Gtk.MenuItem more_rj;
[Widget] Gtk.MenuItem menuitem_jump_type_add;
......@@ -177,6 +180,7 @@ public class ChronoJumpWindow
[Widget] Gtk.MenuItem menuitem_run_interval_by_time;
[Widget] Gtk.MenuItem menuitem_run_interval_unlimited;
[Widget] Gtk.MenuItem menuitem_run_interval_mtgug;
[Widget] Gtk.MenuItem menuitem_run_analysis;
[Widget] Gtk.Button button_edit_current_person;
[Widget] Gtk.MenuItem menuitem_edit_current_person;
......@@ -2400,6 +2404,8 @@ Log.WriteLine("+++++++++++++++++ 7 ++++++++++++++++");
currentEventType = new JumpType("DJ");
} else if(o == (object) button_rocket) {
currentEventType = new JumpType("Rocket");
} else if(o == (object) button_take_off) {
currentEventType = new JumpType(Constants.TakeOffName);
//jumpRJ
} else if(o == (object) button_rj_j) {
currentEventType = new JumpType("RJ(j)");
......@@ -2441,6 +2447,7 @@ Log.WriteLine("+++++++++++++++++ 7 ++++++++++++++++");
currentEventType = new RunType("byTime");
} else if(o == (object) button_run_interval_unlimited) {
currentEventType = new RunType("unlimited");
//TODO: RunAnalysis
} else if(o == (object) button_run_interval_mtgug) {
currentEventType = new RunType("MTGUG");
//reactionTime
......@@ -2601,9 +2608,11 @@ Log.WriteLine("+++++++++++++++++ 7 ++++++++++++++++");
currentJumpType = new JumpType("ABK");
} else if (o == (object) button_rocket || o == (object) menuitem_jump_rocket) {
currentJumpType = new JumpType("Rocket");
} else if (o == (object) button_take_off || o == (object) menuitem_take_off) {
currentJumpType = new JumpType(Constants.TakeOffName);
} else {
}
changeTestImage(EventType.Types.JUMP.ToString(), currentJumpType.Name, currentJumpType.ImageFileName);
double jumpWeight = 0;
......@@ -2616,7 +2625,9 @@ Log.WriteLine("+++++++++++++++++ 7 ++++++++++++++++");
}
}
int myFall = 0;
if( ! currentJumpType.StartIn ) {
if(currentJumpType.Name == Constants.TakeOffName || currentJumpType.Name == Constants.TakeOffWeightName)
myFall = 0;
else if( ! currentJumpType.StartIn) {
myFall = jumpExtraWin.Fall;
}
......@@ -2632,8 +2643,10 @@ Log.WriteLine("+++++++++++++++++ 7 ++++++++++++++++");
//show the event doing window
double myLimit = 3; //3 phases for show the Dj
if( currentJumpType.StartIn )
myLimit = 2; //2 for normal jump
if( currentJumpType.StartIn ||
currentJumpType.Name == Constants.TakeOffName ||
currentJumpType.Name == Constants.TakeOffWeightName)
myLimit = 2; //2 for normal jump (or take off)
//don't let update until test finishes
if(createdStatsWin)
......@@ -2785,6 +2798,16 @@ Log.WriteLine("+++++++++++++++++ 7 ++++++++++++++++");
//in this jump type, don't ask for limit of jumps or seconds
on_rj_accepted(o, args);
} else if(o == (object) button_run_analysis || o == (object) menuitem_run_analysis)
{
//ATTENTION: run analysis is considered a reactive jump
//because all tc and tf's have to be recorded
currentJumpType = new JumpType(Constants.RunAnalysisName);
//on_rj_accepted(o, args);
//need to ask for horizontal distance between photocells
jumpExtraWin = JumpExtraWindow.Show(app1, currentJumpType);
jumpExtraWin.Button_accept.Clicked += new EventHandler(on_rj_accepted);
}
}
private void on_rj_accepted (object o, EventArgs args)
......@@ -2815,10 +2838,9 @@ Log.WriteLine("+++++++++++++++++ 7 ++++++++++++++++");
}
}
int myFall = 0;
if( ! currentJumpType.StartIn ) {
if( ! currentJumpType.StartIn || currentJumpType.Name == Constants.RunAnalysisName)
myFall = jumpExtraWin.Fall;
}
//used by cancel and finish
//currentEventType = new JumpType();
currentEventType = currentJumpType;
......
......@@ -264,7 +264,7 @@ public class EditEventWindow
*/
}
protected void fillTv(Event myEvent) {
protected virtual void fillTv(Event myEvent) {
Jump myJump = (Jump) myEvent;
entryTv = myJump.Tv.ToString();
......@@ -409,6 +409,13 @@ public class EditEventWindow
private void on_entry_description_changed (object o, EventArgs args) {
entry_description.Text = Util.RemoveTildeAndColonAndDot(entry_description.Text.ToString());
}
protected virtual void on_radio_mtgug_1_toggled(object o, EventArgs args) { }
protected virtual void on_radio_mtgug_2_toggled(object o, EventArgs args) { }
protected virtual void on_radio_mtgug_3_toggled(object o, EventArgs args) { }
protected virtual void on_radio_mtgug_4_toggled(object o, EventArgs args) { }
protected virtual void on_radio_mtgug_5_toggled(object o, EventArgs args) { }
protected virtual void on_radio_mtgug_6_toggled(object o, EventArgs args) { }
protected virtual void on_button_cancel_clicked (object o, EventArgs args)
{
......
......@@ -917,9 +917,12 @@ public class EventExecuteWindow
}
//blue for TF
pixmap.DrawLine(pen_azul, ancho*1/6 +10, alto, ancho*1/6 +10, calculatePaintHeight(tvNow, alto, maxValue, minValue, topMargin, bottomMargin));
pixmap.DrawLine(pen_azul, ancho*3/6 +10, alto, ancho*3/6 +10, calculatePaintHeight(tvPerson, alto, maxValue, minValue, topMargin, bottomMargin));
pixmap.DrawLine(pen_azul, ancho*5/6 +10, alto, ancho*5/6 +10, calculatePaintHeight(tvSession, alto, maxValue, minValue, topMargin, bottomMargin));
//check it's not a take off
if(tvNow > 0) {
pixmap.DrawLine(pen_azul, ancho*1/6 +10, alto, ancho*1/6 +10, calculatePaintHeight(tvNow, alto, maxValue, minValue, topMargin, bottomMargin));
pixmap.DrawLine(pen_azul, ancho*3/6 +10, alto, ancho*3/6 +10, calculatePaintHeight(tvPerson, alto, maxValue, minValue, topMargin, bottomMargin));
pixmap.DrawLine(pen_azul, ancho*5/6 +10, alto, ancho*5/6 +10, calculatePaintHeight(tvSession, alto, maxValue, minValue, topMargin, bottomMargin));
}
//circles
if(eventGraphConfigureWin.PaintCircle) {
......@@ -928,9 +931,12 @@ public class EventExecuteWindow
pixmap.DrawArc(pen_rojo, true, ancho*3/6 - radio/2 + arcSystemCorrection, calculatePaintHeight(tcPerson, alto, maxValue, minValue, topMargin, bottomMargin) -radio/2, radio , radio, 0, 360*64);
pixmap.DrawArc(pen_rojo, true, ancho*5/6 - radio/2 + arcSystemCorrection, calculatePaintHeight(tcSession, alto, maxValue, minValue, topMargin, bottomMargin) -radio/2, radio , radio, 0, 360*64);
}
pixmap.DrawArc(pen_azul, true, ancho*1/6 +10 - radio/2 + arcSystemCorrection, calculatePaintHeight(tvNow, alto, maxValue, minValue, topMargin, bottomMargin) -radio/2, radio , radio, 0, 360*64);
pixmap.DrawArc(pen_azul, true, ancho*3/6 +10 - radio/2 + arcSystemCorrection, calculatePaintHeight(tvPerson, alto, maxValue, minValue, topMargin, bottomMargin) -radio/2, radio , radio, 0, 360*64);
pixmap.DrawArc(pen_azul, true, ancho*5/6 +10 - radio/2 + arcSystemCorrection, calculatePaintHeight(tvSession, alto, maxValue, minValue, topMargin, bottomMargin) -radio/2, radio , radio, 0, 360*64);
//check it's not a take off
if(tvNow > 0) {
pixmap.DrawArc(pen_azul, true, ancho*1/6 +10 - radio/2 + arcSystemCorrection, calculatePaintHeight(tvNow, alto, maxValue, minValue, topMargin, bottomMargin) -radio/2, radio , radio, 0, 360*64);
pixmap.DrawArc(pen_azul, true, ancho*3/6 +10 - radio/2 + arcSystemCorrection, calculatePaintHeight(tvPerson, alto, maxValue, minValue, topMargin, bottomMargin) -radio/2, radio , radio, 0, 360*64);
pixmap.DrawArc(pen_azul, true, ancho*5/6 +10 - radio/2 + arcSystemCorrection, calculatePaintHeight(tvSession, alto, maxValue, minValue, topMargin, bottomMargin) -radio/2, radio , radio, 0, 360*64);
}
}
......@@ -1426,7 +1432,6 @@ public class EventExecuteWindow
//progressbar.Text = "";
label_value.Text = "";
else
//progressbar.Text = Math.Round(events,3).ToString() + " / " + limit.ToString();
label_value.Text = Math.Round(events,3).ToString();
} else {
//activity mode
......
......@@ -109,6 +109,20 @@ public class EditJumpWindow : EditEventWindow
return myTypes;
}
protected override void fillTv(Event myEvent) {
Jump myJump = (Jump) myEvent;
entryTv = myJump.Tv.ToString();
//show all the decimals for not triming there in edit window using
//(and having different values in formulae like GetHeightInCm ...)
//entry_tv_value.Text = Util.TrimDecimals(entryTv, pDN);
entry_tv_value.Text = entryTv;
//hide tv if it's only a takeoff
if(myEvent.Type == Constants.TakeOffName || myEvent.Type == Constants.TakeOffWeightName)
entry_tv_value.Sensitive = false;
}
protected override void fillTc (Event myEvent) {
//on normal jumps fills Tc and Fall
Jump myJump = (Jump) myEvent;
......@@ -170,6 +184,14 @@ public class EditJumpWindow : EditEventWindow
//if the distance of the new runType is fixed, put this distance
//if not conserve the old
JumpType myJumpType = new JumpType (UtilGtk.ComboGetActive(combo_eventType));
if(myJumpType.Name == Constants.TakeOffName || myJumpType.Name == Constants.TakeOffWeightName) {
entry_tv_value.Text = "0";
entry_tv_value.Sensitive = false;
} else
entry_tv_value.Sensitive = true;
if(myJumpType.HasWeight) {
if(weightOldStore != "0")
entry_weight_value.Text = weightOldStore;
......@@ -762,6 +784,10 @@ public class JumpExtraWindow
[Widget] Gtk.Label label_weight;
[Widget] Gtk.Label label_fall;
[Widget] Gtk.Label label_cm;
//for RunAnalysis
//but will be used and recorded with "fall"
static int distance;
static string option = "Kg";
static double limited = 10;
......@@ -788,6 +814,23 @@ public class JumpExtraWindow
JumpExtraWindowBox = new JumpExtraWindow (parent);
}
if(myJumpType.Name == Constants.RunAnalysisName) {
hideRepetitiveData();
hideWeightData();
distance = 100; //100cm
JumpExtraWindowBox.spinbutton_fall.Value = distance;
JumpExtraWindowBox.label_fall.Text = Catalog.GetString("Distance between photocells");
JumpExtraWindowBox.spinbutton_fall.Sensitive = true;
JumpExtraWindowBox.label_fall.Sensitive = true;
JumpExtraWindowBox.label_cm.Sensitive = true;
JumpExtraWindowBox.jump_extra.Show ();
return JumpExtraWindowBox;
}
if(myJumpType.IsRepetitive) {
string jumpsName = Catalog.GetString("jumps");
string secondsName = Catalog.GetString("seconds");
......@@ -809,7 +852,7 @@ public class JumpExtraWindow
if(! myJumpType.HasWeight) {
hideWeightData();
}
if(myJumpType.StartIn) {
if(myJumpType.StartIn || myJumpType.Name == Constants.TakeOffName || myJumpType.Name == Constants.TakeOffWeightName) {
hideFallData();
}
......@@ -862,6 +905,7 @@ public class JumpExtraWindow
limited = (double) spinbutton_limit.Value;
weight = (int) spinbutton_weight.Value;
fall = (int) spinbutton_fall.Value;
distance = (int) spinbutton_fall.Value;
JumpExtraWindowBox.jump_extra.Hide();
JumpExtraWindowBox = null;
......@@ -900,6 +944,7 @@ public class JumpExtraWindow
get { return limited; }
}
public string LimitString
{
get {
......
......@@ -305,7 +305,7 @@ public class EditRunIntervalWindow : EditRunWindow
toggleRaisesSignal = true;
}
private void on_radio_mtgug_1_toggled(object o, EventArgs args) {
protected override void on_radio_mtgug_1_toggled(object o, EventArgs args) {
if(toggleRaisesSignal) {
string [] d = entry_description.Text.Split(new char[] {' '});
if(radio_mtgug_1_undef.Active)
......@@ -324,7 +324,7 @@ public class EditRunIntervalWindow : EditRunWindow
}
}
private void on_radio_mtgug_2_toggled(object o, EventArgs args) {
protected override void on_radio_mtgug_2_toggled(object o, EventArgs args) {
if(toggleRaisesSignal) {
string [] d = entry_description.Text.Split(new char[] {' '});
if(radio_mtgug_2_undef.Active)
......@@ -343,7 +343,7 @@ public class EditRunIntervalWindow : EditRunWindow
}
}
private void on_radio_mtgug_3_toggled(object o, EventArgs args) {
protected override void on_radio_mtgug_3_toggled(object o, EventArgs args) {
if(toggleRaisesSignal) {
string [] d = entry_description.Text.Split(new char[] {' '});
if(radio_mtgug_3_undef.Active)
......@@ -362,7 +362,7 @@ public class EditRunIntervalWindow : EditRunWindow
}
}
private void on_radio_mtgug_4_toggled(object o, EventArgs args) {
protected override void on_radio_mtgug_4_toggled(object o, EventArgs args) {
if(toggleRaisesSignal) {
string [] d = entry_description.Text.Split(new char[] {' '});
if(radio_mtgug_4_undef.Active)
......@@ -381,7 +381,7 @@ public class EditRunIntervalWindow : EditRunWindow
}
}
private void on_radio_mtgug_5_toggled(object o, EventArgs args) {
protected override void on_radio_mtgug_5_toggled(object o, EventArgs args) {
if(toggleRaisesSignal) {
string [] d = entry_description.Text.Split(new char[] {' '});
if(radio_mtgug_5_undef.Active)
......@@ -400,7 +400,7 @@ public class EditRunIntervalWindow : EditRunWindow
}
}
private void on_radio_mtgug_6_toggled(object o, EventArgs args) {
protected override void on_radio_mtgug_6_toggled(object o, EventArgs args) {
if(toggleRaisesSignal) {
string [] d = entry_description.Text.Split(new char[] {' '});
if(radio_mtgug_6_undef.Active)
......
......@@ -91,6 +91,7 @@ public class SessionUploadWindow {
[Widget] Gtk.Button button_close;
[Widget] Gtk.ProgressBar pulsebar;
[Widget] Gtk.ProgressBar progressbar;
......@@ -243,6 +244,10 @@ public class SessionUploadWindow {
progressbar.Pulse();
}
public void UpdatePulsebar () {
pulsebar.Pulse();
}
public void UpdateProgressbar (double fraction) {
if(fraction < 0)
fraction = 0;
......@@ -253,6 +258,7 @@ public class SessionUploadWindow {
}
public void UploadFinished() {
pulsebar.Fraction =1;
label_thanks.Show();
button_close.Sensitive = true;
}
......
......@@ -29,6 +29,7 @@ public class JumpType : EventType
protected bool isRepetitive;
protected bool jumpsLimited;
protected double fixedValue; //0 no fixed value
//0.5 if we want only to registry a TC
protected bool unlimited;
......@@ -113,6 +114,22 @@ public class JumpType : EventType
description = Catalog.GetString("Abalakov Jump with extra weight");
imageFileName = "jump_abk_l.png";
}
} else if(name == Constants.TakeOffName) { //special case, will record only TC
startIn = false;
hasWeight = false;
isRepetitive = false; //for repetitive
jumpsLimited = false; //for repetitive
fixedValue = 0; //for repetitive
description = Catalog.GetString("Take off");
imageFileName = "take_off.png";
} else if(name == Constants.TakeOffWeightName) { //special case, will record only TC
startIn = false;
hasWeight = true;
isRepetitive = false; //for repetitive
jumpsLimited = false; //for repetitive
fixedValue = 0; //for repetitive
description = Catalog.GetString("Take off with weight");
imageFileName = "";
} else if(name == "DJ") {
startIn = false;
hasWeight = false;
......@@ -147,6 +164,17 @@ public class JumpType : EventType
unlimited = true;
description = Catalog.GetString("Reactive Jump unlimited (until finish button is clicked)");
imageFileName = "jump_rj_in.png";
} else if(name == Constants.RunAnalysisName) { //like a Rj(unlimited). but starting out
//Josep Ma Padullés test
startIn = false;
hasWeight = false;
isRepetitive = true;
jumpsLimited = true; //will finish in a concrete jump, not in a concrete second
fixedValue = -1; //don't ask for limit of jumps or seconds
unlimited = true;
description = Catalog.GetString("Run between two photocells recording contact and flight times in contact platform/s.") +
" " + Catalog.GetString("Until finish button is clicked.");
imageFileName = "jump_rj_in.png";
} else if(name == "RJ(hexagon)") {
startIn = true;
hasWeight = false;
......
......@@ -129,6 +129,9 @@ public class Server
if(countPersons == 0)
sessionUploadWin.PulseProgressbar();
//activity on pulsebar
sessionUploadWin.UpdatePulsebar();
if(needUpdateServerSession && !updatingServerSession) {
//prevent that FillData is called again with same data
updatingServerSession = true;
......
......@@ -38,7 +38,7 @@ class SqliteJumpType : Sqlite
dbcmd.CommandText =
"CREATE TABLE " + Constants.JumpTypeTable + " ( " +
"uniqueID INTEGER PRIMARY KEY, " +
"name TEXT, " +
"name TEXT, " + //if name it's Constants.TakeOffName or Constants.TakeOffWeightName it's an exception and will record only one tc
"startIn INT, " + //if it starts inside or outside the platform
"weight INT, " +
"description TEXT )";
......@@ -58,7 +58,9 @@ class SqliteJumpType : Sqlite
"ABK:1:0:ABK jump",
"ABKl:1:1:ABK jump with weight",
"DJ:0:0:DJ jump",
"Rocket:1:0:Rocket jump"
"Rocket:1:0:Rocket jump",
"TakeOff:0:0:Take off",
"TakeOffWeight:0:1:Take off with weight"
};
conversionSubRateTotal = iniJumpTypes.Length;
conversionSubRate = 0;
......@@ -119,7 +121,8 @@ class SqliteJumpType : Sqlite
"RJ(t):0:0:0:0:RJ limited by time",
"RJ(unlimited):1:0:1:-1:Jump unlimited until finish is clicked",
"RJ(hexagon):1:0:1:18:Reactive Jump on a hexagon until three full revolutions are done",
"triple jump:0:0:1:3:Triple jump"
"triple jump:0:0:1:3:Triple jump",
"RunAnalysis:0:0:1:-1:Run between two photocells recording contact and flight times in contact platform/s. Until finish button is clicked."
};
foreach(string myJumpType in iniJumpTypes) {
JumpRjTypeInsert(myJumpType, true);
......
......@@ -72,7 +72,7 @@ class Sqlite
* Important, change this if there's any update to database
* Important2: if database version get numbers higher than 1, check if the comparisons with currentVersion works ok
*/
static string lastChronojumpDatabaseVersion = "0.65";
static string lastChronojumpDatabaseVersion = "0.67";
public Sqlite() {
}
......@@ -841,6 +841,27 @@ class Sqlite
dbcon.Close();
currentVersion = "0.65";
}
if(currentVersion == "0.65") {
dbcon.Open();
SqliteJumpType.JumpRjTypeInsert ("RunAnalysis:0:0:1:-1:Run between two photocells recording contact and flight times in contact platform/s. Until finish button is clicked.", true);
SqlitePreferences.Update ("databaseVersion", "0.66", true);
Log.WriteLine("Converted DB to 0.66 (added RunAnalysis Reactive jump)");
dbcon.Close();
currentVersion = "0.66";
}
if(currentVersion == "0.66") {
dbcon.Open();
SqliteJumpType.JumpTypeInsert ("TakeOff:0:0:Take off", true);
SqliteJumpType.JumpTypeInsert ("TakeOffWeight:0:0:Take off with weight", true);
SqlitePreferences.Update ("databaseVersion", "0.67", true);
Log.WriteLine("Converted DB to 0.67 (added TakeOff jumps)");
dbcon.Close();
currentVersion = "0.67";
}
}
......@@ -959,6 +980,8 @@ class Sqlite
SqliteCountry.initialize();