|
|
@@ -72,8 +72,8 @@ final class OpenAPS {
|
|
|
private func iob(pumphistory: JSON, profile: JSON, clock: JSON, autosens: JSON, pumphistory24: JSON) -> JSON {
|
|
|
dispatchPrecondition(condition: .onQueue(processQueue))
|
|
|
return jsWorker.inCommonContext { worker in
|
|
|
- worker.evaluate(script: Script(name: "iob-bundle"))
|
|
|
- worker.evaluate(script: Script(name: "prepare-iob"))
|
|
|
+ worker.evaluate(script: Script(name: "bundle/iob"))
|
|
|
+ worker.evaluate(script: Script(name: "prepare/iob"))
|
|
|
return worker.call(function: "generate", with: [
|
|
|
pumphistory,
|
|
|
profile,
|
|
|
@@ -87,8 +87,8 @@ final class OpenAPS {
|
|
|
private func meal(pumphistory: JSON, profile: JSON, basalProfile: JSON, clock: JSON, carbs: JSON, glucose: JSON) -> JSON {
|
|
|
dispatchPrecondition(condition: .onQueue(processQueue))
|
|
|
return jsWorker.inCommonContext { worker in
|
|
|
- worker.evaluate(script: Script(name: "meal-bundle"))
|
|
|
- worker.evaluate(script: Script(name: "prepare-meal"))
|
|
|
+ worker.evaluate(script: Script(name: "bundle/meal"))
|
|
|
+ worker.evaluate(script: Script(name: "prepare/meal"))
|
|
|
return worker.call(function: "generate", with: [
|
|
|
pumphistory,
|
|
|
profile,
|
|
|
@@ -103,7 +103,7 @@ final class OpenAPS {
|
|
|
private func glucoseGetLast(glucose: JSON) -> JSON {
|
|
|
dispatchPrecondition(condition: .onQueue(processQueue))
|
|
|
return jsWorker.inCommonContext { worker in
|
|
|
- worker.evaluate(script: Script(name: "glucose-get-last-bundle"))
|
|
|
+ worker.evaluate(script: Script(name: "bundle/glucose-get-last"))
|
|
|
return worker.call(function: "freeaps", with: [glucose])
|
|
|
}
|
|
|
}
|
|
|
@@ -121,10 +121,10 @@ final class OpenAPS {
|
|
|
) -> JSON {
|
|
|
dispatchPrecondition(condition: .onQueue(processQueue))
|
|
|
return jsWorker.inCommonContext { worker in
|
|
|
- worker.evaluate(script: Script(name: "basal-set-temp-bundle"))
|
|
|
- worker.evaluate(script: Script(name: "prepare-determine-basal"))
|
|
|
+ worker.evaluate(script: Script(name: "bundle/basal-set-temp"))
|
|
|
+ worker.evaluate(script: Script(name: "prepare/determine-basal"))
|
|
|
let funcKey = "tempBasalFunctions"
|
|
|
- worker.evaluate(script: Script(name: "determine-basal-bundle"))
|
|
|
+ worker.evaluate(script: Script(name: "bundle/determine-basal"))
|
|
|
|
|
|
return worker.call(
|
|
|
function: "freeaps",
|
|
|
@@ -154,8 +154,8 @@ final class OpenAPS {
|
|
|
) -> JSON {
|
|
|
dispatchPrecondition(condition: .onQueue(processQueue))
|
|
|
return jsWorker.inCommonContext { worker in
|
|
|
- worker.evaluate(script: Script(name: "autosens-bundle"))
|
|
|
- worker.evaluate(script: Script(name: "prepare-autosens"))
|
|
|
+ worker.evaluate(script: Script(name: "bundle/autosens"))
|
|
|
+ worker.evaluate(script: Script(name: "prepare/autosens"))
|
|
|
|
|
|
return worker.call(
|
|
|
function: "generate",
|