Closed dsblank closed 7 months ago
Ah, I see. I needed to:
idf.py set-target esp32s3
before build.
I had to add a few includes to get this to compile:
diff --git a/ESP32/main/model/indicator_btn.c b/ESP32/main/model/indicator_btn.c
index fb8b207..21897dd 100644
--- a/ESP32/main/model/indicator_btn.c
+++ b/ESP32/main/model/indicator_btn.c
@@ -1,6 +1,7 @@
#include "indicator_btn.h"
#include "indicator_display.h"
#include "bsp_btn.h"
+#include "esp_timer.h"
static uint32_t hold_cnt=0;
static bool sleep_flag=false;
diff --git a/ESP32/main/model/indicator_display.h b/ESP32/main/model/indicator_display.h
index 9dd917e..656b353 100644
--- a/ESP32/main/model/indicator_display.h
+++ b/ESP32/main/model/indicator_display.h
@@ -3,6 +3,7 @@
#include "config.h"
#include "view_data.h"
+#include <time.h>
#ifdef __cplusplus
extern "C" {
diff --git a/ESP32/main/model/indicator_ha_config.h b/ESP32/main/model/indicator_ha_config.h
index 3ea5a81..34d9b2b 100644
--- a/ESP32/main/model/indicator_ha_config.h
+++ b/ESP32/main/model/indicator_ha_config.h
@@ -3,6 +3,7 @@
#include "config.h"
#include "view_data.h"
+#include <time.h>
// Define struct for sensors in a page
typedef struct ha_config_page_sensor
diff --git a/ESP32/main/model/indicator_time.c b/ESP32/main/model/indicator_time.c
index 128cc23..5b772d6 100644
--- a/ESP32/main/model/indicator_time.c
+++ b/ESP32/main/model/indicator_time.c
@@ -3,6 +3,7 @@
#include "freertos/semphr.h"
#include "nvs.h"
#include <stdlib.h>
+#include "esp_timer.h"
#define DEBUG_TIME 0
diff --git a/ESP32/main/ui/screens/ui_screen_ha_templates.h b/ESP32/main/ui/screens/ui_screen_ha_templates.h
index 6595e63..75d3b38 100644
--- a/ESP32/main/ui/screens/ui_screen_ha_templates.h
+++ b/ESP32/main/ui/screens/ui_screen_ha_templates.h
@@ -4,7 +4,7 @@
#include "../../model/indicator_ha_config.h"
#include "../ui.h"
-
+#include <time.h>
// Define small sensor
@@ -80,4 +80,4 @@ void create_switch_arc(int size, lv_obj_t *parent, ha_switch_t *switch_, int bt_
void create_switch_slider(int size, lv_obj_t *parent, ha_switch_t *switch_, int bt_x, int bt_y, char *label, char *unit);
void ui_event_btn(lv_event_t *e);
-#endif
\ No newline at end of file
+#endif
diff --git a/ESP32/main/view_data.h b/ESP32/main/view_data.h
index 4cc02a8..ac519eb 100644
--- a/ESP32/main/view_data.h
+++ b/ESP32/main/view_data.h
@@ -2,6 +2,7 @@
#define VIEW_DATA_H
#include "config.h"
+#include <time.h>
#ifdef __cplusplus
extern "C"
hi,
Sorry for the late reply. the esp version might require adjustment you made. With esp 5.1 it was building fine. I am busy with other projects but I hope to be back on this one in few months to finish the implementation of the screens and widgets based on the json.
Here is what I have done to build the project (from my notes.)
esp-idf
in #VSCode using extensions (I use VSCode for all my devs).ctrl+shift+p
: Open ESP-IDF terminal)$env:IDF_TARGET='esp32s3'
idf.py menuconfig
to find the correct settings (PSRAM, SPI, anything else for custom needs), here I had to enable exploratory features to have 120M available for SPI. Otherwise, it is set to 80M by IDF and the 120M setting in the sdkconfig.default
is lost at the first build.idf.py build oridf.py -p PORT
build flash monitor
Steps to reproduce:
Using with a SenseCapIndicator, but I didn't get that far.
Did I miss a step?