Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing #44

Merged
merged 2 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions experiment/simulation/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,23 @@
stroke: red !important;
stroke-width: 4 !important;
}
#delete-btn {
display: block;
margin: 1px auto 1px 20px;
#delete-btn {


/* padding: 10px; */
background-color: red;
color: white;
border: none;
cursor: pointer;
}


#btnVideo {
background-color: red;
color: white;
border: none;
cursor: pointer;

}

.dot {
fill: blue;
Expand Down
Binary file added experiment/simulation/images/amplifier1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 24 additions & 24 deletions experiment/simulation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,26 @@

}

.btn1 {
margin-left:10px;
margin-right: 10px;
float:right;
margin-bottom:10px;
padding: 7px;
border:none;
border-radius: 5px;
}

.button1 {
background-color: #004A7F;
-webkit-border-radius: 10px;
border-radius: 10px;
border-radius: 5px;
border: none;
color: #FFFFFF;
cursor: pointer;
display: inline-block;
font-family: Arial;
font-size: 15px;
padding: 5px 10px;
font-size: 15px;
text-align: center;
text-decoration: none;
-webkit-animation: glowing 1500ms infinite;
Expand Down Expand Up @@ -107,11 +116,9 @@



<div class="row container" id = "rowHide" style="margin-top:10px;">

<div class="col-sm-1">
</div>
<div class="col-sm-3">
<div class="row container-fluid" id = "rowHide" style="margin-top:10px;">

<div class="col-sm-2">
<label for="sel1" style="margin-top:5px;">Select type of load cell : </label>
</div>

Expand All @@ -124,25 +131,18 @@
</select>
</div>





<!-- <label for="sel1">Select list (select one):</label> -->


<div class="col-sm-2">
<button type="button" id="delete-btn" class="btn btn-danger" data-dismiss="modal" style="margin-bottom:10px;" hidden>Delete Selected</button>
</div>
<div class="col-sm-7">
<button type="button" id="delete-btn" class="btn btn-danger btn1" hidden>Delete Selected</button>

<div class="col-sm-2">
<button type="button" id="validateCon" class="btn-info" data-dismiss="modal" data-toggle="modal" data-target="#myModal" style="margin-bottom:10px;" hidden>Validate Connection</button>
</div>
<button type="button" id="validateCon" class="btn btn-info btn1" data-dismiss="modal" data-toggle="modal" data-target="#myModal" hidden>Validate Connection</button>

<div class="col-sm-1">
<button type="button" class="btn btn-danger btnMarin button1" data-toggle="modal" style="margin-bottom:10px;" data-target="#exampleModal1" id = "btnForModal">
<button type="button" class="btn btn-danger btn1 button1" data-toggle="modal" data-target="#exampleModal1" id = "btnForModal" >
Procedure
</button>

<button type="button" id = "btnVideo" class="btn btn-danger btn1" data-toggle="modal" data-target="#exampleModal1" >
Simulation Demo
</button>
</div>
</div>

Expand All @@ -153,7 +153,7 @@
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header1" >
<h3 class="modal-title1" id="exampleModalLabel">Procedure</h3>
<h3 class="modal-title1" id="exampleModalLabel" style="color:#fff;">Procedure</h3>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
Expand Down
63 changes: 55 additions & 8 deletions experiment/simulation/src/graphPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,21 @@ tableMainDiv = '<div class="col-sm-12">'


$("#canvas-div-sub").html(htm);

var htm11 = '<img src="images/amplifier.png" class="img-responsive">'
$("#main-div-conf11").append(htm11);
typeCell = $("#typeCell").val();
var htm11 = '';
if(typeCell==15){
// wheatStoneCon();
htm11 = '<img src="images/amplifier.png" class="img-responsive">'
$("#main-div-conf11").append(htm11);
console.log("columnType");
}else if(typeCell==25){
// wheatStoneCon();
htm11 = '<img src="images/amplifier1.png" class="img-responsive">'
console.log("cantilever");
$("#main-div-conf11").append(htm11);
}

// $("#main-div-conf11").append(htm11);


var loadErrVal=0;
Expand Down Expand Up @@ -500,9 +512,20 @@ tableMainDiv = '<div class="col-sm-12">'
// sensitivityCal = sensitivityCal.toFixed(2);

var sensitivityCal1 = (ranVal1/selValue).toFixed(4);
var sensitivityCal2 = (sensitivityCal1*1000).toFixed(4);
var sensitivityCal2 = 0;
typeCell = $("#typeCell").val();
if(typeCell==15){
// wheatStoneCon();
sensitivityCal2 = (sensitivityCal1*1000).toFixed(4);
sensitivityCal = parseFloat(sensitivityCal2);
}else if(typeCell==25){
// wheatStoneCon();
sensitivityCal2 = (sensitivityCal1*10).toFixed(4);
sensitivityCal = parseFloat(sensitivityCal2);
}


sensitivityCal = parseFloat(sensitivityCal2);


var senseEnter = $("#sensitivity").val();

Expand Down Expand Up @@ -711,8 +734,19 @@ tableMainDiv = '<div class="col-sm-12">'

$("#canvas-div-sub").html(htm);

var htm11 = '<img src="images/amplifier.png" class="img-responsive">'
$("#main-div-conf11").append(htm11);
typeCell = $("#typeCell").val();
var htm11 = '';
if(typeCell==15){
// wheatStoneCon();
htm11 = '<img src="images/amplifier.png" class="img-responsive">'
$("#main-div-conf11").append(htm11);
console.log("columnType");
}else if(typeCell==25){
// wheatStoneCon();
htm11 = '<img src="images/amplifier1.png" class="img-responsive">'
console.log("cantilever");
$("#main-div-conf11").append(htm11);
}

var loadErrVal=0;
var selValue = 0;
Expand Down Expand Up @@ -851,7 +885,20 @@ tableMainDiv = '<div class="col-sm-12">'
$("#submitSensitivityCheck").click(function(){
$("body").css("padding","0px 0px 0px 0px");
var sensitivityCal1 = (ranVal1/selValue).toFixed(4);
var sensitivityCal2 = (sensitivityCal1*1000).toFixed(4);
var sensitivityCal2;
typeCell = $("#typeCell").val();
if(typeCell==15){
// wheatStoneCon();
sensitivityCal2 = (sensitivityCal1*1000).toFixed(4);
sensitivityCal = parseFloat(sensitivityCal2);
}else if(typeCell==25){
// wheatStoneCon();
sensitivityCal2 = (sensitivityCal1*10).toFixed(4);
sensitivityCal = parseFloat(sensitivityCal2);
}



// sensitivityCal = sensitivityCal.toFixed(2);
sensitivityCal = parseFloat(sensitivityCal2);

Expand Down
4 changes: 2 additions & 2 deletions experiment/simulation/src/questions.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

counterMasterJson = {};
var ansCount = 0;

var typeCell = 0;

$( "#typeCell" ).on( "change", function() {
$("#typeCell").prop('disabled', true);
Expand Down Expand Up @@ -150,7 +150,7 @@ $( "#typeCell" ).on( "change", function() {


}
var typeCell;

$('#nextLevelConfig').on('click', function() {

// if(ansCount != 0){
Expand Down
2 changes: 1 addition & 1 deletion experiment/simulation/src/result.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ let chart = Highcharts.chart('graph-div', {
type: 'pie'
},
title: {
text: 'Observations'
text: ''
},
series: [{
name: 'Observed',
Expand Down
Loading