mirror of
https://github.com/eclipse/upm.git
synced 2025-07-02 09:51:14 +03:00
lsm303: python example and js modification for lsm303 accelerometer/compass
Signed-off-by: Zion Orent <zorent@ics.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:

committed by
Mihai Tudor Panu

parent
f9d0e4621b
commit
94fe1174c6
@ -1,8 +1,15 @@
|
||||
%module pyupm_lsm303
|
||||
%include "../upm.i"
|
||||
%include "../carrays_int16_t.i"
|
||||
|
||||
%feature("autodoc", "3");
|
||||
|
||||
// Adding this typemap because SWIG is converting int16 into a short by default
|
||||
// This forces SWIG to convert it correctly
|
||||
%typemap(out) int16_t* {
|
||||
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int16Array, 0 | 0 );
|
||||
}
|
||||
|
||||
%include "lsm303.h"
|
||||
%{
|
||||
#include "lsm303.h"
|
||||
|
Reference in New Issue
Block a user