Browse Source

Minor changes to start without sensors

master
Luis Waldhauser 1 year ago
parent
commit
24268d3039
1 changed files with 11 additions and 4 deletions
  1. 11
    4
      software/roboter/raspy/mainProg.py

+ 11
- 4
software/roboter/raspy/mainProg.py View File

import os import os
import time import time
from raspy_sensors import RaspySensors from raspy_sensors import RaspySensors

from software.defines import Topics, RASPI_CLIENT_ID, MQTT_BROKER_GLOBAL from software.defines import Topics, RASPI_CLIENT_ID, MQTT_BROKER_GLOBAL




#region global Varaibles #region global Varaibles


sensors: RaspySensors
# FIXME Sensor not working
#sensors: RaspySensors




#endregion #endregion
#CHECK if working properly #CHECK if working properly


print("Measuring Sensors") print("Measuring Sensors")
measure_send_data(plantID, actionID, client)

#FIXME Sensor not working
# measure_send_data(plantID, actionID, client)


print("Robot driving home") print("Robot driving home")
if plantID % 2 == 0: if plantID % 2 == 0:
Runs forever and controlls all robot functions Runs forever and controlls all robot functions
""" """
# CHECK if global # CHECK if global
global sensors
sensors = RaspySensors()
# FIXME Sensor not working
# global sensors
# sensors = RaspySensors()
client = mqtt.Client(RASPI_CLIENT_ID) client = mqtt.Client(RASPI_CLIENT_ID)
client.on_connect = on_connect client.on_connect = on_connect
client.connect(MQTT_BROKER_GLOBAL) client.connect(MQTT_BROKER_GLOBAL)

Loading…
Cancel
Save