From 5a7c270cb23b2250b99c66c6b10a2cf5a479eb76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=2E=20=C3=81rkosi=20R=C3=B3bert?= Date: Fri, 8 Oct 2021 22:05:02 +0200 Subject: [PATCH 1/2] remove unneeded stuff --- src/custom/my_custom_fan_template.cpp | 28 --------------------------- 1 file changed, 28 deletions(-) diff --git a/src/custom/my_custom_fan_template.cpp b/src/custom/my_custom_fan_template.cpp index 28a0ee48..03fc171e 100644 --- a/src/custom/my_custom_fan_template.cpp +++ b/src/custom/my_custom_fan_template.cpp @@ -48,34 +48,6 @@ void custom_loop() } } -void custom_every_second() -{ - Serial.print("#"); -} - -void custom_every_5seconds() -{ - Log.verbose(TAG_CUSTOM, "5 seconds have passsed..."); - dispatch_state_subtopic("my_sensor", "{\"test\":123}"); -} - -bool custom_pin_in_use(uint pin) -{ - if(pin == 1024) return true; // fictuous used pin - - // otherwise the pin is not used - return false; -} - -void custom_get_sensors(JsonDocument& doc) -{ - /* Sensor Name */ - JsonObject sensor = doc.createNestedObject(F("Custom")); - - /* Key-Value pair of the sensor value */ - sensor[F("Random")] = random(256); -} - /* Receive custom topic & payload messages */ void custom_topic_payload(const char* topic, const char* payload, uint8_t source) { From 9d5435a1b6171112a1a5190b0802bd7324f4502e Mon Sep 17 00:00:00 2001 From: fvanroie <15969459+fvanroie@users.noreply.github.com> Date: Fri, 8 Oct 2021 22:35:55 +0200 Subject: [PATCH 2/2] Keep the function names I removed the code, but kept the names of the function --- src/custom/my_custom_fan_template.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/custom/my_custom_fan_template.cpp b/src/custom/my_custom_fan_template.cpp index 03fc171e..a7334388 100644 --- a/src/custom/my_custom_fan_template.cpp +++ b/src/custom/my_custom_fan_template.cpp @@ -48,6 +48,27 @@ void custom_loop() } } +void custom_every_second() +{ + // Unused +} + +void custom_every_5seconds() +{ + // Unused +} + +bool custom_pin_in_use(uint pin) +{ + // no pins are used + return false; +} + +void custom_get_sensors(JsonDocument& doc) +{ + // Unused +} + /* Receive custom topic & payload messages */ void custom_topic_payload(const char* topic, const char* payload, uint8_t source) {