LORD-MicroStrain / MSCL

MicroStrain Communication Library
https://www.microstrain.com/software/mscl
MIT License
76 stars 57 forks source link

Quick start code help #399

Open cxr0726 opened 1 month ago

cxr0726 commented 1 month ago

3DMCV7-AHRS Operating System: Ubuntu 20.04 Programming language: C++
I am following along with the Quick Start guide. I can connect to the sensor, ping it and set it to idle. But, I get an error when trying to getActiveChannelFields: figure1 I got the following error: figure2 Can you provide some guidance?

Thank you.

msclissa commented 1 month ago

You'll notice on line 24 you're trying to read the active channels for the GNSS class/data set. Our inertial devices categorize output data into different data sets/classes to help inform the data source. These sets include sensor data, filter data, and GNSS data, among others.

The CV7-AHRS does not support the GNSS data set, which is why it returned a command failure with an error code of 3 (invalid parameter).

You can check if a device supports a specific data set/class by calling:

bool supported = node.features().supportsCategory(mscl::MipTypes::CLASS_GNSS);

I believe the supported data sets on a CV7-AHRS are:

Hope this helps! Let us know if you continue to run into issues reading out the active channels for supported data sets!