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

0.8.2.9 doing multiChronopic done sqlite conversion: new db: 0.68 created

0.8.2.9
doing multiChronopic
done sqlite conversion: new db: 0.68
created src/execute/multiChronopic.cs
created src/multiChronopic.cs
created src/sqlite/multiChronopic.cs
created src/treeViewMultiChronopic.cs

Fixed contants chronopic3 name (mistake on last svn ci)

svn path=/trunk/; revision=473
parent a152e104
......@@ -39,13 +39,13 @@ CHRONOJUMP_DEP_STATS = src/statType.cs src/stats/main.cs src/stats/global.cs src
CHRONOJUMP_DEP_GRAPHS = src/stats/graphs/graphData.cs src/stats/graphs/graphSerie.cs src/stats/graphs/global.cs src/stats/graphs/sjCmjAbk.cs src/stats/graphs/sjCmjAbkPlus.cs src/stats/graphs/djIndex.cs src/stats/graphs/djQ.cs src/stats/graphs/rjIndex.cs src/stats/graphs/rjPotencyBosco.cs src/stats/graphs/rjEvolution.cs src/stats/graphs/ieIub.cs src/stats/graphs/fv.cs src/stats/graphs/potency.cs src/stats/graphs/rjAVGSD.cs
CHRONOJUMP_DEP_SQLITE = src/sqlite/main.cs src/sqlite/preferences.cs src/sqlite/person.cs src/sqlite/session.cs src/sqlite/jump.cs src/sqlite/jumpRj.cs src/sqlite/jumpType.cs src/sqlite/run.cs src/sqlite/runInterval.cs src/sqlite/runType.cs src/sqlite/personSession.cs src/sqlite/stat.cs src/sqlite/pulse.cs src/sqlite/pulseType.cs src/sqlite/reactionTime.cs src/sqlite/event.cs src/sqlite/sport.cs src/sqlite/speciallity.cs src/sqlite/country.cs src/sqlite/server.cs
CHRONOJUMP_DEP_SQLITE = src/sqlite/main.cs src/sqlite/preferences.cs src/sqlite/person.cs src/sqlite/session.cs src/sqlite/jump.cs src/sqlite/jumpRj.cs src/sqlite/jumpType.cs src/sqlite/run.cs src/sqlite/runInterval.cs src/sqlite/runType.cs src/sqlite/personSession.cs src/sqlite/stat.cs src/sqlite/pulse.cs src/sqlite/pulseType.cs src/sqlite/reactionTime.cs src/sqlite/multiChronopic.cs src/sqlite/event.cs src/sqlite/sport.cs src/sqlite/speciallity.cs src/sqlite/country.cs src/sqlite/server.cs
CHRONOJUMP_DEP_EXECUTE = src/execute/event.cs src/execute/jump.cs src/execute/run.cs src/execute/pulse.cs src/execute/reactionTime.cs
CHRONOJUMP_DEP_EXECUTE = src/execute/event.cs src/execute/jump.cs src/execute/run.cs src/execute/pulse.cs src/execute/reactionTime.cs src/execute/multiChronopic.cs
CHRONOJUMP_DEP_SERVER = chronojump_server/ChronojumpServer.cs
CHRONOJUMP_DEP = src/chronojump.cs src/person.cs src/event.cs src/eventType.cs src/jump.cs src/jumpType.cs src/run.cs src/runType.cs src/pulse.cs src/pulseType.cs src/reactionTime.cs src/reactionTimeType.cs src/session.cs src/exportSession.cs src/treeViewEvent.cs src/treeViewPerson.cs src/treeViewJump.cs src/treeViewRun.cs src/treeViewPulse.cs src/treeViewReactionTime.cs src/util.cs src/utilGtk.cs src/constants.cs src/report.cs src/updateProgressBar.cs src/prepareEventGraphObjects.cs src/sport.cs src/log.cs src/serverPing.cs src/serverEvaluator.cs src/server.cs $(CHRONOJUMP_DEP_GUI) $(CHRONOJUMP_DEP_STATS) $(CHRONOJUMP_DEP_GRAPHS) $(CHRONOJUMP_DEP_SQLITE) $(CHRONOJUMP_DEP_REPORT) $(CHRONOJUMP_DEP_EXECUTE) $(CHRONOJUMP_DEP_SERVER)
CHRONOJUMP_DEP = src/chronojump.cs src/person.cs src/event.cs src/eventType.cs src/jump.cs src/jumpType.cs src/run.cs src/runType.cs src/pulse.cs src/pulseType.cs src/reactionTime.cs src/reactionTimeType.cs src/multiChronopic.cs src/session.cs src/exportSession.cs src/treeViewEvent.cs src/treeViewPerson.cs src/treeViewJump.cs src/treeViewRun.cs src/treeViewPulse.cs src/treeViewReactionTime.cs src/treeViewMultiChronopic.cs src/util.cs src/utilGtk.cs src/constants.cs src/report.cs src/updateProgressBar.cs src/prepareEventGraphObjects.cs src/sport.cs src/log.cs src/serverPing.cs src/serverEvaluator.cs src/server.cs $(CHRONOJUMP_DEP_GUI) $(CHRONOJUMP_DEP_STATS) $(CHRONOJUMP_DEP_GRAPHS) $(CHRONOJUMP_DEP_SQLITE) $(CHRONOJUMP_DEP_REPORT) $(CHRONOJUMP_DEP_EXECUTE) $(CHRONOJUMP_DEP_SERVER)
RESOURCES_GLADE = -resource:glade/chronojump.glade,chronojump.glade
......
......@@ -48,13 +48,49 @@ required
in execution graph put avgs as horizontal lines
and plot all tests of same type of same person
25 mar 2009
0.8.2.9
doing multiChronopic
done sqlite conversion: new db: 0.68
created src/execute/multiChronopic.cs
created src/multiChronopic.cs
created src/sqlite/multiChronopic.cs
created src/treeViewMultiChronopic.cs
count time(s) cp change diff same cp diff all cp
1 10 1 IN 10 10
2 15 2 IN 15 5
3 20 1 OUT 10 5
3 20 3 IN 20 0
4 25 2 OUT 10 5
5 30 3 OUT 10 5
6 60 1 IN 40 30
7 65 2 IN 40 5
8 70 3 IN 40 5
do like this:
state time change time IN-IN time OUT-OUT
count time(s) cp1 cp2 cp3 cp1 cp2 cp3 cp1 cp2 cp3 cp1 cp2 cp3
0 0 OUT OUT OUT
1 10 IN 10
2 15 IN 15
3 20 OUT IN 10 20 20
4 25 OUT 10 25
5 30 OUT 10 30
6 60 IN 40 50
7 65 IN 40 50
8 70 IN 40 50
Fixed contants chronopic3 name (mistake on last svn ci)
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)
RunAnalysis done (only remains to export, report ok) update: but needs to be
redone as a new treeview
db 0.66
Added a pulsebar (activity) on upload session
......
This diff is collapsed.
......@@ -65,6 +65,7 @@ public class Constants
public const string TempRunIntervalTable = "tempRunInterval";
public const string PulseTable = "pulse";
public const string ReactionTimeTable = "reactionTime";
public const string MultiChronopicTable = "multiChronopic";
//tests types
public const string JumpTypeTable = "jumpType";
......@@ -94,7 +95,7 @@ public class Constants
public const string ChronometerCp1 = "Chronopic1";
public const string ChronometerCp2 = "Chronopic2";
public const string ChronometerCp3 = "Chronopic32";
public const string ChronometerCp3 = "Chronopic3";
public static string [] Chronometers = {
UndefinedDefault,
ChronometerCp1,
......
......@@ -145,7 +145,6 @@ public class EventExecute
simulatedCurrentTimeIntervalsAreContact = false;
}
//protected virtual Chronopic.Plataforma chronopicInitialValue(Chronopic cp)
protected Chronopic.Plataforma chronopicInitialValue(Chronopic cp)
{
Chronopic.Plataforma myPlatformState = Chronopic.Plataforma.UNKNOW; //on (in platform), off (jumping), or unknow
......@@ -220,7 +219,7 @@ public class EventExecute
//onTimer allow to update progressbar_time every 50 milliseconds
//also can change platform state in simulated mode
//protected void onTimer( Object source, ElapsedEventArgs e )
protected void onTimer( )
protected virtual void onTimer( )
{
timerCount = timerCount + .05; //0,05 segons == 50 milliseconds, time between each call of onTimer
......
......@@ -601,7 +601,6 @@ public class JumpRjExecute : JumpExecute
//if chronopic signal is Ok and state has changed
if (ok && (
(platformState == Chronopic.Plataforma.ON && loggedState == States.OFF) ||
//(platformState == Chronopic.Plataforma.OFF && loggedState == States.ON) ) ) {
(platformState == Chronopic.Plataforma.OFF && loggedState == States.ON) )
&& !cancel && !finish) {
......@@ -916,6 +915,8 @@ public class JumpRjExecute : JumpExecute
double speed = (fall /10) / Util.GetTotalTime(tcString, tvString);
/*
* Josep Ma Padullés test
*
string tcStringWithoutFirst = Util.DeleteFirstSubEvent(tcString);
string tvStringWithoutFirst = Util.DeleteFirstSubEvent(tvString);
......
/*
* This file is part of ChronoJump
*
* ChronoJump is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* ChronoJump is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Xavier de Blas:
*/
using System;
using System.Data;
using System.Text; //StringBuilder
using System.Threading;
using System.IO.Ports;
using Mono.Unix;
public class MultiChronopicExecute : EventExecute
{
//better as private and don't inherit, don't know why
//protected Chronopic cp;
private Chronopic cp;
//2nd Chronopic stuff
protected Thread thread2;
SerialPort sp2;
private Chronopic cp2;
private Chronopic.Plataforma platformState2;
protected States loggedState2;
private string port2;
//3rd Chronopic stuff
protected Thread thread3;
SerialPort sp3;
private Chronopic cp3;
private Chronopic.Plataforma platformState3;
protected States loggedState3;
private string port3;
//4th Chronopic stuff
protected Thread thread4;
SerialPort sp4;
private Chronopic cp4;
private Chronopic.Plataforma platformState4;
protected States loggedState4;
private string port4;
static bool firstValue = true;
public MultiChronopicExecute() {
}
//jump execution
public MultiChronopicExecute(Chronopic cp, Gtk.Statusbar appbar, Gtk.Window app, string port2)
{
this.cp = cp;
this.appbar = appbar;
this.app = app;
this.port2 = port2;
fakeButtonFinished = new Gtk.Button();
simulated = false;
}
public override void SimulateInitValues(Random randSent)
{
}
//onTimer allow to update progressbar_time every 50 milliseconds
//also can change platform state in simulated mode
//protected void onTimer( Object source, ElapsedEventArgs e )
protected override void onTimer( )
{
timerCount = timerCount + .05; //0,05 segons == 50 milliseconds, time between each call of onTimer
/* this will be good for not continue counting the time on eventWindow when event has finished
* this will help to sync chronopic data with the timerCount data
* later also, copy the value of the chronopic to the timerCount label
*/
/*
//updateTimeProgressBar();
if(needEndEvent) {
eventExecuteWin.EventEnded();
//needEndEvent = false;
} else
updateTimeProgressBar();
if(simulated) {
eventSimulatedShouldChangePlatform();
}
if(needUpdateEventProgressBar) {
//update event progressbar
eventExecuteWin.ProgressBarEventOrTimePreExecution(
updateProgressBar.IsEvent,
updateProgressBar.PercentageMode,
updateProgressBar.ValueToShow
);
needUpdateEventProgressBar = false;
}
if(needUpdateGraph) {
updateGraph();
needUpdateGraph = false;
}
if(needSensitiveButtonFinish) {
eventExecuteWin.ButtonFinishMakeSensitive();
needSensitiveButtonFinish = false;
}
//check if it should finish by time
if(shouldFinishByTime()) {
finish = true;
updateProgressBarForFinish();
}
//else
// updateTimeProgressBar();
*/
}
//private bool connectChronopic2(string myPort)
private bool connectOtherChronopics(Chronopic myCp, SerialPort mySp, Chronopic.Plataforma myPS, string myPort)
{
bool success = false;
try {
Log.WriteLine(string.Format("chronopic port: {0}", myPort));
mySp = new SerialPort(myPort);
mySp.Open();
//-- Create chronopic object, for accessing chronopic
myCp = new Chronopic(mySp);
//-- Obtener el estado inicial de la plataforma
bool ok=false;
do
ok=myCp.Read_platform(out myPS);
while(!ok);
if (!ok) {
//-- Si hay error terminar
Log.WriteLine(string.Format("Error: {0}", myCp.Error));
success = false;
}
} catch {
success = false;
}
return success;
}
public override void Manage()
{
connectOtherChronopics(cp2, sp2, platformState2, port2);
//connectOtherChronopics(cp3, sp3, platformState3, port3);
//connectOtherChronopics(cp4, sp4, platformState4, port4);
platformState = chronopicInitialValue(cp);
platformState2 = chronopicInitialValue(cp2);
//platformState3 = chronopicInitialValue(cp3);
//platformState4 = chronopicInitialValue(cp4);
string cpStr = "";
string cp2Str = "";
//3
//4
if (platformState==Chronopic.Plataforma.ON) {
cpStr = "cp1" + " " + "IN";
loggedState = States.ON;
} else {
cpStr = "cp1" + " " + "OUT";
loggedState = States.OFF;
}
if (platformState2==Chronopic.Plataforma.ON) {
cp2Str = "cp2" + " " + "IN";
loggedState2 = States.ON;
} else {
cp2Str = "cp2" + " " + "OUT";
loggedState2 = States.OFF;
}
//3
//4
appbar.Push( 1, cpStr + " / " + cp2Str);
//start thread
//Log.Write("Start thread");
thread = new Thread(new ThreadStart(waitEvent));
thread2 = new Thread(new ThreadStart(waitEvent2));
//3
//4
GLib.Idle.Add (new GLib.IdleHandler (PulseGTK));
thread.Start();
thread2.Start();
//3
//4
}
protected override void waitEvent ()
{
double timestamp = 0;
bool success = false;
bool ok;
do {
ok = cp.Read_event(out timestamp, out platformState);
//if chronopic signal is Ok and state has changed
if (ok && (
(platformState == Chronopic.Plataforma.ON && loggedState == States.OFF) ||
(platformState == Chronopic.Plataforma.OFF && loggedState == States.ON) )
&& !cancel && !finish) {
//while no finished time or jumps, continue recording events
if ( ! success) {
//don't record the time until the first event
if (firstValue) {
firstValue = false;
//but start timer
initializeTimer();
} else {
if(platformState == Chronopic.Plataforma.ON && loggedState == States.OFF)
Log.WriteLine("cp1 landed");
else if(platformState == Chronopic.Plataforma.OFF && loggedState == States.ON)
Log.WriteLine("cp1 jumped");
needSensitiveButtonFinish = true;
}
}
if(platformState == Chronopic.Plataforma.OFF)
loggedState = States.OFF;
else
loggedState = States.ON;
}
} while ( ! success && ! cancel && ! finish );
if (finish) {
totallyFinished = true;
}
if(cancel) {
//event will be raised, and managed in chronojump.cs
fakeButtonFinished.Click();
totallyCancelled = true;
}
}
private void waitEvent2 ()
{
double timestamp = 0;
bool success = false;
bool ok;
do {
ok = cp2.Read_event(out timestamp, out platformState2);
//if chronopic signal is Ok and state has changed
if (ok && (
(platformState2 == Chronopic.Plataforma.ON && loggedState2 == States.OFF) ||
(platformState2 == Chronopic.Plataforma.OFF && loggedState2 == States.ON) )
&& !cancel && !finish) {
//while no finished time or jumps, continue recording events
if ( ! success) {
//don't record the time until the first event
if (firstValue) {
firstValue = false;
//but start timer
initializeTimer();
} else {
if(platformState2 == Chronopic.Plataforma.ON && loggedState2 == States.OFF)
Log.WriteLine("cp2 landed");
else if(platformState2 == Chronopic.Plataforma.OFF && loggedState2 == States.ON)
Log.WriteLine("cp2 jumped");
needSensitiveButtonFinish = true;
}
}
if(platformState2 == Chronopic.Plataforma.OFF)
loggedState2 = States.OFF;
else
loggedState2 = States.ON;
}
} while ( ! success && ! cancel && ! finish );
if (finish) {
totallyFinished = true;
}
if(cancel) {
//event will be raised, and managed in chronojump.cs
fakeButtonFinished.Click();
totallyCancelled = true;
}
}
protected override bool shouldFinishByTime() {
return false; //this kind of events (simple or Dj jumps) cannot be finished by time
}
protected override void updateTimeProgressBar() {
/*
//has no finished, but move progressbar time
eventExecuteWin.ProgressBarEventOrTimePreExecution(
false, //isEvent false: time
false, //activity mode
-1 //don't want to show info on label
);
*/
}
protected override void write()
{
}
~MultiChronopicExecute() {}
}
......@@ -41,6 +41,7 @@ public class ChronoJumpWindow
[Widget] Gtk.TreeView treeview_runs_interval;
[Widget] Gtk.TreeView treeview_reaction_times;
[Widget] Gtk.TreeView treeview_pulses;
[Widget] Gtk.TreeView treeview_multi_chronopic;
[Widget] Gtk.Box hbox_combo_jumps;
[Widget] Gtk.Box hbox_combo_jumps_rj;
[Widget] Gtk.Box hbox_combo_runs;
......@@ -182,6 +183,8 @@ public class ChronoJumpWindow
[Widget] Gtk.MenuItem menuitem_run_interval_mtgug;
[Widget] Gtk.MenuItem menuitem_run_analysis;
[Widget] Gtk.Entry entry_multi_chronopic_cp2;
[Widget] Gtk.Button button_edit_current_person;
[Widget] Gtk.MenuItem menuitem_edit_current_person;
[Widget] Gtk.MenuItem menuitem_delete_current_person_from_session;
......@@ -251,6 +254,9 @@ public class ChronoJumpWindow
//pulses
private TreeStore treeview_pulses_store;
private TreeViewPulses myTreeViewPulses;
//multiChronopic
private TreeStore treeview_multi_chronopic_store;
private TreeViewMultiChronopic myTreeViewMultiChronopic;
//preferences variables
private static string chronopicPort;
......@@ -435,13 +441,14 @@ public class ChronoJumpWindow
loadPreferences ();
preferencesLoaded = true;
createTreeView_persons(treeview_persons);
createTreeView_jumps(treeview_jumps);
createTreeView_jumps_rj(treeview_jumps_rj);
createTreeView_runs(treeview_runs);
createTreeView_runs_interval(treeview_runs_interval);
createTreeView_reaction_times(treeview_reaction_times);
createTreeView_pulses(treeview_pulses);
createTreeView_persons (treeview_persons);
createTreeView_jumps (treeview_jumps);
createTreeView_jumps_rj (treeview_jumps_rj);
createTreeView_runs (treeview_runs);
createTreeView_runs_interval (treeview_runs_interval);
createTreeView_reaction_times (treeview_reaction_times);
createTreeView_pulses (treeview_pulses);
createTreeView_multi_chronopic (treeview_multi_chronopic);
createComboJumps();
createComboJumpsRj();
......@@ -801,6 +808,13 @@ Log.WriteLine("+++++++++++++++++ 7 ++++++++++++++++");
Pulse myPulse = SqlitePulse.SelectPulseData( myTreeViewPulses.EventSelectedID );
treeviewPulsesContextMenu(myPulse);
}
} else if(myTv == treeview_multi_chronopic) {
/*
if (myTreeViewPulses.EventSelectedID > 0) {
Pulse myPulse = SqlitePulse.SelectPulseData( myTreeViewPulses.EventSelectedID );
treeviewPulsesContextMenu(myPulse);
}
*/
} else
Log.WriteLine(myTv.ToString());
}
......@@ -1506,6 +1520,34 @@ Log.WriteLine("+++++++++++++++++ 7 ++++++++++++++++");
myMenu.ShowAll();
}
/* ---------------------------------------------------------
* ---------------- TREEVIEW MULTI CHRONOPIC --------------
* --------------------------------------------------------
*/
private void createTreeView_multi_chronopic (Gtk.TreeView tv) {
//myTreeViewMultiChronopic is a TreeViewMultiChronopic instance
myTreeViewMultiChronopic = new TreeViewMultiChronopic( tv, prefsDigitsNumber, TreeViewEvent.ExpandStates.MINIMIZED );
//the glade cursor_changed does not work on mono 1.2.5 windows
// tv.CursorChanged += on_treeview_multi_chronopic_cursor_changed;
}
private void on_button_multi_chronopic_start_clicked (object o, EventArgs args) {
//TODO: check this is ok: entry_multi_chronopic_cp2);
currentEventExecute = new MultiChronopicExecute(cp, appbar2, app1,
"/dev/tty" + entry_multi_chronopic_cp2.Text);
currentEventExecute.Manage();
currentEventExecute.FakeButtonFinished.Clicked += new EventHandler(on_multi_chronopic_finished);
}
private void on_multi_chronopic_finished (object o, EventArgs args) {
currentEventExecute.FakeButtonFinished.Clicked -= new EventHandler(on_multi_chronopic_finished);
}
/* ---------------------------------------------------------
......@@ -2290,6 +2332,7 @@ Log.WriteLine("+++++++++++++++++ 7 ++++++++++++++++");
createTreeView_runs_interval (treeview_runs_interval);
createTreeView_pulses(treeview_pulses);
createTreeView_reaction_times(treeview_reaction_times);
createTreeView_multi_chronopic(treeview_multi_chronopic);
on_combo_jumps_changed(combo_jumps, args);
on_combo_jumps_rj_changed(combo_jumps_rj, args);
......
......@@ -29,7 +29,6 @@ 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;
......
/*
* This file is part of ChronoJump
*
* ChronoJump is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* ChronoJump is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Xavier de Blas:
*/
using System;
using System.Data;
public class MultiChronopic : Event
{
private string cp1InStr;
private string cp1OutStr;
private string cp2InStr;
private string cp2OutStr;
private string cp3InStr;
private string cp3OutStr;
private string cp4InStr;
private string cp4OutStr;
public MultiChronopic() {
}
//after inserting database (SQL)
public MultiChronopic(int uniqueID, int personID, int sessionID,
string cp1InStr, string cp1OutStr,
string cp2InStr, string cp2OutStr,
string cp3InStr, string cp3OutStr,
string cp4InStr, string cp4OutStr,
string description, int simulated)
{
this.uniqueID = uniqueID;
this.personID = personID;
this.sessionID = sessionID;
this.cp1InStr = cp1InStr;
this.cp1OutStr = cp1OutStr;
this.cp2InStr = cp2InStr;
this.cp2OutStr = cp2OutStr;
this.cp3InStr = cp3InStr;
this.cp3OutStr = cp3OutStr;
this.cp4InStr = cp4InStr;
this.cp4OutStr = cp4OutStr;
this.description = description;
this.simulated = simulated;
}
/*
//used to select a event at SqliteReactionTime.SelectReactionTimeData and at Sqlite.convertTables
public MultiChronopic(string [] eventString) {
this.uniqueID = Convert.ToInt32(eventString[0]);
this.personID = Convert.ToInt32(eventString[1]);
this.sessionID = Convert.ToInt32(eventString[2]);
//this.type = eventString[3].ToString();
this.time = Convert.ToDouble(Util.ChangeDecimalSeparator(eventString[4]));
this.description = eventString[5].ToString();
this.simulated = Convert.ToInt32(eventString[6]);
}
*/
public override int InsertAtDB (bool dbconOpened, string tableName) {
return SqliteMultiChronopic.Insert(dbconOpened, tableName,
uniqueID.ToString(),
personID, sessionID,
"default", //type
cp1InStr, cp1OutStr,
cp2InStr, cp2OutStr,
cp3InStr, cp3OutStr,
cp4InStr, cp4OutStr,
description, simulated);
}
~MultiChronopic() {}
}
......@@ -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.67";
static string lastChronojumpDatabaseVersion = "0.68";
public Sqlite() {
}
......@@ -442,6 +442,7 @@ class Sqlite
SqliteRunInterval sqliteRunIntervalObject = new SqliteRunInterval();
SqliteReactionTime sqliteReactionTimeObject = new SqliteReactionTime();
SqlitePulse sqlitePulseObject = new SqlitePulse();
SqliteMultiChronopic sqliteMultiChronopicObject = new SqliteMultiChronopic();
if(currentVersion == "0.41") {
dbcon.Open();
......@@ -862,6 +863,17 @@ class Sqlite
dbcon.Close();
currentVersion = "0.67";
}
if(currentVersion == "0.67") {
dbcon.Open();
sqliteMultiChronopicObject.createTable(Constants.MultiChronopicTable);
SqlitePreferences.Update ("databaseVersion", "0.68", true);
Log.WriteLine("Converted DB to 0.68 (added multiChronopic tests table)");
dbcon.Close();
currentVersion = "0.68";
}
}
......@@ -890,7 +902,7 @@ class Sqlite
{
dbcon.Open();
creationTotal = 12;
creationTotal = 13;
creationRate = 1;
SqliteServer sqliteServerObject = new SqliteServer();
......@@ -960,6 +972,11 @@ class Sqlite
SqlitePulseType.createTablePulseType();
SqlitePulseType.initializeTablePulseType();
//multiChronopic tests
creationRate ++;
SqliteMultiChronopic sqliteMultiChronopicObject = new SqliteMultiChronopic();
sqliteMultiChronopicObject.createTable(Constants.MultiChronopicTable);
//sports
creationRate ++;
SqliteSport.createTable();
......@@ -980,6 +997,7 @@ class Sqlite
SqliteCountry.initialize();
//changes [from - to - desc]
//0.67 - 0.68 added multiChronopic tests table
//0.66 - 0.67 added TakeOff jumps
//0.65 - 0.66 added run analysis (JumpRj test (masked as run interval))
//0.64 - 0.65 added Sevaluator on client
......
/*
* This file is part of ChronoJump
*
* ChronoJump is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.