# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# 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 as _swig_python_version_info
if _swig_python_version_info >= (2, 7, 0):
    def swig_import_helper():
        import importlib
        pkg = __name__.rpartition('.')[0]
        mname = '.'.join((pkg, '_pyupm_lsm303dlh')).lstrip('.')
        try:
            return importlib.import_module(mname)
        except ImportError:
            return importlib.import_module('_pyupm_lsm303dlh')
    _pyupm_lsm303dlh = swig_import_helper()
    del swig_import_helper
elif _swig_python_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_lsm303dlh', [dirname(__file__)])
        except ImportError:
            import _pyupm_lsm303dlh
            return _pyupm_lsm303dlh
        try:
            _mod = imp.load_module('_pyupm_lsm303dlh', fp, pathname, description)
        finally:
            if fp is not None:
                fp.close()
        return _mod
    _pyupm_lsm303dlh = swig_import_helper()
    del swig_import_helper
else:
    import _pyupm_lsm303dlh
del _swig_python_version_info

try:
    _swig_property = property
except NameError:
    pass  # Python < 2.2 doesn't have 'property'.

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

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(self, class_type, name):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))


def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)

try:
    _object = object
    _newclass = 1
except __builtin__.Exception:
    class _object:
        pass
    _newclass = 0


def getVersion():
    return _pyupm_lsm303dlh.getVersion()
getVersion = _pyupm_lsm303dlh.getVersion
class int16Array(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, int16Array, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, int16Array, name)
    __repr__ = _swig_repr

    def __init__(self, nelements):
        this = _pyupm_lsm303dlh.new_int16Array(nelements)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _pyupm_lsm303dlh.delete_int16Array
    __del__ = lambda self: None

    def __getitem__(self, index):
        return _pyupm_lsm303dlh.int16Array___getitem__(self, index)

    def __setitem__(self, index, value):
        return _pyupm_lsm303dlh.int16Array___setitem__(self, index, value)

    def cast(self):
        return _pyupm_lsm303dlh.int16Array_cast(self)
    if _newclass:
        frompointer = staticmethod(_pyupm_lsm303dlh.int16Array_frompointer)
    else:
        frompointer = _pyupm_lsm303dlh.int16Array_frompointer
int16Array_swigregister = _pyupm_lsm303dlh.int16Array_swigregister
int16Array_swigregister(int16Array)

def int16Array_frompointer(t):
    return _pyupm_lsm303dlh.int16Array_frompointer(t)
int16Array_frompointer = _pyupm_lsm303dlh.int16Array_frompointer

LSM303DLH_MAG = _pyupm_lsm303dlh.LSM303DLH_MAG
LSM303DLH_ACC = _pyupm_lsm303dlh.LSM303DLH_ACC
CTRL_REG1_A = _pyupm_lsm303dlh.CTRL_REG1_A
CTRL_REG2_A = _pyupm_lsm303dlh.CTRL_REG2_A
CTRL_REG3_A = _pyupm_lsm303dlh.CTRL_REG3_A
CTRL_REG4_A = _pyupm_lsm303dlh.CTRL_REG4_A
CTRL_REG5_A = _pyupm_lsm303dlh.CTRL_REG5_A
CRA_REG_M = _pyupm_lsm303dlh.CRA_REG_M
CRB_REG_M = _pyupm_lsm303dlh.CRB_REG_M
MR_REG_M = _pyupm_lsm303dlh.MR_REG_M
OUT_X_H_M = _pyupm_lsm303dlh.OUT_X_H_M
OUT_X_L_A = _pyupm_lsm303dlh.OUT_X_L_A
OUT_X_H_A = _pyupm_lsm303dlh.OUT_X_H_A
OUT_Y_L_A = _pyupm_lsm303dlh.OUT_Y_L_A
OUT_Y_H_A = _pyupm_lsm303dlh.OUT_Y_H_A
OUT_Z_L_A = _pyupm_lsm303dlh.OUT_Z_L_A
OUT_Z_H_A = _pyupm_lsm303dlh.OUT_Z_H_A
X = _pyupm_lsm303dlh.X
Y = _pyupm_lsm303dlh.Y
Z = _pyupm_lsm303dlh.Z
class LSM303DLH(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, LSM303DLH, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, LSM303DLH, name)
    __repr__ = _swig_repr
    LSM303DLH_MAG_T = _pyupm_lsm303dlh.LSM303DLH_LSM303DLH_MAG_T
    LSM303DLH_ACC_T = _pyupm_lsm303dlh.LSM303DLH_LSM303DLH_ACC_T

    def __init__(self, bus, addrMag=0x1E, addrAcc=0x19, accScale=8):
        this = _pyupm_lsm303dlh.new_LSM303DLH(bus, addrMag, addrAcc, accScale)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def getHeading(self):
        return _pyupm_lsm303dlh.LSM303DLH_getHeading(self)

    def getCoordinates(self):
        return _pyupm_lsm303dlh.LSM303DLH_getCoordinates(self)

    def getAcceleration(self):
        return _pyupm_lsm303dlh.LSM303DLH_getAcceleration(self)

    def getRawCoorData(self):
        return _pyupm_lsm303dlh.LSM303DLH_getRawCoorData(self)

    def getCoorX(self):
        return _pyupm_lsm303dlh.LSM303DLH_getCoorX(self)

    def getCoorY(self):
        return _pyupm_lsm303dlh.LSM303DLH_getCoorY(self)

    def getCoorZ(self):
        return _pyupm_lsm303dlh.LSM303DLH_getCoorZ(self)

    def getRawAccelData(self):
        return _pyupm_lsm303dlh.LSM303DLH_getRawAccelData(self)

    def getAccelX(self):
        return _pyupm_lsm303dlh.LSM303DLH_getAccelX(self)

    def getAccelY(self):
        return _pyupm_lsm303dlh.LSM303DLH_getAccelY(self)

    def getAccelZ(self):
        return _pyupm_lsm303dlh.LSM303DLH_getAccelZ(self)
    __swig_destroy__ = _pyupm_lsm303dlh.delete_LSM303DLH
    __del__ = lambda self: None
LSM303DLH_swigregister = _pyupm_lsm303dlh.LSM303DLH_swigregister
LSM303DLH_swigregister(LSM303DLH)

# This file is compatible with both classic and new-style classes.


