C# Wrapper Question

I'm currently using the C# wrapper with the C++ library and it works well. I saw there was a recent update to the C++ library and some new C# wrapper code. What exactly needs to be updated as far as the old C# wrapper goes? I noticed there are mostly just structs and enums in the update, should I just use the old code for the rest of the classes?



  • Most of what is in the current C# wrapper project is correct except for functions in the MetaWearBoard and Connection classes.  The wrappers will need to be updated to reflect the new function signatures.

    All the new functionality will need to have C# wrappers for them, if you are using them.  I would look into a tool like SWIG if you are planning on using many of the new features, or manually defining what you need if you only using a small subset of the library.
  • Ok, thanks for the quick response. I have another question about the C# wrapper. Is there currently a way to read the temperature from the board? I've only found the functions to read pressure and altitude.

  • Yes, functions are in the multichanneltemperature.h file.  You can read the section about the temperature module on the Android docs to get a feel for how the temperature sensor is to be used.  While the documentation is for Android, the terminology and functions are similar to the C++ library.
  • edited February 2016
    Cool, thanks!
This discussion has been closed.