diff --git a/Dockerfile b/Dockerfile index b50e6d9..c9e13a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ FROM python:3.11-slim COPY app /app RUN python -m pip install /app --extra-index-url https://www.piwheels.org/simple -EXPOSE 8000/tcp +EXPOSE 5420/tcp LABEL version="0.0.1" @@ -16,13 +16,13 @@ ARG IMAGE_NAME LABEL permissions='\ {\ "ExposedPorts": {\ - "8000/tcp": {}\ + "5420/tcp": {}\ },\ "HostConfig": {\ "Binds":["/root/.config/blueos/extensions/$IMAGE_NAME:/root/.config"],\ "ExtraHosts": ["host.docker.internal:host-gateway"],\ "PortBindings": {\ - "8000/tcp": [\ + "5420/tcp": [\ {\ "HostPort": ""\ }\ diff --git a/app/.DS_Store b/app/.DS_Store index 67107e2..2a43b86 100644 Binary files a/app/.DS_Store and b/app/.DS_Store differ diff --git a/app/main.py b/app/main.py index ec07172..383abc3 100644 --- a/app/main.py +++ b/app/main.py @@ -9,9 +9,9 @@ app = Flask(__name__, static_url_path="/static", static_folder="static") #setup flask app logging_active = False# Global variable to control the logging -distance_url = 'http://127.0.0.1/mavlink2rest/mavlink/vehicles/1/components/194/messages/DISTANCE_SENSOR' #10.144.19.16 -gps_url = 'http://127.0.0.1/mavlink2rest/mavlink/vehicles/1/components/1/messages/GLOBAL_POSITION_INT' -yaw_url= 'http://127.0.0.1/mavlink2rest/mavlink/vehicles/1/components/1/messages/ATTITUDE' +distance_url = 'http://0.0.0.0/mavlink2rest/mavlink/vehicles/1/components/194/messages/DISTANCE_SENSOR' #10.144.19.16 +gps_url = 'http://0.0.0.0/mavlink2rest/mavlink/vehicles/1/components/1/messages/GLOBAL_POSITION_INT' +yaw_url= 'http://0.0.0.0/mavlink2rest/mavlink/vehicles/1/components/1/messages/ATTITUDE' log_file = 'sensordata.csv' log_rate = 2 #Desired rate in Hz data = []