Skip to content

Namespace pyspacemouse::config_helpers

Namespace List > pyspacemouse > config_helpers

More...

Public Attributes

Type Name
AxisRemap = Dict[Axis, Union[Axis, Tuple[Axis, Literal[-1, 1]]]]

Public Functions

Type Name
DeviceInfo apply_axis_convention (DeviceInfo base, AxisConvention convention)
DeviceInfo create_device_info (str name, int vendor_id, int product_id, dict] mappings, dict]|None buttons=None, tuple|None led_id=None, float axis_scale=350.0, AxisConvention|None convention=None)
DeviceInfo modify_device_info (DeviceInfo base, str|None name=None, AxisRemap|None remap_axes=None, list|None invert_axes=None, float|None axis_scale=None)

Protected Attributes

Type Name
dict _HID_TO_CONVENTION

Protected Functions

Type Name
AxisSpec _copy_axis_spec (AxisSpec spec, int sign=1)
DeviceInfo _normalize_to_hid (DeviceInfo spec)
tuple[Axis, int] _parse_axis_remap (str target_axis, Axis|tuple] remap)

Detailed Description

Public Attributes Documentation

variable AxisRemap

pyspacemouse::config_helpers.AxisRemap;

Public Functions Documentation

function apply_axis_convention

DeviceInfo pyspacemouse::config_helpers::apply_axis_convention (
    DeviceInfo base,
    AxisConvention convention
) 

function create_device_info

DeviceInfo pyspacemouse::config_helpers::create_device_info (
    str name,
    int vendor_id,
    int product_id,
    dict] mappings,
    dict]|None buttons=None,
    tuple|None led_id=None,
    float axis_scale=350.0,
    AxisConvention |None convention=None
) 

function modify_device_info

DeviceInfo pyspacemouse::config_helpers::modify_device_info (
    DeviceInfo base,
    str|None name=None,
    AxisRemap |None remap_axes=None,
    list|None invert_axes=None,
    float|None axis_scale=None
) 

Protected Attributes Documentation

variable _HID_TO_CONVENTION

dict pyspacemouse::config_helpers._HID_TO_CONVENTION;

Protected Functions Documentation

function _copy_axis_spec

AxisSpec pyspacemouse::config_helpers::_copy_axis_spec (
    AxisSpec spec,
    int sign=1
) 

function _normalize_to_hid

DeviceInfo pyspacemouse::config_helpers::_normalize_to_hid (
    DeviceInfo spec
) 

function _parse_axis_remap

tuple[Axis, int] pyspacemouse::config_helpers::_parse_axis_remap (
    str target_axis,
    Axis|tuple] remap
) 


The documentation for this class was generated from the following file pyspacemouse/config_helpers.py