🍒 Makes feature toggles work independent
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
import { daisyColor } from "$lib/DaisyUiHelper";
|
||||
import { socket } from "$lib/stores";
|
||||
import type { IMU } from "$lib/types/models";
|
||||
import { page } from "$app/stores";
|
||||
|
||||
Chart.register(...registerables);
|
||||
|
||||
@@ -267,29 +268,33 @@
|
||||
<SettingsCard collapsible={false}>
|
||||
<Rotate3d slot="icon" class="lex-shrink-0 mr-2 h-6 w-6 self-end" />
|
||||
<span slot="title">IMU</span>
|
||||
<div class="w-full overflow-x-auto">
|
||||
<div
|
||||
class="flex w-full flex-col space-y-1 h-60"
|
||||
transition:slide|local={{ duration: 300, easing: cubicOut }}
|
||||
>
|
||||
<canvas bind:this={angleChartElement} />
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-full overflow-x-auto">
|
||||
<div
|
||||
class="flex w-full flex-col space-y-1 h-60"
|
||||
transition:slide|local={{ duration: 300, easing: cubicOut }}
|
||||
>
|
||||
<canvas bind:this={tempChartElement} />
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-full overflow-x-auto">
|
||||
<div
|
||||
class="flex w-full flex-col space-y-1 h-60"
|
||||
transition:slide|local={{ duration: 300, easing: cubicOut }}
|
||||
>
|
||||
<canvas bind:this={altitudeChartElement} />
|
||||
</div>
|
||||
</div>
|
||||
{#if $page.data.features.imu}
|
||||
<div class="w-full overflow-x-auto">
|
||||
<div
|
||||
class="flex w-full flex-col space-y-1 h-60"
|
||||
transition:slide|local={{ duration: 300, easing: cubicOut }}
|
||||
>
|
||||
<canvas bind:this={angleChartElement} />
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{#if $page.data.features.bmp}
|
||||
<div class="w-full overflow-x-auto">
|
||||
<div
|
||||
class="flex w-full flex-col space-y-1 h-60"
|
||||
transition:slide|local={{ duration: 300, easing: cubicOut }}
|
||||
>
|
||||
<canvas bind:this={tempChartElement} />
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-full overflow-x-auto">
|
||||
<div
|
||||
class="flex w-full flex-col space-y-1 h-60"
|
||||
transition:slide|local={{ duration: 300, easing: cubicOut }}
|
||||
>
|
||||
<canvas bind:this={altitudeChartElement} />
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<!-- <IMUSetting /> -->
|
||||
</SettingsCard>
|
||||
+5
-5
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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:
|
||||
|
||||
+4628
-4617
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user