Skip to content

UDP not giving data in Teleplot #39

Description

@AmberElferink

I cannot seem UDP plotting to work on teleplot, even running the basic python example.
image

  • I'm using the default python example, literal copy paste:
  • Run it
  • Expectation: see sine/cosine plotted in teleplot
  • Behaviour: Nothing shows up in the teleplot screen, even if adding the local address + port manually.
  • Is there something else I have to enable to get it working?

default code I'm running

import socket
import math
import time

teleplotAddr = ("127.0.0.1",47269)
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

def sendTelemetry(name, value):
    now = time.time() * 1000
    msg = name+":"+str(now)+":"+str(value)+"|g"
    sock.sendto(msg.encode(), teleplotAddr)

i=0
while i < 1000:
    
    sendTelemetry("sin", math.sin(i))
    sendTelemetry("cos", math.cos(i))

    i+=0.1
    time.sleep(0.01)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions