🍒 Makes feature toggles work independent

This commit is contained in:
Rune Harlyk
2024-06-05 14:42:56 +02:00
committed by Rune Harlyk
parent 5f5edcff2c
commit f95fdf02a5
9 changed files with 4702 additions and 4654 deletions
+5 -5
View File
@@ -6,10 +6,10 @@ build_flags =
-D FT_MQTT=0
-D FT_SLEEP=1
-D FT_UPLOAD_FIRMWARE=1
-D FT_DOWNLOAD_FIRMWARE=0
-D FT_DOWNLOAD_FIRMWARE=1
-D FT_ANALYTICS=1
-D FT_IMU=1
-D FT_MAG=1
-D FT_BMP=1
-D FT_GPS=1
-D FT_IMU=0
-D FT_MAG=0
-D FT_BMP=0
-D FT_GPS=0
+20
View File
@@ -292,6 +292,26 @@
#define HREF_GPIO_NUM 7
#define PCLK_GPIO_NUM 13
#elif defined(CAMERA_MODEL_ESP32S3_WROVER)
#define PWDN_GPIO_NUM -1
#define RESET_GPIO_NUM -1
#define XCLK_GPIO_NUM 21
#define SIOD_GPIO_NUM 26
#define SIOC_GPIO_NUM 27
#define Y2_GPIO_NUM 4
#define Y3_GPIO_NUM 5
#define Y4_GPIO_NUM 18
#define Y5_GPIO_NUM 19
#define Y6_GPIO_NUM 36
#define Y7_GPIO_NUM 39
#define Y8_GPIO_NUM 34
#define Y9_GPIO_NUM 35
#define VSYNC_GPIO_NUM 25
#define HREF_GPIO_NUM 23
#define PCLK_GPIO_NUM 22
#else
#error "Camera model not selected"
#endif
@@ -54,6 +54,7 @@ esp_err_t CameraService::InitializeCamera() {
camera_config_t camera_config;
camera_config.ledc_channel = LEDC_CHANNEL_0;
camera_config.ledc_timer = LEDC_TIMER_0;
#if FT_ENABLED(FT_CAMERA)
camera_config.pin_d0 = Y2_GPIO_NUM;
camera_config.pin_d1 = Y3_GPIO_NUM;
camera_config.pin_d2 = Y4_GPIO_NUM;
@@ -70,6 +71,7 @@ esp_err_t CameraService::InitializeCamera() {
camera_config.pin_sccb_scl = SIOC_GPIO_NUM;
camera_config.pin_pwdn = PWDN_GPIO_NUM;
camera_config.pin_reset = RESET_GPIO_NUM;
#endif
camera_config.xclk_freq_hz = 20000000;
camera_config.pixel_format = PIXFORMAT_JPEG;
+4 -2
View File
@@ -8,9 +8,11 @@
#include <WiFi.h>
#include <esp_camera.h>
#include <async_worker.h>
#include <Features.h>
#define CAMERA_MODEL_AI_THINKER
#include <CameraPins.h>
#if FT_ENABLED(FT_CAMERA)
#include <CameraPins.h>
#endif
#define STREAM_SERVICE_PATH "/api/camera/stream"
#define STILL_SERVICE_PATH "/api/camera/still"
+3 -4
View File
@@ -65,12 +65,11 @@ ESP32SvelteKit::ESP32SvelteKit(PsychicHttpServer *server,
_systemStatus(server, &_securitySettingsService),
_fileExplorer(server, &_securitySettingsService),
_motionService(_server, &_socket, &_securitySettingsService,&_taskManager),
_deviceConfiguration(server, &ESPFS, &_securitySettingsService, &_socket),
#if FT_ENABLED(FT_IMU) || FT_ENABLED(FT_MAG) || FT_ENABLED(FT_BMP)
_imuService(&_socket)
_imuService(&_socket),
#endif
{
}
_deviceConfiguration(server, &ESPFS, &_securitySettingsService, &_socket)
{ }
void ESP32SvelteKit::begin() {
ESP_LOGV("ESP32SvelteKit", "Loading settings from files system");
+4 -2
View File
@@ -165,8 +165,10 @@ protected:
doc["bmp_temp"] = round2(getTemperature());
}
#endif
serializeJson(doc, message);
_socket->emit(EVENT_IMU, message);
if(newData) {
serializeJson(doc, message);
_socket->emit(EVENT_IMU, message);
}
}
private:
File diff suppressed because it is too large Load Diff
+7
View File
@@ -66,6 +66,13 @@ build_flags=
-D LED_BUILTIN=4
-D KEY_BUILTIN=0
[env:esp32-s3-devkitc-1]
board = esp32-s3-devkitc-1
board_build.arduino.memory_type = qio_opi
board_build.partitions = default_16MB.csv
board_upload.flash_size = 16MB
build_flags=
${env.build_flags}
[env:esp32dev]
board = esp32dev
board_build.partitions = min_spiffs.csv