I am trying to convert an App to a datafield. The App is connecting to a BLE notify device, gets automatically data at 4 Hz and updates the view in Ble::onCharacteristicChanged(). The datafield::onUpdate calls a function in the BLEDeligate and reads the latest data. The App is doing fine. When converting this to a datafield, it is always crashing when calling the BLEDeligate from onUpdate anywhere here:
var scanResults = _model.getScanResults();
//Parsing BLE receiving data
var AWS = (scanResults[1] << 8 | scanResults[0]) * 0.01;
var AWD = (scanResults[3] << 8 | scanResults[2]);
var batt = scanResults[4];
var temp = scanResults[5] - 100;
var roll = scanResults[6] - 90;
var pitch = scanResults[7] - 90;
var compass = 360 - (scanResults[9] << 8 | scanResults[8]);
Should note that I haven't defined any background process, because I have no glue what that is.