Commit f2811f09 authored by Cody Ede (cme527)'s avatar Cody Ede (cme527)
Browse files

Jank Logging is Working

parent 8d3a2032
......@@ -122,6 +122,7 @@ function Experiment(options) {
var blockNumber = 0;
var correctTotal = 0;
var correctArr = [];
var averageStuff = [];
var started = false;
......@@ -141,12 +142,24 @@ Experiment.prototype.tempLog = function(count, tries) {
for (var i = 0; i < correctArr.length; i++) {
correctTotal += correctArr[i];
};
console.log("This is the block " + blockNumber);
console.log("This is the Final Average " + correctTotal/correctArr.length*100);
// console.log("This is the block " + blockNumber);
// console.log("This is the Final Average " + correctTotal/correctArr.length*100);
averageStuff.push(correctTotal/correctArr.length*100);
while(countArr.length){countArr.pop()};
while(correctArr.length) {correctArr.pop()};
correctTotal = 0;
for (var i = 0; i < averageStuff.length; i++) {
StudyLogger.logEvent({type: 'Blk AV',
Average: averageStuff[i],
block: i + 1});
};
}
};
Experiment.prototype.printLog = function () {
};
......
......@@ -116,8 +116,7 @@ LearningExperiment.prototype.generateTrials = function(seed) {
trials.push(new DoneTrial(this, {
message: Strings['experiment-complete']
}));
Experiment.prototype.tempLog(0,0);
return trials;
};
......
......@@ -56,7 +56,7 @@ this.ShortCutPerformed = function(keyPress) {
var correct = 0;
console.log("MID Correct " + correct);
this.experiment.fastTapMenu.menuOpen = false;
this.experiment.fastTapMenu.flashAround(undefined,keyPress.value);
this.experiment.fastTapMenu.logPressEvent(keyPress.value);
......@@ -67,7 +67,6 @@ this.ShortCutPerformed = function(keyPress) {
// the stimulus
count++;
correct++;
console.log("Post Correct " + correct);
StudyLogger.logEvent({type: 'event.endtrial',
trialtype: this.type,
trialid: this.trialid,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment