diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b47fd9129d..99f42cceaa2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -239,7 +239,7 @@ endfunction() maybe_add_component(esp-dsp) -if(IDF_TARGET MATCHES "esp32" AND CONFIG_ESP_RMAKER_TASK_STACK) +if(CONFIG_ESP_RMAKER_TASK_STACK) maybe_add_component(esp_rainmaker) maybe_add_component(qrcode) endif() diff --git a/libraries/RainMaker/src/RMaker.cpp b/libraries/RainMaker/src/RMaker.cpp index 6740f5db58e..2fda954c1ea 100644 --- a/libraries/RainMaker/src/RMaker.cpp +++ b/libraries/RainMaker/src/RMaker.cpp @@ -1,3 +1,5 @@ +#include "sdkconfig.h" +#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK #include "RMaker.h" #include #include @@ -112,3 +114,4 @@ esp_err_t RMakerClass::enableOTA(ota_type_t type, const char *cert) } RMakerClass RMaker; +#endif diff --git a/libraries/RainMaker/src/RMaker.h b/libraries/RainMaker/src/RMaker.h index aea700e932f..dbfbe5c49f5 100644 --- a/libraries/RainMaker/src/RMaker.h +++ b/libraries/RainMaker/src/RMaker.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. #pragma once +#include "sdkconfig.h" +#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK #include "esp_system.h" #include "Arduino.h" #include "RMakerNode.h" @@ -38,3 +40,4 @@ class RMakerClass }; extern RMakerClass RMaker; +#endif \ No newline at end of file diff --git a/libraries/RainMaker/src/RMakerDevice.cpp b/libraries/RainMaker/src/RMakerDevice.cpp index ed9f6501abd..dd1a3ba4ea4 100644 --- a/libraries/RainMaker/src/RMakerDevice.cpp +++ b/libraries/RainMaker/src/RMakerDevice.cpp @@ -1,3 +1,5 @@ +#include "sdkconfig.h" +#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK #include "RMakerDevice.h" static esp_err_t err; @@ -204,3 +206,4 @@ esp_err_t Device::updateAndReportParam(const char *param_name, const char *my_va } return ESP_OK; } +#endif diff --git a/libraries/RainMaker/src/RMakerDevice.h b/libraries/RainMaker/src/RMakerDevice.h index 3c57b4245fe..f813359a25a 100644 --- a/libraries/RainMaker/src/RMakerDevice.h +++ b/libraries/RainMaker/src/RMakerDevice.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. #pragma once +#include "sdkconfig.h" +#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK #include "esp_system.h" #include "RMakerParam.h" #include @@ -162,3 +164,4 @@ class TemperatureSensor : public Device } } }; +#endif \ No newline at end of file diff --git a/libraries/RainMaker/src/RMakerNode.cpp b/libraries/RainMaker/src/RMakerNode.cpp index 6d5dce3213b..5cae9e8dea9 100644 --- a/libraries/RainMaker/src/RMakerNode.cpp +++ b/libraries/RainMaker/src/RMakerNode.cpp @@ -1,3 +1,5 @@ +#include "sdkconfig.h" +#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK #include "RMakerNode.h" static esp_err_t err; @@ -37,3 +39,4 @@ esp_err_t Node::addNodeAttr(const char *attr_name, const char *val) } return err; } +#endif \ No newline at end of file diff --git a/libraries/RainMaker/src/RMakerNode.h b/libraries/RainMaker/src/RMakerNode.h index 81cc0e89616..d169870f591 100644 --- a/libraries/RainMaker/src/RMakerNode.h +++ b/libraries/RainMaker/src/RMakerNode.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. #pragma once +#include "sdkconfig.h" +#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK #include "esp_system.h" #include "RMakerDevice.h" @@ -41,3 +43,4 @@ class Node node_info_t *getNodeInfo(); esp_err_t addNodeAttr(const char *attr_name, const char *val); }; +#endif \ No newline at end of file diff --git a/libraries/RainMaker/src/RMakerParam.cpp b/libraries/RainMaker/src/RMakerParam.cpp index b1196aae955..50a994c7590 100644 --- a/libraries/RainMaker/src/RMakerParam.cpp +++ b/libraries/RainMaker/src/RMakerParam.cpp @@ -1,3 +1,5 @@ +#include "sdkconfig.h" +#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK #include "RMakerParam.h" static esp_err_t err; @@ -28,3 +30,4 @@ esp_err_t Param::updateAndReport(param_val_t val) } return err; } +#endif diff --git a/libraries/RainMaker/src/RMakerParam.h b/libraries/RainMaker/src/RMakerParam.h index f0fce9d4cf8..d1b4ea6d9d6 100644 --- a/libraries/RainMaker/src/RMakerParam.h +++ b/libraries/RainMaker/src/RMakerParam.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. #pragma once +#include "sdkconfig.h" +#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK #include "esp_system.h" #include "RMakerType.h" @@ -46,3 +48,4 @@ class Param esp_err_t addBounds(param_val_t min, param_val_t max, param_val_t step); esp_err_t updateAndReport(param_val_t val); }; +#endif \ No newline at end of file diff --git a/libraries/RainMaker/src/RMakerQR.h b/libraries/RainMaker/src/RMakerQR.h index 5e0a87021de..7b666557fcd 100644 --- a/libraries/RainMaker/src/RMakerQR.h +++ b/libraries/RainMaker/src/RMakerQR.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. #pragma once +#include "sdkconfig.h" +#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK #include "esp_system.h" #include @@ -32,3 +34,4 @@ static void printQR(const char *name, const char *pop, const char *transport) qrcode_display(payload); Serial.printf("If QR code is not visible, copy paste the below URL in a browser.\n%s?data=%s\n", QRCODE_BASE_URL, payload); } +#endif \ No newline at end of file diff --git a/libraries/RainMaker/src/RMakerType.cpp b/libraries/RainMaker/src/RMakerType.cpp index 022c8afdb35..d94337cec4c 100644 --- a/libraries/RainMaker/src/RMakerType.cpp +++ b/libraries/RainMaker/src/RMakerType.cpp @@ -1,3 +1,5 @@ +#include "sdkconfig.h" +#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK #include "RMakerType.h" param_val_t value(int ival) @@ -19,3 +21,4 @@ param_val_t value(float fval) { return esp_rmaker_float(fval); } +#endif \ No newline at end of file diff --git a/libraries/RainMaker/src/RMakerType.h b/libraries/RainMaker/src/RMakerType.h index 60a01475826..003bd32a523 100644 --- a/libraries/RainMaker/src/RMakerType.h +++ b/libraries/RainMaker/src/RMakerType.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. #pragma once +#include "sdkconfig.h" +#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK #include "esp_system.h" #include #include @@ -31,3 +33,4 @@ param_val_t value(int); param_val_t value(bool); param_val_t value(char *); param_val_t value(float); +#endif \ No newline at end of file diff --git a/libraries/RainMaker/src/RMakerUtils.h b/libraries/RainMaker/src/RMakerUtils.h index 405e725a333..710b0e9a8a4 100644 --- a/libraries/RainMaker/src/RMakerUtils.h +++ b/libraries/RainMaker/src/RMakerUtils.h @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. #pragma once +#include "sdkconfig.h" +#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK #include "esp_system.h" #include @@ -24,3 +26,4 @@ static void RMakerWiFiReset(int seconds) { esp_rmaker_wifi_reset(0, seconds); } +#endif \ No newline at end of file