mirror of
https://github.com/MrUnknownDE/OpenIris-ESPIDF.git
synced 2026-04-18 14:03:45 +02:00
- Applied changes based on PR feedback
- Remove redundant menu entries from default config (will be set by Kconfig.projbuild)
This commit is contained in:
10
.gitignore
vendored
10
.gitignore
vendored
@@ -82,11 +82,11 @@ sdkconfig
|
||||
|
||||
### VisualStudioCode ###
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
!.vscode/*.code-snippets
|
||||
# !.vscode/settings.json
|
||||
##!.vscode/tasks.json
|
||||
# !.vscode/launch.json
|
||||
# !.vscode/extensions.json
|
||||
# !.vscode/*.code-snippets
|
||||
|
||||
# Local History for Visual Studio Code
|
||||
.history/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// source: https://github.com/espressif/esp-iot-solution/blob/4730d91db70df7e6e0a3191d725ab1c5f98ff9ce/examples/usb/device/usb_webcam/bootloader_components/boot_hooks/boot_hooks.c
|
||||
|
||||
#ifdef CONFIG_WIRED_MODE
|
||||
#ifdef CONFIG_GENERAL_WIRED_MODE
|
||||
#include "esp_log.h"
|
||||
#include "soc/rtc_cntl_struct.h"
|
||||
#include "soc/usb_serial_jtag_reg.h"
|
||||
|
||||
@@ -19,7 +19,7 @@ void CameraManager::setupCameraPinout()
|
||||
// 16500000 optimal freq on ESP32-CAM (default)
|
||||
// 20000000 max freq on ESP32-CAM
|
||||
// 24000000 optimal freq on ESP32-S3 // 23MHz same fps
|
||||
int xclk_freq_hz = DEFAULT_XCLK_FREQ_HZ;
|
||||
int xclk_freq_hz = CONFIG_CAMERA_WIFI_XCLK_FREQ;
|
||||
|
||||
#if CONFIG_CAMERA_MODULE_ESP_EYE
|
||||
/* IO13, IO14 is designed for JTAG by default,
|
||||
@@ -48,8 +48,8 @@ void CameraManager::setupCameraPinout()
|
||||
|
||||
ESP_LOGI(CAMERA_MANAGER_TAG, "CAM_BOARD");
|
||||
#endif
|
||||
#if CONFIG_WIRED_MODE
|
||||
xclk_freq_hz = USB_DEFAULT_XCLK_FREQ_HZ;
|
||||
#if CONFIG_GENERAL_WIRED_MODE
|
||||
xclk_freq_hz = CONFIG_CAMERA_USB_XCLK_FREQ;
|
||||
#endif
|
||||
|
||||
config = {
|
||||
@@ -196,7 +196,7 @@ bool CameraManager::setupCamera()
|
||||
return false;
|
||||
}
|
||||
|
||||
#if CONFIG_WIRED_MODE
|
||||
#if CONFIG_GENERAL_WIRED_MODE
|
||||
const auto temp_sensor = esp_camera_sensor_get();
|
||||
|
||||
// Thanks to lick_it, we discovered that OV5640 likes to overheat when
|
||||
|
||||
@@ -14,11 +14,7 @@
|
||||
#include <StateManager.hpp>
|
||||
#include <ProjectConfig.hpp>
|
||||
|
||||
#ifndef DEFAULT_XCLK_FREQ_HZ
|
||||
#define DEFAULT_XCLK_FREQ_HZ CONFIG_CAMERA_WIFI_XCLK_FREQ
|
||||
#define USB_DEFAULT_XCLK_FREQ_HZ CONFIG_CAMERA_USB_XCLK_FREQ
|
||||
#define OV5640_XCLK_FREQ_HZ DEFAULT_XCLK_FREQ_HZ
|
||||
#endif
|
||||
#define OV5640_XCLK_FREQ_HZ CONFIG_CAMERA_WIFI_XCLK_FREQ
|
||||
|
||||
class CameraManager
|
||||
{
|
||||
|
||||
@@ -80,7 +80,7 @@ struct MDNSConfig_t : BaseConfigModel
|
||||
{
|
||||
// by default, this will be openiris
|
||||
// but we can override it at compile time
|
||||
std::string default_hostname = CONFIG_MDNS_HOSTNAME;
|
||||
std::string default_hostname = CONFIG_WIFI_MDNS_HOSTNAME;
|
||||
|
||||
if (default_hostname.empty())
|
||||
{
|
||||
@@ -214,8 +214,8 @@ struct AP_WiFiConfig_t : BaseConfigModel
|
||||
|
||||
void load()
|
||||
{
|
||||
this->ssid = this->pref->getString("apSSID", CONFIG_AP_WIFI_SSID);
|
||||
this->password = this->pref->getString("apPassword", CONFIG_AP_WIFI_PASSWORD);
|
||||
this->ssid = this->pref->getString("apSSID", CONFIG_WIFI_AP_SSID);
|
||||
this->password = this->pref->getString("apPassword", CONFIG_WIFI_AP_PASSWORD);
|
||||
};
|
||||
|
||||
void save() const {
|
||||
|
||||
@@ -109,7 +109,7 @@ static void UVCStreamHelpers::camera_fb_return_cb(uvc_fb_t *fb, void *cb_ctx)
|
||||
esp_err_t UVCStreamManager::setup()
|
||||
{
|
||||
|
||||
#ifndef CONFIG_WIRED_MODE
|
||||
#ifndef CONFIG_GENERAL_WIRED_MODE
|
||||
ESP_LOGE(UVC_STREAM_TAG, "The board does not support UVC, please, setup WiFi connection.");
|
||||
return;
|
||||
#endif
|
||||
|
||||
@@ -152,8 +152,8 @@ void WiFiManager::SetupAccessPoint()
|
||||
|
||||
wifi_config_t ap_wifi_config = {
|
||||
.ap = {
|
||||
.ssid = CONFIG_AP_WIFI_SSID,
|
||||
.password = CONFIG_AP_WIFI_PASSWORD,
|
||||
.ssid = CONFIG_WIFI_AP_SSID,
|
||||
.password = CONFIG_WIFI_AP_PASSWORD,
|
||||
.max_connection = 1,
|
||||
|
||||
},
|
||||
|
||||
@@ -6,7 +6,7 @@ endmenu
|
||||
|
||||
menu "OpenIris: General Configuration"
|
||||
|
||||
config WIRED_MODE
|
||||
config GENERAL_WIRED_MODE
|
||||
bool "Wired mode"
|
||||
default false
|
||||
|
||||
@@ -39,7 +39,7 @@ endmenu
|
||||
|
||||
menu "OpenIris: WiFi Configuration"
|
||||
|
||||
config MDNS_HOSTNAME
|
||||
config WIFI_MDNS_HOSTNAME
|
||||
string "mDNS hostname"
|
||||
default "openiristracker"
|
||||
|
||||
@@ -51,11 +51,11 @@ menu "OpenIris: WiFi Configuration"
|
||||
string "WiFi password"
|
||||
default ""
|
||||
|
||||
config AP_WIFI_SSID
|
||||
config WIFI_AP_SSID
|
||||
string "Access Point WiFi network name (SSID)"
|
||||
default "EyeTrackVR"
|
||||
|
||||
config AP_WIFI_PASSWORD
|
||||
config WIFI_AP_PASSWORD
|
||||
string "Access Point WiFi password"
|
||||
default "12345678"
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <SerialManager.hpp>
|
||||
#include <RestAPI.hpp>
|
||||
|
||||
#ifdef CONFIG_WIRED_MODE
|
||||
#ifdef CONFIG_GENERAL_WIRED_MODE
|
||||
#include <UVCStream.hpp>
|
||||
#endif
|
||||
|
||||
@@ -48,7 +48,7 @@ StreamServer streamServer(80, stateManager);
|
||||
|
||||
auto *restAPI = new RestAPI("http://0.0.0.0:81", commandManager);
|
||||
|
||||
#ifdef CONFIG_WIRED_MODE
|
||||
#ifdef CONFIG_GENERAL_WIRED_MODE
|
||||
UVCStreamManager uvcStream;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -553,7 +553,7 @@ CONFIG_ENV_GPIO_OUT_RANGE_MAX=48
|
||||
#
|
||||
# OpenIris: General Configuration
|
||||
#
|
||||
CONFIG_WIRED_MODE=y
|
||||
CONFIG_GENERAL_WIRED_MODE=y
|
||||
CONFIG_GENERAL_UVC_DELAY=30
|
||||
# end of OpenIris: General Configuration
|
||||
|
||||
@@ -567,11 +567,11 @@ CONFIG_CAMERA_WIFI_XCLK_FREQ=16500000
|
||||
#
|
||||
# OpenIris: WiFi Configuration
|
||||
#
|
||||
CONFIG_MDNS_HOSTNAME="openiristracker"
|
||||
CONFIG_WIFI_MDNS_HOSTNAME="openiristracker"
|
||||
CONFIG_WIFI_SSID=""
|
||||
CONFIG_WIFI_PASSWORD=""
|
||||
CONFIG_AP_WIFI_SSID="EyeTrackVR"
|
||||
CONFIG_AP_WIFI_PASSWORD="12345678"
|
||||
CONFIG_WIFI_AP_SSID="EyeTrackVR"
|
||||
CONFIG_WIFI_AP_PASSWORD="12345678"
|
||||
# end of OpenIris: WiFi Configuration
|
||||
|
||||
#
|
||||
|
||||
@@ -536,25 +536,6 @@ CONFIG_PARTITION_TABLE_OFFSET=0x8000
|
||||
CONFIG_PARTITION_TABLE_MD5=y
|
||||
# end of Partition Table
|
||||
|
||||
#
|
||||
# OpenIris basic configuration
|
||||
#
|
||||
CONFIG_ENV_GPIO_RANGE_MIN=0
|
||||
CONFIG_ENV_GPIO_RANGE_MAX=48
|
||||
CONFIG_ENV_GPIO_IN_RANGE_MAX=48
|
||||
CONFIG_ENV_GPIO_OUT_RANGE_MAX=48
|
||||
CONFIG_BLINK_GPIO=38
|
||||
CONFIG_BLINK_PERIOD=1000
|
||||
CONFIG_WIRED_MODE=y
|
||||
CONFIG_MDNS_HOSTNAME="openiristracker"
|
||||
CONFIG_WIFI_SSID=""
|
||||
CONFIG_WIFI_PASSWORD=""
|
||||
CONFIG_AP_WIFI_SSID="EyeTrackVR"
|
||||
CONFIG_AP_WIFI_PASSWORD="12345678"
|
||||
# CONFIG_LED_EXTERNAL_CONTROL is not set
|
||||
CONFIG_LED_C_PIN=1
|
||||
# end of OpenIris basic configuration
|
||||
|
||||
#
|
||||
# Camera sensor pinout configuration
|
||||
#
|
||||
|
||||
@@ -49,4 +49,5 @@ CONFIG_SPIRAM_SPEED_80M=y
|
||||
CONFIG_LED_EXTERNAL_CONTROL=y
|
||||
CONFIG_LED_EXTERNAL_PWM_FREQ=5000
|
||||
CONFIG_LED_EXTERNAL_PWM_DUTY_CYCLE=100
|
||||
CONFIG_LED_EXTERNAL_GPIO=1
|
||||
CONFIG_LED_EXTERNAL_GPIO=1
|
||||
CONFIG_Camera_USB_XCLK_FREQ=23000000 # NOT TESTED
|
||||
Reference in New Issue
Block a user