Skip to content

Commit 4866f93

Browse files
authored
Merge pull request #6437 from P-R-O-C-H-Y/rainmaker-fix
Rainmaker - CmakeList.txt + src files edit
2 parents 75cac9c + 7846ab3 commit 4866f93

13 files changed

+37
-1
lines changed

Diff for: CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ endfunction()
239239

240240
maybe_add_component(esp-dsp)
241241

242-
if(IDF_TARGET MATCHES "esp32" AND CONFIG_ESP_RMAKER_TASK_STACK)
242+
if(CONFIG_ESP_RMAKER_TASK_STACK)
243243
maybe_add_component(esp_rainmaker)
244244
maybe_add_component(qrcode)
245245
endif()

Diff for: libraries/RainMaker/src/RMaker.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "sdkconfig.h"
2+
#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK
13
#include "RMaker.h"
24
#include <esp_rmaker_schedule.h>
35
#include <esp_rmaker_utils.h>
@@ -112,3 +114,4 @@ esp_err_t RMakerClass::enableOTA(ota_type_t type, const char *cert)
112114
}
113115

114116
RMakerClass RMaker;
117+
#endif

Diff for: libraries/RainMaker/src/RMaker.h

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414
#pragma once
15+
#include "sdkconfig.h"
16+
#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK
1517
#include "esp_system.h"
1618
#include "Arduino.h"
1719
#include "RMakerNode.h"
@@ -38,3 +40,4 @@ class RMakerClass
3840
};
3941

4042
extern RMakerClass RMaker;
43+
#endif

Diff for: libraries/RainMaker/src/RMakerDevice.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "sdkconfig.h"
2+
#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK
13
#include "RMakerDevice.h"
24

35
static esp_err_t err;
@@ -204,3 +206,4 @@ esp_err_t Device::updateAndReportParam(const char *param_name, const char *my_va
204206
}
205207
return ESP_OK;
206208
}
209+
#endif

Diff for: libraries/RainMaker/src/RMakerDevice.h

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414
#pragma once
15+
#include "sdkconfig.h"
16+
#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK
1517
#include "esp_system.h"
1618
#include "RMakerParam.h"
1719
#include <esp_rmaker_standard_devices.h>
@@ -162,3 +164,4 @@ class TemperatureSensor : public Device
162164
}
163165
}
164166
};
167+
#endif

Diff for: libraries/RainMaker/src/RMakerNode.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "sdkconfig.h"
2+
#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK
13
#include "RMakerNode.h"
24
static esp_err_t err;
35

@@ -37,3 +39,4 @@ esp_err_t Node::addNodeAttr(const char *attr_name, const char *val)
3739
}
3840
return err;
3941
}
42+
#endif

Diff for: libraries/RainMaker/src/RMakerNode.h

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414
#pragma once
15+
#include "sdkconfig.h"
16+
#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK
1517
#include "esp_system.h"
1618
#include "RMakerDevice.h"
1719

@@ -41,3 +43,4 @@ class Node
4143
node_info_t *getNodeInfo();
4244
esp_err_t addNodeAttr(const char *attr_name, const char *val);
4345
};
46+
#endif

Diff for: libraries/RainMaker/src/RMakerParam.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "sdkconfig.h"
2+
#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK
13
#include "RMakerParam.h"
24

35
static esp_err_t err;
@@ -28,3 +30,4 @@ esp_err_t Param::updateAndReport(param_val_t val)
2830
}
2931
return err;
3032
}
33+
#endif

Diff for: libraries/RainMaker/src/RMakerParam.h

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414
#pragma once
15+
#include "sdkconfig.h"
16+
#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK
1517
#include "esp_system.h"
1618
#include "RMakerType.h"
1719

@@ -46,3 +48,4 @@ class Param
4648
esp_err_t addBounds(param_val_t min, param_val_t max, param_val_t step);
4749
esp_err_t updateAndReport(param_val_t val);
4850
};
51+
#endif

Diff for: libraries/RainMaker/src/RMakerQR.h

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414
#pragma once
15+
#include "sdkconfig.h"
16+
#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK
1517
#include "esp_system.h"
1618
#include <qrcode.h>
1719

@@ -32,3 +34,4 @@ static void printQR(const char *name, const char *pop, const char *transport)
3234
qrcode_display(payload);
3335
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);
3436
}
37+
#endif

Diff for: libraries/RainMaker/src/RMakerType.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "sdkconfig.h"
2+
#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK
13
#include "RMakerType.h"
24

35
param_val_t value(int ival)
@@ -19,3 +21,4 @@ param_val_t value(float fval)
1921
{
2022
return esp_rmaker_float(fval);
2123
}
24+
#endif

Diff for: libraries/RainMaker/src/RMakerType.h

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414
#pragma once
15+
#include "sdkconfig.h"
16+
#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK
1517
#include "esp_system.h"
1618
#include <esp_rmaker_core.h>
1719
#include <esp_rmaker_ota.h>
@@ -31,3 +33,4 @@ param_val_t value(int);
3133
param_val_t value(bool);
3234
param_val_t value(char *);
3335
param_val_t value(float);
36+
#endif

Diff for: libraries/RainMaker/src/RMakerUtils.h

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414
#pragma once
15+
#include "sdkconfig.h"
16+
#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK
1517
#include "esp_system.h"
1618
#include <esp_rmaker_utils.h>
1719

@@ -24,3 +26,4 @@ static void RMakerWiFiReset(int seconds)
2426
{
2527
esp_rmaker_wifi_reset(0, seconds);
2628
}
29+
#endif

0 commit comments

Comments
 (0)