MacOS: Is there a way to rate throttle SensorFusion?

On my MacOS testing project I am streaming Euler data successfully but it tends to drown out other sensors such as the pushbutton. When the Euler data is streaming the pushbutton responds very sluggishly. I don't need the data at a rate higher than maybe 250ms but when I tried a periodicSample filter it aborted because of the data size.

Is there an approach that will work on MacOS (and iOS) to control SensorFusion data? I am assuming that quaternion data would also have this problem but if not then please let me know. I'm just learning how to use these things ...

Comments

  • edited March 2017
    periodicSample is certainly one way to go about throttling the SensorFusion output speed, and we did recently improve support for larger data sizes, however, it appears the iOS SDK is still asserting unnecessarily.

    I'm making the necessary changes now and it will go into the next release.  If you want the fix right away, you can pull directly from the development branch using the following in your Podfile:

    pod 'MetaWear', :git => 'https://github.com/mbientlab/MetaWear-SDK-iOS-macOS-tvOS.git', :branch => 'develop'
  • Thanks, I'll try that.

    You say that is "one way" to throttle the output, are there other ways?
  • Unfortunately the develop branch breaks the functionality of the sample app. I get several missing file warnings for the framework and one warning in the app itself. The app does build and run, detects the board, but will not connect. Up until that point the code is unmodified from the sample so I don't think it is something I have done.

    The file warnings are all similar to:

    file:///Users/dad/Dropbox/Projects/mbient/MetaWear-SDK-iOS-macOS-tvOS-master/StarterProject/Pods/MetaWear/MetaWear/Internal/Categories/BFTask+Private.m: warning: Missing file: /Users/dad/Dropbox/Projects/mbient/MetaWear-SDK-iOS-macOS-tvOS-master/StarterProject/Pods/MetaWear/MetaWear/Internal/Categories/BFTask+Private.m is missing from working copy

    There are 8 warnings like that.

    And the warning in the app is:

    /Users/dad/Dropbox/Projects/mbient/MetaWear-SDK-iOS-macOS-tvOS-master/StarterProject/Pods/MetaWear/MetaWear/Classes/Core/MBLEvent.m:711:82: Taking address of packed member 'threshold' of class or structure 'df_pulse_detector_param_t' may result in an unaligned pointer value
  • That all said, of course, it did connect after the fourth attempt.
This discussion has been closed.