New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

amfiprot-amfitrack

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amfiprot-amfitrack

AmfiTrack extension for Amfiprot

  • 0.0.1a14
  • PyPI
  • Socket score

Maintainers
2

AmfiTrack extensions for the Amfiprot package.

Installation

Install (or update) with pip:

pip install -U amfiprot-amfitrack

Usage example

Instead of creating a generic amfiprot.Device, create an amfitrack.Device to get access to AmfiTrack specific functionality and payload interpretation:

import amfiprot
import amfiprot_amfitrack as amfitrack

VENDOR_ID = 0xC17
PRODUCT_ID_SENSOR = 0xD12
PRODUCT_ID_SOURCE = 0xD01

if __name__ == "__main__":
    conn = None
    try:
        conn = amfiprot.USBConnection(VENDOR_ID, PRODUCT_ID_SENSOR)
    except:
        try:
            conn = amfiprot.USBConnection(VENDOR_ID, PRODUCT_ID_SOURCE)
        except:
            print("No Amfitrack device found")
            exit()
            
    nodes = conn.find_nodes()

    print(f"Found {len(nodes)} node(s).")
    for node in nodes:
        print(f"[{node.tx_id}] {node.name}")

    dev = amfitrack.Device(nodes[0])
    conn.start()
    
    cfg = dev.config.read_all()
    dev.calibrate()

    while True:
        if dev.packet_available():
            packet = dev.get_packet()
            if type(packet.payload) == amfitrack.payload.EmfImuFrameIdPayload:
                payload: amfitrack.payload.EmfImuFrameIdPayload = packet.payload
                print(payload.emf)
            else:
                print(packet)

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc