I am absolutely stumped as to what I'm doing wrong. Using a Portenta H7 with the Nicla connected via Eslov. If SENSOR_ID_ORI is used, at all, BHY2Host.update() slows down to running at an average of over 400ms. Replicated with two different sets of Portentas and Niclas, so I'm thinking we just don't understand something.
Another oddity: if using SENSOR_ID_ORI, the temperature sensor can take longer than a minute to start reporting data.
Should we be using SENSOR_ID_DEVICE_ORI instead? What's the difference?
The plot thickens: It appears that SensorClass.h defines a default rate of 1000hz. However, something about that is broken.
ori.begin(1000) does exactly the same as previously, or about 400-500ms times. Passing 1 results in things running very quickly, more in line with what I would expect 1000hz to look like. Here's where it gets interesting: passing 10 starts out fairly quickly (sub 100ms), then rapidly slows down to >400ms. Passing anything under 10 seems to be stable and never slow down. Anything 10 or above reads quickly the first few times, then degrades to reading very, very slowly.
We ended up working around it. My memory is fuzzy, but it was something with the serial being slower than the polling rate? There's more to it, as the underlying library is doing something very weird that we never figured out.
The guy who ended up finding a good enough workaround said, "I made a uart commication function with error checking to communicate between the cards and I sent all the sensor data as packages, with start/stop identifier, symbol to separate values, and checksum."
I cant for the life of me remember how or why that resolved the issue.