deleted test stuff
This commit is contained in:
parent
88d4561f9e
commit
68f75f252d
@ -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
|
||||
|
||||
@ -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() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user