When trying to debug the accelerator part of my Watch App the simulator hang (version 3.0.9) , it always hang after some iteration of the accel callback.
if I use an FIR filter, it arrive earlier than without. but in both case I can only got more or less 70 samples before the Simulator hang.
here is my filter :
var options = {:coefficients => [ 0.2f, 0.2f, 0.2f, 0.2f, 0.2f, 0.2f, 0.2f ], :gain => 1.0f};
mFilter = new Math.FirFilter(options);my accel register :
var options = {:period => 1, :sampleRate => 25, :enableAccelerometer => true};
try {
Sensor.registerSensorDataListener(method(:accel_callback), options);
}
catch(e) {
System.println(e.getErrorMessage());
}and my callback :
// Callback to receive accel data
function accel_callback(sensorData) {
//mX = mFilter.apply(sensorData.accelerometerData.x);
//mY = mFilter.apply(sensorData.accelerometerData.y);
mX = sensorData.accelerometerData.x;
mY = sensorData.accelerometerData.y;
mZ = sensorData.accelerometerData.z;
onAccelData();
}did someone already have this type of issue ?
what can I do ?
community.garmin.com/.../1469728.jpg