# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.8
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2, 6, 0):
def swig_import_helper():
from os.path import dirname
import imp
fp = None
try:
fp, pathname, description = imp.find_module('_pyupm_mag3110', [dirname(__file__)])
except ImportError:
import _pyupm_mag3110
return _pyupm_mag3110
if fp is not None:
try:
_mod = imp.load_module('_pyupm_mag3110', fp, pathname, description)
finally:
fp.close()
return _mod
_pyupm_mag3110 = swig_import_helper()
del swig_import_helper
else:
import _pyupm_mag3110
del version_info
try:
_swig_property = property
except NameError:
pass # Python < 2.2 doesn't have 'property'.
def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
if (name == "thisown"):
return self.this.own(value)
if (name == "this"):
if type(value).__name__ == 'SwigPyObject':
self.__dict__[name] = value
return
method = class_type.__swig_setmethods__.get(name, None)
if method:
return method(self, value)
if (not static):
if _newclass:
object.__setattr__(self, name, value)
else:
self.__dict__[name] = value
else:
raise AttributeError("You cannot add attributes to %s" % self)
def _swig_setattr(self, class_type, name, value):
return _swig_setattr_nondynamic(self, class_type, name, value, 0)
def _swig_getattr_nondynamic(self, class_type, name, static=1):
if (name == "thisown"):
return self.this.own()
method = class_type.__swig_getmethods__.get(name, None)
if method:
return method(self)
if (not static):
return object.__getattr__(self, name)
else:
raise AttributeError(name)
def _swig_getattr(self, class_type, name):
return _swig_getattr_nondynamic(self, class_type, name, 0)
def _swig_repr(self):
try:
strthis = "proxy of " + self.this.__repr__()
except Exception:
strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
try:
_object = object
_newclass = 1
except AttributeError:
class _object:
pass
_newclass = 0
def getVersion():
return _pyupm_mag3110.getVersion()
getVersion = _pyupm_mag3110.getVersion
_pyupm_mag3110.MAG3110_NAME_swigconstant(_pyupm_mag3110)
MAG3110_NAME = _pyupm_mag3110.MAG3110_NAME
_pyupm_mag3110.MAG3110_I2C_ADDRESS_swigconstant(_pyupm_mag3110)
MAG3110_I2C_ADDRESS = _pyupm_mag3110.MAG3110_I2C_ADDRESS
_pyupm_mag3110.MAG3110_DEVICE_ID_swigconstant(_pyupm_mag3110)
MAG3110_DEVICE_ID = _pyupm_mag3110.MAG3110_DEVICE_ID
_pyupm_mag3110.MAG3110_DEVICE_ID_REG_swigconstant(_pyupm_mag3110)
MAG3110_DEVICE_ID_REG = _pyupm_mag3110.MAG3110_DEVICE_ID_REG
_pyupm_mag3110.MAG3110_DR_STATUS_swigconstant(_pyupm_mag3110)
MAG3110_DR_STATUS = _pyupm_mag3110.MAG3110_DR_STATUS
_pyupm_mag3110.MAG3110_OUT_X_MSB_swigconstant(_pyupm_mag3110)
MAG3110_OUT_X_MSB = _pyupm_mag3110.MAG3110_OUT_X_MSB
_pyupm_mag3110.MAG3110_OUT_X_LSB_swigconstant(_pyupm_mag3110)
MAG3110_OUT_X_LSB = _pyupm_mag3110.MAG3110_OUT_X_LSB
_pyupm_mag3110.MAG3110_OUT_Y_MSB_swigconstant(_pyupm_mag3110)
MAG3110_OUT_Y_MSB = _pyupm_mag3110.MAG3110_OUT_Y_MSB
_pyupm_mag3110.MAG3110_OUT_Y_LSB_swigconstant(_pyupm_mag3110)
MAG3110_OUT_Y_LSB = _pyupm_mag3110.MAG3110_OUT_Y_LSB
_pyupm_mag3110.MAG3110_OUT_Z_MSB_swigconstant(_pyupm_mag3110)
MAG3110_OUT_Z_MSB = _pyupm_mag3110.MAG3110_OUT_Z_MSB
_pyupm_mag3110.MAG3110_OUT_Z_LSB_swigconstant(_pyupm_mag3110)
MAG3110_OUT_Z_LSB = _pyupm_mag3110.MAG3110_OUT_Z_LSB
_pyupm_mag3110.MAG3110_SYSMOD_swigconstant(_pyupm_mag3110)
MAG3110_SYSMOD = _pyupm_mag3110.MAG3110_SYSMOD
_pyupm_mag3110.MAG3110_OFF_X_MSB_swigconstant(_pyupm_mag3110)
MAG3110_OFF_X_MSB = _pyupm_mag3110.MAG3110_OFF_X_MSB
_pyupm_mag3110.MAG3110_OFF_X_LSB_swigconstant(_pyupm_mag3110)
MAG3110_OFF_X_LSB = _pyupm_mag3110.MAG3110_OFF_X_LSB
_pyupm_mag3110.MAG3110_OFF_Y_MSB_swigconstant(_pyupm_mag3110)
MAG3110_OFF_Y_MSB = _pyupm_mag3110.MAG3110_OFF_Y_MSB
_pyupm_mag3110.MAG3110_OFF_Y_LSB_swigconstant(_pyupm_mag3110)
MAG3110_OFF_Y_LSB = _pyupm_mag3110.MAG3110_OFF_Y_LSB
_pyupm_mag3110.MAG3110_OFF_Z_MSB_swigconstant(_pyupm_mag3110)
MAG3110_OFF_Z_MSB = _pyupm_mag3110.MAG3110_OFF_Z_MSB
_pyupm_mag3110.MAG3110_OFF_Z_LSB_swigconstant(_pyupm_mag3110)
MAG3110_OFF_Z_LSB = _pyupm_mag3110.MAG3110_OFF_Z_LSB
_pyupm_mag3110.MAG3110_DIE_TEMP_swigconstant(_pyupm_mag3110)
MAG3110_DIE_TEMP = _pyupm_mag3110.MAG3110_DIE_TEMP
_pyupm_mag3110.MAG3110_CTRL_REG1_swigconstant(_pyupm_mag3110)
MAG3110_CTRL_REG1 = _pyupm_mag3110.MAG3110_CTRL_REG1
_pyupm_mag3110.MAG3110_CTRL_REG2_swigconstant(_pyupm_mag3110)
MAG3110_CTRL_REG2 = _pyupm_mag3110.MAG3110_CTRL_REG2
_pyupm_mag3110.MAG3110_DR_STATUS_ZYXOW_swigconstant(_pyupm_mag3110)
MAG3110_DR_STATUS_ZYXOW = _pyupm_mag3110.MAG3110_DR_STATUS_ZYXOW
_pyupm_mag3110.MAG3110_DR_STATUS_ZOW_swigconstant(_pyupm_mag3110)
MAG3110_DR_STATUS_ZOW = _pyupm_mag3110.MAG3110_DR_STATUS_ZOW
_pyupm_mag3110.MAG3110_DR_STATUS_YOW_swigconstant(_pyupm_mag3110)
MAG3110_DR_STATUS_YOW = _pyupm_mag3110.MAG3110_DR_STATUS_YOW
_pyupm_mag3110.MAG3110_DR_STATUS_XOW_swigconstant(_pyupm_mag3110)
MAG3110_DR_STATUS_XOW = _pyupm_mag3110.MAG3110_DR_STATUS_XOW
_pyupm_mag3110.MAG3110_DR_STATUS_ZYXDR_swigconstant(_pyupm_mag3110)
MAG3110_DR_STATUS_ZYXDR = _pyupm_mag3110.MAG3110_DR_STATUS_ZYXDR
_pyupm_mag3110.MAG3110_DR_STATUS_ZDR_swigconstant(_pyupm_mag3110)
MAG3110_DR_STATUS_ZDR = _pyupm_mag3110.MAG3110_DR_STATUS_ZDR
_pyupm_mag3110.MAG3110_DR_STATUS_YDR_swigconstant(_pyupm_mag3110)
MAG3110_DR_STATUS_YDR = _pyupm_mag3110.MAG3110_DR_STATUS_YDR
_pyupm_mag3110.MAG3110_DR_STATUS_XDR_swigconstant(_pyupm_mag3110)
MAG3110_DR_STATUS_XDR = _pyupm_mag3110.MAG3110_DR_STATUS_XDR
_pyupm_mag3110.MAG3110_SYSMOD_STANDBY_swigconstant(_pyupm_mag3110)
MAG3110_SYSMOD_STANDBY = _pyupm_mag3110.MAG3110_SYSMOD_STANDBY
_pyupm_mag3110.MAG3110_SYSMOD_ACTIVE_RAW_swigconstant(_pyupm_mag3110)
MAG3110_SYSMOD_ACTIVE_RAW = _pyupm_mag3110.MAG3110_SYSMOD_ACTIVE_RAW
_pyupm_mag3110.MAG3110_SYSMOD_ACTIVE_swigconstant(_pyupm_mag3110)
MAG3110_SYSMOD_ACTIVE = _pyupm_mag3110.MAG3110_SYSMOD_ACTIVE
_pyupm_mag3110.MAG3110_CTRL_REG1_DROS_SHIFT_swigconstant(_pyupm_mag3110)
MAG3110_CTRL_REG1_DROS_SHIFT = _pyupm_mag3110.MAG3110_CTRL_REG1_DROS_SHIFT
_pyupm_mag3110.MAG3110_CTRL_REG1_DROS_MASK_swigconstant(_pyupm_mag3110)
MAG3110_CTRL_REG1_DROS_MASK = _pyupm_mag3110.MAG3110_CTRL_REG1_DROS_MASK
_pyupm_mag3110.MAG3110_CTRL_REG1_FR_swigconstant(_pyupm_mag3110)
MAG3110_CTRL_REG1_FR = _pyupm_mag3110.MAG3110_CTRL_REG1_FR
_pyupm_mag3110.MAG3110_CTRL_REG1_TM_swigconstant(_pyupm_mag3110)
MAG3110_CTRL_REG1_TM = _pyupm_mag3110.MAG3110_CTRL_REG1_TM
_pyupm_mag3110.MAG3110_CTRL_REG1_AC_swigconstant(_pyupm_mag3110)
MAG3110_CTRL_REG1_AC = _pyupm_mag3110.MAG3110_CTRL_REG1_AC
_pyupm_mag3110.MAG3110_CTRL_REG2_AUTO_MRST_EN_swigconstant(_pyupm_mag3110)
MAG3110_CTRL_REG2_AUTO_MRST_EN = _pyupm_mag3110.MAG3110_CTRL_REG2_AUTO_MRST_EN
_pyupm_mag3110.MAG3110_CTRL_REG2_RAW_swigconstant(_pyupm_mag3110)
MAG3110_CTRL_REG2_RAW = _pyupm_mag3110.MAG3110_CTRL_REG2_RAW
_pyupm_mag3110.MAG3110_CTRL_REG2_MAG_RST_swigconstant(_pyupm_mag3110)
MAG3110_CTRL_REG2_MAG_RST = _pyupm_mag3110.MAG3110_CTRL_REG2_MAG_RST
_pyupm_mag3110.MAG3110_DROS_8000_16_swigconstant(_pyupm_mag3110)
MAG3110_DROS_8000_16 = _pyupm_mag3110.MAG3110_DROS_8000_16
_pyupm_mag3110.MAG3110_DROS_4000_32_swigconstant(_pyupm_mag3110)
MAG3110_DROS_4000_32 = _pyupm_mag3110.MAG3110_DROS_4000_32
_pyupm_mag3110.MAG3110_DROS_2000_64_swigconstant(_pyupm_mag3110)
MAG3110_DROS_2000_64 = _pyupm_mag3110.MAG3110_DROS_2000_64
_pyupm_mag3110.MAG3110_DROS_1000_128_swigconstant(_pyupm_mag3110)
MAG3110_DROS_1000_128 = _pyupm_mag3110.MAG3110_DROS_1000_128
_pyupm_mag3110.MAG3110_DROS_4000_16_swigconstant(_pyupm_mag3110)
MAG3110_DROS_4000_16 = _pyupm_mag3110.MAG3110_DROS_4000_16
_pyupm_mag3110.MAG3110_DROS_2000_32_swigconstant(_pyupm_mag3110)
MAG3110_DROS_2000_32 = _pyupm_mag3110.MAG3110_DROS_2000_32
_pyupm_mag3110.MAG3110_DROS_1000_64_swigconstant(_pyupm_mag3110)
MAG3110_DROS_1000_64 = _pyupm_mag3110.MAG3110_DROS_1000_64
_pyupm_mag3110.MAG3110_DROS_0500_128_swigconstant(_pyupm_mag3110)
MAG3110_DROS_0500_128 = _pyupm_mag3110.MAG3110_DROS_0500_128
_pyupm_mag3110.MAG3110_DROS_2000_16_swigconstant(_pyupm_mag3110)
MAG3110_DROS_2000_16 = _pyupm_mag3110.MAG3110_DROS_2000_16
_pyupm_mag3110.MAG3110_DROS_1000_32_swigconstant(_pyupm_mag3110)
MAG3110_DROS_1000_32 = _pyupm_mag3110.MAG3110_DROS_1000_32
_pyupm_mag3110.MAG3110_DROS_0500_64_swigconstant(_pyupm_mag3110)
MAG3110_DROS_0500_64 = _pyupm_mag3110.MAG3110_DROS_0500_64
_pyupm_mag3110.MAG3110_DROS_0250_128_swigconstant(_pyupm_mag3110)
MAG3110_DROS_0250_128 = _pyupm_mag3110.MAG3110_DROS_0250_128
_pyupm_mag3110.MAG3110_DROS_1000_16_swigconstant(_pyupm_mag3110)
MAG3110_DROS_1000_16 = _pyupm_mag3110.MAG3110_DROS_1000_16
_pyupm_mag3110.MAG3110_DROS_0500_32_swigconstant(_pyupm_mag3110)
MAG3110_DROS_0500_32 = _pyupm_mag3110.MAG3110_DROS_0500_32
_pyupm_mag3110.MAG3110_DROS_0250_64_swigconstant(_pyupm_mag3110)
MAG3110_DROS_0250_64 = _pyupm_mag3110.MAG3110_DROS_0250_64
_pyupm_mag3110.MAG3110_DROS_0125_128_swigconstant(_pyupm_mag3110)
MAG3110_DROS_0125_128 = _pyupm_mag3110.MAG3110_DROS_0125_128
_pyupm_mag3110.MAG3110_DROS_0500_16_swigconstant(_pyupm_mag3110)
MAG3110_DROS_0500_16 = _pyupm_mag3110.MAG3110_DROS_0500_16
_pyupm_mag3110.MAG3110_DROS_0250_32_swigconstant(_pyupm_mag3110)
MAG3110_DROS_0250_32 = _pyupm_mag3110.MAG3110_DROS_0250_32
_pyupm_mag3110.MAG3110_DROS_0125_64_swigconstant(_pyupm_mag3110)
MAG3110_DROS_0125_64 = _pyupm_mag3110.MAG3110_DROS_0125_64
_pyupm_mag3110.MAG3110_DROS_0063_128_swigconstant(_pyupm_mag3110)
MAG3110_DROS_0063_128 = _pyupm_mag3110.MAG3110_DROS_0063_128
_pyupm_mag3110.MAG3110_DROS_0250_16_swigconstant(_pyupm_mag3110)
MAG3110_DROS_0250_16 = _pyupm_mag3110.MAG3110_DROS_0250_16
_pyupm_mag3110.MAG3110_DROS_0125_32_swigconstant(_pyupm_mag3110)
MAG3110_DROS_0125_32 = _pyupm_mag3110.MAG3110_DROS_0125_32
_pyupm_mag3110.MAG3110_DROS_0063_64_swigconstant(_pyupm_mag3110)
MAG3110_DROS_0063_64 = _pyupm_mag3110.MAG3110_DROS_0063_64
_pyupm_mag3110.MAG3110_DROS_0031_128_swigconstant(_pyupm_mag3110)
MAG3110_DROS_0031_128 = _pyupm_mag3110.MAG3110_DROS_0031_128
_pyupm_mag3110.MAG3110_DROS_0125_16_swigconstant(_pyupm_mag3110)
MAG3110_DROS_0125_16 = _pyupm_mag3110.MAG3110_DROS_0125_16
_pyupm_mag3110.MAG3110_DROS_0063_32_swigconstant(_pyupm_mag3110)
MAG3110_DROS_0063_32 = _pyupm_mag3110.MAG3110_DROS_0063_32
_pyupm_mag3110.MAG3110_DROS_0031_64_swigconstant(_pyupm_mag3110)
MAG3110_DROS_0031_64 = _pyupm_mag3110.MAG3110_DROS_0031_64
_pyupm_mag3110.MAG3110_DROS_0016_128_swigconstant(_pyupm_mag3110)
MAG3110_DROS_0016_128 = _pyupm_mag3110.MAG3110_DROS_0016_128
_pyupm_mag3110.MAG3110_DROS_0063_16_swigconstant(_pyupm_mag3110)
MAG3110_DROS_0063_16 = _pyupm_mag3110.MAG3110_DROS_0063_16
_pyupm_mag3110.MAG3110_DROS_0031_32_swigconstant(_pyupm_mag3110)
MAG3110_DROS_0031_32 = _pyupm_mag3110.MAG3110_DROS_0031_32
_pyupm_mag3110.MAG3110_DROS_0016_64_swigconstant(_pyupm_mag3110)
MAG3110_DROS_0016_64 = _pyupm_mag3110.MAG3110_DROS_0016_64
_pyupm_mag3110.MAG3110_DROS_0008_128_swigconstant(_pyupm_mag3110)
MAG3110_DROS_0008_128 = _pyupm_mag3110.MAG3110_DROS_0008_128
_pyupm_mag3110.MAG3110_DROS_DEFAULT_swigconstant(_pyupm_mag3110)
MAG3110_DROS_DEFAULT = _pyupm_mag3110.MAG3110_DROS_DEFAULT
[docs]class mag3110_data_t(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, mag3110_data_t, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, mag3110_data_t, name)
__repr__ = _swig_repr
__swig_setmethods__["x"] = _pyupm_mag3110.mag3110_data_t_x_set
__swig_getmethods__["x"] = _pyupm_mag3110.mag3110_data_t_x_get
if _newclass:
x = _swig_property(_pyupm_mag3110.mag3110_data_t_x_get, _pyupm_mag3110.mag3110_data_t_x_set)
__swig_setmethods__["y"] = _pyupm_mag3110.mag3110_data_t_y_set
__swig_getmethods__["y"] = _pyupm_mag3110.mag3110_data_t_y_get
if _newclass:
y = _swig_property(_pyupm_mag3110.mag3110_data_t_y_get, _pyupm_mag3110.mag3110_data_t_y_set)
__swig_setmethods__["z"] = _pyupm_mag3110.mag3110_data_t_z_set
__swig_getmethods__["z"] = _pyupm_mag3110.mag3110_data_t_z_get
if _newclass:
z = _swig_property(_pyupm_mag3110.mag3110_data_t_z_get, _pyupm_mag3110.mag3110_data_t_z_set)
__swig_setmethods__["status"] = _pyupm_mag3110.mag3110_data_t_status_set
__swig_getmethods__["status"] = _pyupm_mag3110.mag3110_data_t_status_get
if _newclass:
status = _swig_property(_pyupm_mag3110.mag3110_data_t_status_get, _pyupm_mag3110.mag3110_data_t_status_set)
__swig_setmethods__["dtemp"] = _pyupm_mag3110.mag3110_data_t_dtemp_set
__swig_getmethods__["dtemp"] = _pyupm_mag3110.mag3110_data_t_dtemp_get
if _newclass:
dtemp = _swig_property(_pyupm_mag3110.mag3110_data_t_dtemp_get, _pyupm_mag3110.mag3110_data_t_dtemp_set)
def __init__(self):
this = _pyupm_mag3110.new_mag3110_data_t()
try:
self.this.append(this)
except Exception:
self.this = this
__swig_destroy__ = _pyupm_mag3110.delete_mag3110_data_t
__del__ = lambda self: None
mag3110_data_t_swigregister = _pyupm_mag3110.mag3110_data_t_swigregister
mag3110_data_t_swigregister(mag3110_data_t)
[docs]class MAG3110(_object):
"""
API for the MAG3110 Three-Axis Digital Magnetometer.
ID: mag3110
Name: MAG3110 Three-Axis Digital Magnetometer
Category: accelerometer compass
Manufacturer: freescale
Link:http://www.nxp.com/assets/documents/data/en/data-
sheets/MAG3110.pdf
Connection: i2c Description in web-link above: The MAG3110 is a
small, low-power digital 3D magnetic sensor with a wide dynamic range
to allow operation in PCBs with high extraneous magnetic fields. It
measures the components of the local magnetic field, the sum of the
geomagnetic field and the magnetic field created by components on the
circuit board. It can be used in conjunction with a 3-axis
accelerometer so that orientation-independent accurate compass heading
information may be achieved It is capable of measuring local magnetic
fields up to 10 Gauss with output data rates up to 80 Hz.
C++ includes: mag3110.hpp
"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, MAG3110, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, MAG3110, name)
__repr__ = _swig_repr
def __init__(self, bus, dros=15, devAddr=0x0E):
"""
MAG3110(int bus,
uint8_t dros=MAG3110_DROS_DEFAULT, int devAddr=MAG3110_I2C_ADDRESS)
Instantiates an MAG3110 object
Parameters:
-----------
bus: Number of the used bus
dros: Data rate and over sampling selection
devAddr: Address of the used I2C device
"""
this = _pyupm_mag3110.new_MAG3110(bus, dros, devAddr)
try:
self.this.append(this)
except Exception:
self.this = this
[docs] def checkID(self):
"""
int checkID(void)
Check device_id of sensor
0 on success -1 on error
"""
return _pyupm_mag3110.MAG3110_checkID(self)
[docs] def setUserOffset(self, x, y, z):
"""
int
setUserOffset(int16_t x, int16_t y, int16_t z)
Set user offset correction Offset correction register will be erased
after accelerometer reset
Parameters:
-----------
x: Offset correction value for x-axis
y: Offset correction value for y-axis
z: Offset correction value for z-axis
0 on success -1 on error
"""
return _pyupm_mag3110.MAG3110_setUserOffset(self, x, y, z)
[docs] def setActive(self):
"""
int setActive(void)
Set active mode, this enables periodic measurements
0 on success -1 on error
"""
return _pyupm_mag3110.MAG3110_setActive(self)
[docs] def setStandby(self):
"""
int setStandby(void)
Set standby mode, this disables periodic measurements
0 on success -1 on error
"""
return _pyupm_mag3110.MAG3110_setStandby(self)
[docs] def isReady(self):
"""
int isReady(void)
Check for new set of measurement data.
>0 if x-, y- and z-axis new sample is ready 0 if measurement is in
progress
"""
return _pyupm_mag3110.MAG3110_isReady(self)
[docs] def sampleData(self):
"""
int sampleData(void)
Read magnetometer's data and saves them to variables
Info: To get the actual values for the magnetic field someone has to
divide the returned values from the magnetometer by 10
0 on success -1 on error
"""
return _pyupm_mag3110.MAG3110_sampleData(self)
[docs] def getX(self, bSampleData=0):
"""
int16_t getX(int
bSampleData=0)
Get x-axis magnetic field strength
Parameters:
-----------
bSampleData: Flag to read sensor
The x-axis magnetic field strength on success -999 on error
"""
return _pyupm_mag3110.MAG3110_getX(self, bSampleData)
[docs] def getY(self, bSampleData=0):
"""
int16_t getY(int
bSampleData=0)
Get y-axis magnetic field strength
Parameters:
-----------
bSampleData: Flag to read sensor
The y-axis magnetic field strength on success -999 on error
"""
return _pyupm_mag3110.MAG3110_getY(self, bSampleData)
[docs] def getZ(self, bSampleData=0):
"""
int16_t getZ(int
bSampleData=0)
Get z-axis magnetic field strength
Parameters:
-----------
bSampleData: Flag to read sensor
The z-axis magnetic field strength on success -999 on error
"""
return _pyupm_mag3110.MAG3110_getZ(self, bSampleData)
[docs] def getStatus(self):
"""
uint8_t
getStatus(void)
Get value of status register
Value of status register
"""
return _pyupm_mag3110.MAG3110_getStatus(self)
[docs] def getDieTemperature(self):
"""
int8_t
getDieTemperature(void)
Get die temperature
Die temperature
"""
return _pyupm_mag3110.MAG3110_getDieTemperature(self)
[docs] def getData(self, data, bSampleData=0):
"""
int
getData(mag3110_data_t *data, int bSampleData=0)
Get sensor values
Parameters:
-----------
data: Sensor values
bSampleData: Flag to read sensor
0 on success -1 on error
"""
return _pyupm_mag3110.MAG3110_getData(self, data, bSampleData)
__swig_destroy__ = _pyupm_mag3110.delete_MAG3110
__del__ = lambda self: None
MAG3110_swigregister = _pyupm_mag3110.MAG3110_swigregister
MAG3110_swigregister(MAG3110)
# This file is compatible with both classic and new-style classes.