UWP Quaternions Only Outputs
Hello,
I have a UWP app configured with a start and stop button for streaming quaternions. However, if I start streaming the quaternions, hit "Stop", and then hit "Start" again, the quaternions don't stream again and nothing happens.
When the start button is pressed, the following code is run:
mbl_mw_settings_set_connection_parameters(cppBoard, 7.5F, 7.5F, 0, 6000);
mbl_mw_sensor_fusion_set_mode(cppBoard, SensorFusion.Mode.NDOF);
mbl_mw_sensor_fusion_set_acc_range(cppBoard, SensorFusion.AccRange.AR_16G); ///AR_2G, 4, 8, 16
mbl_mw_sensor_fusion_set_gyro_range(cppBoard, SensorFusion.GyroRange.GR_2000DPS); ///GR_2000DPS, 1000, 500, 250
mbl_mw_sensor_fusion_write_config(cppBoard);
IntPtr fusionsDataSignal = mbl_mw_sensor_fusion_get_data_signal(cppBoard, SensorFusion.Data.QUATERION); //this line works
mbl_mw_datasignal_subscribe(fusionsDataSignal, fusionDataHandler);
mbl_mw_sensor_fusion_enable_data(cppBoard, SensorFusion.Data.QUATERION);
mbl_mw_sensor_fusion_start(cppBoard);
When the stop button is pressed, the following code is run:
IntPtr quatSignal = mbl_mw_sensor_fusion_get_data_signal(cppBoard, SensorFusion.Data.QUATERION);
mbl_mw_sensor_fusion_stop(cppBoard);
mbl_mw_sensor_fusion_clear_enabled_mask(cppBoard);
mbl_mw_datasignal_unsubscribe(quatSignal);
Do you have any idea what might be going on?
Thanks,
Dan
This discussion has been closed.
Comments