Skip to content

Rainmaker - CmakeList.txt + src files edit #6437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 3 additions & 0 deletions libraries/RainMaker/src/RMaker.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include "sdkconfig.h"
#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK
#include "RMaker.h"
#include <esp_rmaker_schedule.h>
#include <esp_rmaker_utils.h>
Expand Down Expand Up @@ -112,3 +114,4 @@ esp_err_t RMakerClass::enableOTA(ota_type_t type, const char *cert)
}

RMakerClass RMaker;
#endif
3 changes: 3 additions & 0 deletions libraries/RainMaker/src/RMaker.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -38,3 +40,4 @@ class RMakerClass
};

extern RMakerClass RMaker;
#endif
3 changes: 3 additions & 0 deletions libraries/RainMaker/src/RMakerDevice.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include "sdkconfig.h"
#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK
#include "RMakerDevice.h"

static esp_err_t err;
Expand Down Expand Up @@ -204,3 +206,4 @@ esp_err_t Device::updateAndReportParam(const char *param_name, const char *my_va
}
return ESP_OK;
}
#endif
3 changes: 3 additions & 0 deletions libraries/RainMaker/src/RMakerDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <esp_rmaker_standard_devices.h>
Expand Down Expand Up @@ -162,3 +164,4 @@ class TemperatureSensor : public Device
}
}
};
#endif
3 changes: 3 additions & 0 deletions libraries/RainMaker/src/RMakerNode.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include "sdkconfig.h"
#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK
#include "RMakerNode.h"
static esp_err_t err;

Expand Down Expand Up @@ -37,3 +39,4 @@ esp_err_t Node::addNodeAttr(const char *attr_name, const char *val)
}
return err;
}
#endif
3 changes: 3 additions & 0 deletions libraries/RainMaker/src/RMakerNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -41,3 +43,4 @@ class Node
node_info_t *getNodeInfo();
esp_err_t addNodeAttr(const char *attr_name, const char *val);
};
#endif
3 changes: 3 additions & 0 deletions libraries/RainMaker/src/RMakerParam.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include "sdkconfig.h"
#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK
#include "RMakerParam.h"

static esp_err_t err;
Expand Down Expand Up @@ -28,3 +30,4 @@ esp_err_t Param::updateAndReport(param_val_t val)
}
return err;
}
#endif
3 changes: 3 additions & 0 deletions libraries/RainMaker/src/RMakerParam.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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
3 changes: 3 additions & 0 deletions libraries/RainMaker/src/RMakerQR.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <qrcode.h>

Expand All @@ -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
3 changes: 3 additions & 0 deletions libraries/RainMaker/src/RMakerType.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#include "sdkconfig.h"
#ifdef CONFIG_ESP_RMAKER_WORK_QUEUE_TASK_STACK
#include "RMakerType.h"

param_val_t value(int ival)
Expand All @@ -19,3 +21,4 @@ param_val_t value(float fval)
{
return esp_rmaker_float(fval);
}
#endif
3 changes: 3 additions & 0 deletions libraries/RainMaker/src/RMakerType.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <esp_rmaker_core.h>
#include <esp_rmaker_ota.h>
Expand All @@ -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
3 changes: 3 additions & 0 deletions libraries/RainMaker/src/RMakerUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <esp_rmaker_utils.h>

Expand All @@ -24,3 +26,4 @@ static void RMakerWiFiReset(int seconds)
{
esp_rmaker_wifi_reset(0, seconds);
}
#endif