Skip to content

Commit

Permalink
ALL WORKING HOPEFULLY
Browse files Browse the repository at this point in the history
  • Loading branch information
stephensm authored and stephensm committed Jul 30, 2013
1 parent 709e2c8 commit 06f761c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
12 changes: 5 additions & 7 deletions perfectSteak.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,16 @@ var perfectSteak = function (div) {
};

//add to on click and calculate(blah,blah,blah, meatType)
var meatType = $("input[type='radio'][name='rate']:checked").val();
var meatType = $("input[type='radio'][name='meat']:checked").attr('id');
console.log(meatType);
//THIS WILL COOK THE STEAK IF WE HAVE VALID INPUTS
if (OKtoCook==true){
var steak = [model.data[0][1]];
for (var m = 0; m < parseFloat($("#thicknessInp").val()) * 10; m++) {
steak.push(parseFloat($("#steakTemp").val()))
}
steak.push(model.data[0][2]);
calculate(model.data, $("input[type='radio'][name='rate']:checked").val()||steak)
calculate(model.data, steak,meatType)
}
});
}
Expand Down Expand Up @@ -277,15 +278,12 @@ var perfectSteak = function (div) {
var thicknessInp = ($("<div id=thickInpDiv><input type='text' id='thicknessInp' value='6'></input> Meat Thickness (cm) </div>"));
var steakTemp = ($("<div id=tempInpDiv><input type='text' id='steakTemp' value='23'></input>Initial Meat Temperature (&#176;C)</div>"));
//Item to hold inputs of meat. Append meatInput to your display
var meatInput=$('<form id="meatInp">What color type of meat are you cooking?<br>'
var meatInput=$('<form id="meatInp">What type of meat are you cooking?<br>'
+'<input type="radio" name="meat" id="Steak">Steak<br>'
+'<input type="radio" name="meat" id="Tuna">Tuna<br>'
+'<input type="radio" name="meat" id="Turkey">Turkey<br>'
+'<input type="radio" name="meat" id="Tofu">Tofu</form>');

// thicknessInp.change(function(){
// model.changethickness(thicknessInp.val());
// })


div.append(thicknessInp, steakTemp, meatInput);
};
Expand Down
7 changes: 3 additions & 4 deletions sample.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
var calculate=function(data,steak){
var meatType="fish";
var myheatsolver = HeatSolver(steak);
console.log(data);
var calculate=function(data,steak,meatType){

var myheatsolver = HeatSolver(steak);
console.log(meatType);
var Thedata=myheatsolver.sixty_graph_arrays(data);

var sampledata=Thedata.temps;
Expand Down

0 comments on commit 06f761c

Please sign in to comment.