util.sensors – sensors utility module

???

Functions

util.sensors.register_ports(???)

???

util.sensors.is_type(???)

???

util.sensors._is_motor(???)

???

util.sensors._type_change_handler(???)

???

util.sensors.get_sensor_value(???)

???

util.sensors.update_sensor_data(???)

???

util.sensors.update_battery_status(???)

???

util.sensors.reset_to_default_mode(???)

???

util.sensors.set_display_sync(???)

???

util.sensors.current_motion(???)

???

Variables

util.sensors.battery_status

??? Observed value: [8.36, 100, True]

util.sensors.sensor_data

??? Observed value: [[0, ()], [0, ()], [0, ()], [0, ()], [0, ()], [0, ()], (0, -805, 585), (3, 3, 0), (-3, 0, 54), ‘’, 0]

Constants

util.sensors._PORTS = [Port(A), Port(B), Port(C), Port(D), Port(E), Port(F)]

List of the six port objects of the six ports on the Hub. See hub.Port.

util.sensors._REVERSE_MODES = {48: [3, 0, 1, 2], 65: [3, 0, 1, 2], 49: [3, 0, 1, 2], 75: [3, 0, 1, 2], 76: [3, 0, 1, 2], 61: [1, 0, 2, 3, 4], 62: [0], 63: [0, 1, -1, -1, 2]}

???

util.sensors._EVENT_MODE = [[], [], [], [], [], []]

???

util.sensors._PORT_INDEX_MAP = ['A', 'B', 'C', 'D', 'E', 'F', 'ACCELEROMETER', 'GYROSCOPE', 'POSITION', 'ORIENTATION', 'TIMER']

???

util.sensors._PORT_TYPE = [0, 0, 0, 0, 0, 0]

???

util.sensors._NO_DATA = ()

???

util.sensors._SYNC_DISPLAY = False

???

util.sensors._DEFAULT_MODE = {48: [(1, 0), (2, 2), (3, 1), (0, 0)], 65: [(1, 0), (2, 2), (3, 1), (1, 0)], 49: [(1, 0), (2, 2), (3, 1), (0, 0)], 75: [(1, 0), (2, 2), (3, 1), (0, 0)], 76: [(1, 0), (2, 2), (3, 1), (0, 0)], 61: [(1, 0), (0, 0), (5, 0), (5, 1), (5, 2)], 62: [(0, 0)], 63: [(0, 0), (1, 0), (4, 0)]}

???

util.sensors._MOTOR_TYPES = [65, 48, 49, 75, 76]

List of the LPF2 type IDs that correspond to motors.