autotune-core.js 613 B

123456789101112131415161718
  1. function generate(prepped_glucose_data,previous_autotune_data,pumpprofile_data) {
  2. if (!pumpprofile_data.useCustomPeakTime) {
  3. previous_autotune_data.dia = pumpprofile_data.dia;
  4. previous_autotune_data.insulinPeakTime = pumpprofile_data.insulinPeakTime;
  5. };
  6. // Always keep the curve value up to date with what's in the user preferences
  7. previous_autotune_data.curve = pumpprofile_data.curve;
  8. inputs = {
  9. preppedGlucose: prepped_glucose_data
  10. , previousAutotune: previous_autotune_data
  11. , pumpProfile: pumpprofile_data
  12. };
  13. return freeaps_autotuneCore(inputs);
  14. }