From 68f75f252daf3893f93e58bbf46019692f4d8131 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 3 Jul 2020 13:21:13 +0200 Subject: [PATCH] deleted test stuff --- src/connections.cpp | 28 ---------------------------- src/lightSensor.cpp | 6 ------ 2 files changed, 34 deletions(-) diff --git a/src/connections.cpp b/src/connections.cpp index 9b7e9fe..3830f28 100644 --- a/src/connections.cpp +++ b/src/connections.cpp @@ -63,13 +63,6 @@ void connectMQTT() { mqttClient.subscribe(MQTT_PATH_SUB); Serial.print("subscribed to: "); Serial.println(MQTT_PATH_SUB); -<<<<<<< HEAD - - //Testing read - uint16_t packetIdSub2 = mqttClient.subscribe("smartgarden/updates/esp-sebastian/brightness", 2); - Serial.print("also subscribed to: "); - Serial.println("smartgarden/updates/esp-sebastian/brightness"); -======= xTaskCreate( mqttLoop, /* Task function. */ "mqttLoop", /* String with name of task. */ @@ -78,7 +71,6 @@ void connectMQTT() { 1, /* Priority of the task. */ &mqttTask); /* Task handle. */ //xTimerStart(mqttProcessingTimer, 0); ->>>>>>> develop } void WiFiEvent(WiFiEvent_t event) { @@ -114,20 +106,6 @@ void onMqttMessage(char *topic, byte *payload, unsigned int payload_length) { Serial.println(topic); toggleValve(); } -<<<<<<< HEAD - - //Testing reading - String messageTemp; - for (int i = 0; i < len; i++) { - //Serial.print((char)payload[i]); - messageTemp += (char)payload[i]; - } - if (strcmp(topic, "smartgarden/updates/esp-sebastian/brightness") == 0) { - Serial.println("### Received brightness value: ###"); - Serial.println(messageTemp); - } - -======= if (strcmp(topic, MQTT_SOIL_PROPERTIES) == 0) { Serial.println("receiving soil thresholds..."); Serial.println(topic); @@ -145,7 +123,6 @@ void onMqttMessage(char *topic, byte *payload, unsigned int payload_length) { Serial.println(err.c_str()); } } ->>>>>>> develop } void setupConnections() { @@ -168,11 +145,6 @@ void setupConnections() { } void publishMessage(const char *topic, const char *msg) { -<<<<<<< HEAD - mqttClient.publish(topic, 1, true, msg); -} -======= mqttClient.publish(topic, msg); // mqttClient.publish(topic, msg, true, 1); } ->>>>>>> develop diff --git a/src/lightSensor.cpp b/src/lightSensor.cpp index 992b5dd..776a3fd 100644 --- a/src/lightSensor.cpp +++ b/src/lightSensor.cpp @@ -3,15 +3,9 @@ BH1750 lightMeter; void setupLightSensor() { -<<<<<<< HEAD - Wire.begin(); - lightMeter.begin(); - Serial.println("Light-Sensor started..."); -======= Wire.begin(); lightMeter.begin(); Serial.println("Sensor started..."); ->>>>>>> develop } float readLightSensorValue() {