rhino complex parameter passing

This commit is contained in:
AdrianLxM 2017-10-15 03:55:03 +02:00
parent 303d35118e
commit 9008ef6f6f
2 changed files with 2 additions and 2 deletions

View file

@ -17,7 +17,7 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_
};
rT.error ='Error: could not get current basal rate';
return setTempBasal(glucose_status.athing, 30, profile, rT, offline);
return setTempBasal(glucose_status.athing.anotherthing, 30, profile, rT, offline);
if (typeof profile === 'undefined' || typeof profile.current_basal === 'undefined') {
rT.error ='Error: could not get current basal rate';

View file

@ -103,7 +103,7 @@ public class DetermineBasalAdapterMAJS {
// Call the function with params
Object param1 = NativeJSON.parse(rhino, scope, "{\"athing\": 2.3}", new Callable() {
Object param1 = NativeJSON.parse(rhino, scope, "{\"athing\": {\"anotherthing\": 2.3}}", new Callable() {
@Override
public Object call(Context context, Scriptable scriptable, Scriptable scriptable1, Object[] objects) {
return objects[1];