From 2810f1ece58b81ea889dd657af56ded33214bc5c Mon Sep 17 00:00:00 2001
From: Henrik Lindgren <henrik@hlindgren.xyz>
Date: Wed, 7 Dec 2022 16:37:28 +0100
Subject: [PATCH] get ip and port from variables set from controls

---
 exporter.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/exporter.py b/exporter.py
index 4c72224..cafaff1 100644
--- a/exporter.py
+++ b/exporter.py
@@ -252,7 +252,7 @@ def unregister():
 
 
 def send_motion(servo_data):
-    requests.post('http://' + DOFBOT_IP + ':' + str(DOFBOT_PORT) + '/motion', json = servo_data)
+    requests.post('http://' + bpy.context.scene.dofbot.dofbot_ip + ':' + str(bpy.context.scene.dofbot.dofbot_port) + '/motion', json = servo_data)
 
 
 def run_animation():
-- 
GitLab