Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert data #8

Closed
CutieCat6778 opened this issue Mar 13, 2025 · 0 comments
Closed

Convert data #8

CutieCat6778 opened this issue Mar 13, 2025 · 0 comments

Comments

@CutieCat6778
Copy link
Contributor

def float64_to_bytes(f):
    try:
        # Pack float64 into bytes using little-endian format
        # '<d' means little-endian double precision float
        return struct.pack('<d', f)
    except Exception as e:
        print("UDP_SERVICE: Failed to convert float64 to bytes")
        return None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant