# Path: pypozyx/definitions/registers.py
# POZYX_TEMPERATURE = 0x80  # Temperature
# 
# POZYX_PRESSURE = 0x50  # Pressure data in mPa
# 
# POZYX_MAX_LIN_ACC = 0x4E  # Return the max linear acceleration and reset it to 0


from pypozyx import *
from pypozyx.definitions.registers import POZYX_TEMPERATURE, POZYX_PRESSURE, POZYX_MAX_LIN_ACC
from time import sleep
    other_max_linear_acceleration = MaxLinearAcceleration()
    assert max_linear_acceleration == other_max_linear_acceleration, "default max_linear_acceleration objects aren't equal"
    raw_max_linear_acceleration = Data([0], 'h')
    assert raw_max_linear_acceleration == max_linear_acceleration, "max_linear_acceleration not right format of Data([0], 'h')"
    sleep(0.01)


def test_raw_max_linear_acceleration_read(pozyx, remote):
    raw_max_linear_acceleration = Data([0], 'h')
    status = pozyx.getRead(POZYX_MAX_LIN_ACC, raw_max_linear_acceleration)
    assert status == POZYX_SUCCESS, "raw read of max_linear_acceleration unsuccessful"
    assert type(raw_max_linear_acceleration[0]) == type(
        1), "max_linear_acceleration value is not an int"
    sleep(0.01)


def test_max_linear_acceleration_read(pozyx, remote):
    max_linear_acceleration = MaxLinearAcceleration()
    status = pozyx.getMaxLinearAcceleration_mg(max_linear_acceleration, remote)
    assert status == POZYX_SUCCESS, "getMaxLinearAcceleration_mg unsuccessful"
    assert type(max_linear_acceleration.value) == type(
        1.0), "max_linear_acceleration value is not a float"
    float_remainder = max_linear_acceleration.value - \
        int(max_linear_acceleration.value)
    assert float_remainder < 0.01, "max_linear_acceleration accuracy not 1 mg"
    sleep(0.01)


def test_max_linear_acceleration_conversion(pozyx, remote):
    raw_max_linear_acceleration = Data([0], 'h')

# Path: pypozyx/definitions/registers.py
# POZYX_TEMPERATURE = 0x80  # Temperature
# 
# POZYX_PRESSURE = 0x50  # Pressure data in mPa
# 
# POZYX_MAX_LIN_ACC = 0x4E  # Return the max linear acceleration and reset it to 0


# Path: unit_tests/test_sensor.py
from pypozyx import *
from pypozyx.definitions.registers import POZYX_TEMPERATURE, POZYX_PRESSURE, POZYX_MAX_LIN_ACC
from time import sleep

    other_max_linear_acceleration = MaxLinearAcceleration()
    assert max_linear_acceleration == other_max_linear_acceleration, "default max_linear_acceleration objects aren't equal"
    raw_max_linear_acceleration = Data([0], 'h')
    assert raw_max_linear_acceleration == max_linear_acceleration, "max_linear_acceleration not right format of Data([0], 'h')"
    sleep(0.01)


def test_raw_max_linear_acceleration_read(pozyx, remote):
    raw_max_linear_acceleration = Data([0], 'h')
    status = pozyx.getRead(POZYX_MAX_LIN_ACC, raw_max_linear_acceleration)
    assert status == POZYX_SUCCESS, "raw read of max_linear_acceleration unsuccessful"
    assert type(raw_max_linear_acceleration[0]) == type(
        1), "max_linear_acceleration value is not an int"
    sleep(0.01)


def test_max_linear_acceleration_read(pozyx, remote):
    max_linear_acceleration = MaxLinearAcceleration()
    status = pozyx.getMaxLinearAcceleration_mg(max_linear_acceleration, remote)
    assert status == POZYX_SUCCESS, "getMaxLinearAcceleration_mg unsuccessful"
    assert type(max_linear_acceleration.value) == type(
        1.0), "max_linear_acceleration value is not a float"
    float_remainder = max_linear_acceleration.value - \
        int(max_linear_acceleration.value)
    assert float_remainder < 0.01, "max_linear_acceleration accuracy not 1 mg"
    sleep(0.01)


def test_max_linear_acceleration_conversion(pozyx, remote):
    raw_max_linear_acceleration = Data([0], 'h')

    status = pozyx.getRead(POZYX_MAX_LIN_ACC, raw_max_linear_acceleration)