# HG changeset patch # User Jeremy Gow # Date 1352829631 0 # Node ID 01926bcd601676623c7361583f5272a96ede10e9 # Parent ec628e1d70d112b616456d17724197a26d50b8bd Add debug command line option diff -r ec628e1d70d1 -r 01926bcd6016 Experiment.class Binary file Experiment.class has changed diff -r ec628e1d70d1 -r 01926bcd6016 Experiment.java --- a/Experiment.java Tue Nov 13 17:36:19 2012 +0000 +++ b/Experiment.java Tue Nov 13 18:00:31 2012 +0000 @@ -73,7 +73,7 @@ private int midiDevice; /* debugging */ - private boolean debug = false; + private boolean debug; /* accessors */ public boolean getDebug() { return debug; } @@ -104,12 +104,10 @@ } /* Constructor */ - public Experiment (int sc, int cu, int nu, int sl, int md, String la, String ha, String mfd, String inf, String rdr, int fam, int lik, int quest) { + public Experiment (int sc, int cu, int nu, int sl, int md, String la, String ha, String mfd, String inf, String rdr, int fam, int lik, int quest, int de) { - if (debug) - displayMIDIDevices(); - // Setup variables + debug = (de != 0); results = new SubjectResults(this); if (sc == 0) showClock = false; @@ -142,6 +140,9 @@ else finalQuestionnaire = true; + if (debug) + displayMIDIDevices(); + // Initialise the experiment Block practice = new Block(this, gui, PRACTICE_MIDIFILELIST_FILE, "Practice", false); @@ -197,7 +198,7 @@ " " + " " + " " + - "" + "" + ""); + "" + "" + "" + ""); System.exit(1); } @@ -216,9 +217,10 @@ int fam = Integer.parseInt(args[n++]); int lik = Integer.parseInt(args[n++]); int quest = Integer.parseInt(args[n++]); + int de = Integer.parseInt(args[n++]); // Create experiment - Experiment exp = new Experiment(sc, cu, nu, sl, md, la, ha, mfd, inf, rdr, fam, lik, quest); + Experiment exp = new Experiment(sc, cu, nu, sl, md, la, ha, mfd, inf, rdr, fam, lik, quest, de); // Show the GUI int width=(int)Toolkit.getDefaultToolkit().getScreenSize().getWidth();