BUG modifying an existing data processor
When I create a data processor chain using raw gyroscope data as the source, modification of some data processor parameters (e.g. the threshold value of a pulse data processor, or the boundary value of a comparator data processor) is buggy.
MetaMotionR sensor (Firmware 1.5.0, MetaWear iOS SDK 3.4.0).
The data processor chain:
1. Raw gyroscope data, signal retrieved by
2. RSS, created by
3. Passthrough, created by
mbl_mw_dataprocessor_passthrough_create(rssProcessor, MBL_MW_PASSTHROUGH_MODE_CONDITIONAL, 1), needed for the app to disable this chain when certain conditions are met. (I believe this data processor is irrelevant for the bug. Noted here for completeness, and just in case.)
4. Pulse, created by
mbl_mw_dataprocessor_pulse_create(MBL_MW_PULSE_OUTPUT_ON_DETECTION, 250, 15)
This works as expected: it doesn't detect tiny movements of the sensor, but it detects a greater rotation and produces output.
However, as soon as I call
mbl_mw_dataprocessor_pulse_modify(pulseProcessor, 250, 15) - notice that I'm using the same
width parameters as when creating the data processor - it detects any minuscule movement of the sensor.
I've debugged into
mbl_mw_dataprocessor_pulse_modify to see if there's any visible difference. Here's the relevant line of code in
The value of
threshold=250. (And it works as expected in this case.)
mbl_mw_dataprocessor_pulse_modify (https://github.com/mbientlab/MetaWear-SDK-Cpp/blob/master/src/metawear/processor/cpp/dataprocessor_config.cpp#L609) however,
Probably not correct.
Please advise how to proceed with getting this functionality of the MetaWear SDK working.