diff --git a/localTest/local_mqtt_pub_without_ros.py b/localTest/local_mqtt_pub_without_ros.py index ec6c81a..79fd01e 100644 --- a/localTest/local_mqtt_pub_without_ros.py +++ b/localTest/local_mqtt_pub_without_ros.py @@ -1,6 +1,6 @@ import paho.mqtt.client as mqtt import time -import numpy as np + @@ -34,7 +34,7 @@ def on_publish(self, userdata, mid): client.topic_ack.append(mid) -host = "192.168.1.110" +host = "127.0.0.1" port = 1883 topic = "mqtt/pub" @@ -52,8 +52,7 @@ client.loop_start() publish(topic, "Connect", True) count = 0 while True: - randTemp = np.random.uniform(25.0, 35.0) - publish(topic, randTemp) + publish(topic, "publish somthing") time.sleep(2) print(count) count += 1 diff --git a/localTest/local_mqtt_sub_without_ros.py b/localTest/local_mqtt_sub_without_ros.py index c9f393f..cfad305 100644 --- a/localTest/local_mqtt_sub_without_ros.py +++ b/localTest/local_mqtt_sub_without_ros.py @@ -18,7 +18,7 @@ def initialise_clients(cname): return initialise_client -host = "192.168.0.48" +host = "127.0.0.1" port = 1883 topic = "data/pub"