refactor: factor out the unneeded header

- use USB envs instead of a header
- use ifndef for one define
This commit is contained in:
DaOfficialWizard 2023-04-12 23:59:20 +01:00
parent 351605a1b6
commit 7f338729d3
4 changed files with 22 additions and 23 deletions

View File

@ -61,7 +61,9 @@
"iostream": "cpp"
},
"cSpell.words": [
"ESPS"
"ESPS",
"JTAG",
"sccb"
]
}
}

View File

@ -119,6 +119,22 @@ build_flags = ${env.build_flags}
${pinoutsESPS3WROVER.build_flags}
upload_flags = --no-stub
[env:wrooms3]
board = esp32-s3-devkitc-1
build_type = debug
build_flags = ${env.build_flags}
-DCORE_DEBUG_LEVEL=4
-DDEBUG_MODE=1
${pinoutsESPS3WROOM.build_flags}
[env:wrooms3_release]
board = esp32-s3-devkitc-1
build_type = release
build_flags = ${env.build_flags}
-DDEBUG_MODE=0
-DCORE_DEBUG_LEVEL=1
${pinoutsESPS3WROOM.build_flags}
[env:wrovers3USB]
board = esp32-s3-devkitc-1
board_build.arduino.memory_type = qio_opi
@ -141,22 +157,6 @@ build_flags = ${env.build_flags}
-DETVR_EYE_TRACKER_USB_API
${pinoutsESPS3WROVER.build_flags}
[env:wrooms3]
board = esp32-s3-devkitc-1
build_type = debug
build_flags = ${env.build_flags}
-DCORE_DEBUG_LEVEL=4
-DDEBUG_MODE=1
${pinoutsESPS3WROOM.build_flags}
[env:wrooms3_release]
board = esp32-s3-devkitc-1
build_type = release
build_flags = ${env.build_flags}
-DDEBUG_MODE=0
-DCORE_DEBUG_LEVEL=1
${pinoutsESPS3WROOM.build_flags}
[env:wrooms3USB]
board = esp32-s3-devkitc-1
build_type = debug

View File

@ -1 +0,0 @@

View File

@ -1,5 +1,3 @@
#include <etvr_system.hpp>
#include <Arduino.h>
#include <data/config/project_config.hpp>
@ -7,7 +5,7 @@
#include <io/camera/cameraHandler.hpp>
#include <logo/logo.hpp>
#ifdef ETVR_EYE_TRACKER_WEB_API
#ifndef ETVR_EYE_TRACKER_USB_API
#include <network/api/webserverHandler.hpp>
#include <network/mDNS/MDNSManager.hpp>
#include <network/stream/streamServer.hpp>
@ -32,7 +30,7 @@ LEDManager ledManager(33);
CameraHandler cameraHandler(deviceConfig);
#endif // SIM_ENABLED
#ifdef ETVR_EYE_TRACKER_WEB_API
#ifndef ETVR_EYE_TRACKER_USB_API
WiFiHandler wifiHandler(deviceConfig, WIFI_SSID, WIFI_PASSWORD, WIFI_CHANNEL);
MDNSHandler mdnsHandler(deviceConfig);
#ifdef SIM_ENABLED
@ -94,7 +92,7 @@ void setup() {
#ifndef SIM_ENABLED
deviceConfig.attach(cameraHandler);
#endif // SIM_ENABLED
#ifdef ETVR_EYE_TRACKER_WEB_API
#ifndef ETVR_EYE_TRACKER_USB_API
etvr_eye_tracker_web_init();
#else // ETVR_EYE_TRACKER_WEB_API
WiFi.disconnect(true);