Skip to content

Commit

Permalink
Adding a check for existing autotune folder. If it does not exist, wa…
Browse files Browse the repository at this point in the history
…rn user that microbolus-related features will be disabled.
  • Loading branch information
danamlewis committed Jun 7, 2017
1 parent 7c515a4 commit ce4e650
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions bin/oref0-determine-basal.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,29 @@ if (!module.parent) {
return console.error("Could not parse input data: ", e);
}



//attempting to provide a check for autotune
//if autotune directory does not exist, SMB/oref1 should not be able to run

// console.error("Printing this so you know it's getting to the check for autotune.")

//printing microbolus before attempting check
console.error("Microbolus var is currently set to: ",params['microbolus']);

if (fs.existsSync("autotune")) {
console.error("Autotune exists! Hoorah!")
}
else {
console.error("Warning: Autotune has not been run. All microboluses will be disabled until you manually run autotune or add it to run nightly in your loop.");
params['microbolus'] = false;
console.error("Microbolus var is currently set to: ",params['microbolus']);
}





//console.log(carbratio_data);
var meal_data = { };
//console.error("meal_input",meal_input);
Expand Down

0 comments on commit ce4e650

Please sign in to comment.