Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
BarbourSmith committed May 22, 2024
1 parent e0c09d2 commit f91f7ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions www/js/calculatesCalibrationStuff.js
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ function findMaxFitness(measurements) {
else{
var messagesBox = document.getElementById('messages')

if(1/bestGuess.fitness < 0.5){
if(1/bestGuess.fitness < acceptableCalibrationThreshold){
messagesBox.value += '\nWARNING FITNESS TOO LOW. DO NOT USE THESE CALIBRATION VALUES!';
}

Expand All @@ -563,7 +563,7 @@ function findMaxFitness(measurements) {
messagesBox.scrollTop
messagesBox.scrollTop = messagesBox.scrollHeight;

if(1/bestGuess.fitness > 0.5){
if(1/bestGuess.fitness > acceptableCalibrationThreshold){
sendCommand('$/Maslow_tlX=' + bestGuess.tl.x.toFixed(1));
sendCommand('$/Maslow_tlY=' + bestGuess.tl.y.toFixed(1));
sendCommand('$/Maslow_trX=' + bestGuess.tr.x.toFixed(1));
Expand Down
1 change: 0 additions & 1 deletion www/js/tablet.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,6 @@ function tabletShowMessage(msg, collecting) {
}
if (msg.startsWith('$/Maslow_Acceptable_Calibration_Threshold')) {
acceptableCalibrationThreshold = parseFloat(msg.substring(42, msg.length))
console.log('Acceptable Calibration Threshold: ' + acceptableCalibrationThreshold)
return;
}
if (msg.startsWith('error:')) {
Expand Down

0 comments on commit f91f7ef

Please sign in to comment.