diff --git a/src/hmc5883l/pyupm_hmc5883l.i b/src/hmc5883l/pyupm_hmc5883l.i index 999d1647..32992958 100644 --- a/src/hmc5883l/pyupm_hmc5883l.i +++ b/src/hmc5883l/pyupm_hmc5883l.i @@ -1,5 +1,6 @@ %module pyupm_hmc5883l %include "../upm.i" +%include "../carrays_int16_t.i" %feature("autodoc", "3"); @@ -7,6 +8,10 @@ %include "hmc5883l_doc.i" #endif +%typemap(out) int16_t* { + $result = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int16Array, 0 | 0 ); +} + %include "hmc5883l.h" %{ #include "hmc5883l.h"