js-evaluator-for-android
js-evaluator-for-android copied to clipboard
Sometime the onResult callback not call
- i'm updated to new version 6.0.0 (my device with android 13)
- i'm use with callFunction
- I repeat, sometimes I return an answer and sometimes I don't. And no error returns
new JsEvaluator(activity.getApplicationContext()).callFunction("var testFunc = function(flagValue) { return flagValue <= 0.3;}", new JsCallback() { @Override public void onResult(final String result) { Logger.d("test_bug", "onResult: " + result); }
@Override
public void onError(String s) {
Logger.d("testFunc", "onError: " + s);
}
}, "testFunc", 0.8);
10x
Meeting notes:
- Ulf: Think it could be helpful, could make it easier to find signals
- Erik: Please review/comment, if no one object I might make a draft.
I don't know if it's a goal for VSS, but: this would be useful for generating a Vehicle
struct, which our company is doing.
You can do this now by, e.g., running protoc
on the protobuf target; but it's difficult to organize the types for all of the branches, instances, and enums.
A possible restructure can be seen in https://github.com/boschglobal/vehicle_signal_specification/pull/20 (Note that only a subset of the files are restructured in that draft, but it shows how structure could look like after a restructure)
Meeting notes:
- Please review
- Check how prefix for includes are handled, can it be removed to reduce risk of errors
Following up on what was brought up yesterday by @kkoppolu1.
The general logic of the vspec files and #include
syntax as of today is that there is no assumption made concerning which branch a signal belong to, so in the example below you explicitly need to state that Intensity
belongs to Raindetection
Raindetection:
type: branch
description: Rainsensor signals.
Raindetection.Intensity:
datatype: uint8
type: sensor
unit: percent
max: 100
description: Rain intensity. 0 = Dry, No Rain. 100 = Covered.
Similar for #include
, if you want the content of SingleWindow.vspec
to be added inside Window
you need to specify Window
as prefix, if not content will be added in parallel to Window
. (Unless all content in SingleWindow.vspec
start with Window.
prefix, which typically is not the case as we want the included file to be independent.)
Window:
type: branch
description: Door window status
#include SingleWindow.vspec Window
So I think we cannot easily get rid of the prefix in includes. But we could definitively improve the checks, for example by actually checking that Window
above exist as branch. We do not do that today, will create a Pull Request for that