bmegli / vmu931

C library for Variense VMU931 IMU
Mozilla Public License 2.0
3 stars 5 forks source link

Commands sent to device occasionaly fail #1

Open bmegli opened 6 years ago

bmegli commented 6 years ago

Commands like vmu_stream may occasionally fail returing VMU_ERROR (correctly) but not setting errno (incorrectly)

bmegli commented 6 years ago

This seems to happen when:

This means that there was no IO error noticeable from host side but the command didn't have expected effect

bmegli commented 6 years ago

The way to fix it would be (on vmu_stream example)

So vmu_stream would return immediately and the library would handle internally all the communication with the device while reading data.

This approach is ok for vmu_stream but for vmu_resolution there would be time when device would stream data with different resolution then user expects (between setting requested resolution and commanding it to device)