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

Mono #14

Merged
merged 31 commits into from
Apr 19, 2021
Merged

Mono #14

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed
  • Loading branch information
luke-iqt committed Mar 22, 2021
commit d1333a56e367d8b1d1a81e8a67b98b2785e1e5e7
116 changes: 116 additions & 0 deletions Config.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"broker=\"192.168.2.3\"\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: paho-mqtt in /Users/lberndt/opt/anaconda3/lib/python3.8/site-packages (1.5.0)\r\n"
]
}
],
"source": [
"!pip install paho-mqtt"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"import paho.mqtt.client as mqtt"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"client =mqtt.Client(\"notebook-config\")"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"client.connect(broker)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<paho.mqtt.client.MQTTMessageInfo at 0x7f8d00eb9a40>"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"client.publish(\"skyscan/config/json\",\"{'cameraZoom': 5000}\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
3 changes: 2 additions & 1 deletion axis-ptz/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ def on_message(client, userdata, message):
bearingGood = setPan(update["bearing"])
setTilt(update["elevation"])
currentPlane = update
elif message.topic =
elif message.topic == config_topic:
update_config(update)
else:
logging.info("Message: {} Object: {} Flight: {}".format(message.topic, object_topic, flight_topic))

Expand Down