Skip to content

Commit

Permalink
fixed error rate bug
Browse files Browse the repository at this point in the history
  • Loading branch information
adildsw committed Oct 4, 2023
1 parent 97486cd commit 26b4c61
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ def check_data_path():
if args.resultsview == 0:
resultsview = False

app.run(host=args.ip, port=args.port)
app.run(host=args.ip, port=args.port, debug=True)
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ <h4 class="ui horizontal divider header">
</div>
<div class="field" title="Supports multiple comma-separated values">
<label>Width (W)</label>
<input id="width" placeholder="Session Code" type="text" value="100">
<input id="width" placeholder="Session Code" type="text" value="50">
</div>
<div class="field">
<label>Number of Targets (n)</label>
Expand Down
4 changes: 1 addition & 3 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@ function generateTaskSequence(a_list, w_list, n) {
}

function generateUncalibratedTaskSequence(a_list, w_list, n) {

// Creating an array with a cross product of a_list and w_list
var taskSequence = [];
for (var i = 0; i < a_list.length; i++) {
Expand Down Expand Up @@ -554,7 +553,6 @@ function renderInfoText() {
textAlign(LEFT);
text("Task " + (taskIdx + 1) + " of " + tasks.length, width - 400, 50);
textFont(robotoLightFont);
console.log(tasks, uncalibratedTasks);
text("Amplitude " + uncalibratedTasks[taskIdx].A + " | Width " + uncalibratedTasks[taskIdx].W, width - 400, 85);
}

Expand Down Expand Up @@ -610,7 +608,7 @@ function computeClickData(clickPos) {
var sourceClickDist = sqrt(pow(clickPos.x - sourcePos.x, 2) + pow(clickPos.y - sourcePos.y, 2));
var targetClickDist = sqrt(pow(clickPos.x - targetPos.x, 2) + pow(clickPos.y - targetPos.y, 2));
var dx = (pow(sourceClickDist, 2) - pow(targetClickDist, 2) - pow(sourceTargetDist, 2)) / (2 * sourceTargetDist);
var isIncorrect = isClickCorrect(A, W, n, getTargetIdxFromClickNumber(clickNumber, n), clickPos) ? 0 : 1;
var isIncorrect = isClickCorrect(tasks[taskIdx].A, tasks[taskIdx].W, n, getTargetIdxFromClickNumber(clickNumber, n), clickPos) ? 0 : 1;

var data = [];
data.push(participantCode);
Expand Down

0 comments on commit 26b4c61

Please sign in to comment.