Translated MAX31855 library from python to c++