mirror of
https://github.com/EyeTrackVR/OpenIris.git
synced 2025-09-26 23:29:14 +08:00
Compare commits
8 Commits
54a9fb7efa
...
277547c4c8
Author | SHA1 | Date | |
---|---|---|---|
![]() |
277547c4c8 | ||
![]() |
5da262c8da | ||
![]() |
28a053d653 | ||
![]() |
8cb484c860 | ||
![]() |
42c3311297 | ||
![]() |
44f7d6667c | ||
![]() |
1d33b29f0b | ||
![]() |
0dcfbe53b3 |
2
.github/workflows/build_release_bins.yml
vendored
2
.github/workflows/build_release_bins.yml
vendored
@ -31,7 +31,7 @@ jobs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
steps:
|
||||
- id: set-matrix
|
||||
run: echo "matrix={\"target_name\":[\"esp32AIThinker\",\"esp32M5Stack\",\"esp32Cam\",\"esp_eye\",\"wrover\",\"wrooms3QIO\",\"wrooms3QIOUSB\",\"wrooms3\",\"wrooms3USB\",\"xiaosenses3\",\"xiaosenses3_USB\"],\"target_build_type\":[\"\", \"_release\"]}" >> $GITHUB_OUTPUT
|
||||
run: echo "matrix={\"target_name\":[\"esp32AIThinker\",\"esp32M5Stack\",\"esp32Cam\",\"esp_eye\",\"wrover\",\"wrooms3QIO\",\"wrooms3QIOUSB\",\"wrooms3\",\"wrooms3USB\",\"xiaosenses3\",\"xiaosenses3_USB\",\"Babble-wrooms-s3\",\"Babble_USB-wrooms-s3\"],\"target_build_type\":[\"\", \"_release\"]}" >> $GITHUB_OUTPUT
|
||||
|
||||
build:
|
||||
needs: setup
|
||||
|
14
CHANGELOG.md
14
CHANGELOG.md
@ -3,6 +3,20 @@
|
||||
[](https://semver.org)
|
||||
> All notable changes to this project will be documented in this file
|
||||
|
||||
## [2.9.1](https://github.com/EyeTrackVR/OpenIris/compare/v2.9.0...v2.9.1) (2025-01-30)
|
||||
|
||||
|
||||
### 🐛 Bug Fixes
|
||||
|
||||
* Add babble firmware to CI matrix ([#86](https://github.com/EyeTrackVR/OpenIris/issues/86)) ([28a053d](https://github.com/EyeTrackVR/OpenIris/commit/28a053d65323a4f48ad8de4992fe496ab3e63225))
|
||||
|
||||
## [2.9.0](https://github.com/EyeTrackVR/OpenIris/compare/v2.8.0...v2.9.0) (2025-01-28)
|
||||
|
||||
|
||||
### 🍕 Features
|
||||
|
||||
* Fix AsyncWebServer dependency ([#85](https://github.com/EyeTrackVR/OpenIris/issues/85)) ([42c3311](https://github.com/EyeTrackVR/OpenIris/commit/42c33112972414cb5121b1052184fd0443de3164))
|
||||
|
||||
## [2.8.0](https://github.com/EyeTrackVR/OpenIris/compare/v2.7.0...v2.8.0) (2025-01-15)
|
||||
|
||||
|
||||
|
@ -103,6 +103,7 @@ build_type = debug
|
||||
build_flags = ${env.build_flags}
|
||||
-DCORE_DEBUG_LEVEL=4
|
||||
-DDEBUG_MODE=1
|
||||
-DARDUINO_USB_CDC_ON_BOOT=1
|
||||
-DSERIAL_MANAGER_USE_HIGHER_FREQUENCY
|
||||
${pinoutsESPS3WROVER.build_flags}
|
||||
upload_flags = --no-stub
|
||||
@ -114,6 +115,7 @@ build_type = release
|
||||
build_flags = ${env.build_flags}
|
||||
-DDEBUG_MODE=0
|
||||
-DCORE_DEBUG_LEVEL=1
|
||||
-DARDUINO_USB_CDC_ON_BOOT=1
|
||||
-DSERIAL_MANAGER_USE_HIGHER_FREQUENCY
|
||||
${pinoutsESPS3WROVER.build_flags}
|
||||
upload_flags = --no-stub
|
||||
@ -150,6 +152,7 @@ build_type = debug
|
||||
build_flags = ${env.build_flags}
|
||||
-DCORE_DEBUG_LEVEL=4
|
||||
-DDEBUG_MODE=1
|
||||
-DARDUINO_USB_CDC_ON_BOOT=1
|
||||
-DSERIAL_MANAGER_USE_HIGHER_FREQUENCY
|
||||
${pinoutsESPS3WROOM.build_flags}
|
||||
|
||||
@ -159,6 +162,7 @@ build_type = release
|
||||
build_flags = ${env.build_flags}
|
||||
-DDEBUG_MODE=0
|
||||
-DCORE_DEBUG_LEVEL=1
|
||||
-DARDUINO_USB_CDC_ON_BOOT=1
|
||||
-DSERIAL_MANAGER_USE_HIGHER_FREQUENCY
|
||||
${pinoutsESPS3WROOM.build_flags}
|
||||
|
||||
@ -199,6 +203,7 @@ build_type = debug
|
||||
build_flags = ${env.build_flags}
|
||||
-DCORE_DEBUG_LEVEL=4
|
||||
-DDEBUG_MODE=1
|
||||
-DARDUINO_USB_CDC_ON_BOOT=1
|
||||
-DSERIAL_MANAGER_USE_HIGHER_FREQUENCY
|
||||
${pinoutSWROOMBABBLES3.build_flags}
|
||||
upload_flags = --no-stub
|
||||
@ -214,6 +219,7 @@ build_type = debug
|
||||
build_flags = ${env.build_flags}
|
||||
-DCORE_DEBUG_LEVEL=1
|
||||
-DDEBUG_MODE=0
|
||||
-DARDUINO_USB_CDC_ON_BOOT=1
|
||||
-DSERIAL_MANAGER_USE_HIGHER_FREQUENCY
|
||||
${pinoutSWROOMBABBLES3.build_flags}
|
||||
upload_flags = --no-stub
|
||||
@ -261,8 +267,6 @@ build_type = debug
|
||||
build_flags = ${env.build_flags}
|
||||
-DCORE_DEBUG_LEVEL=4
|
||||
-DDEBUG_MODE=1
|
||||
#-DARDUINO_USB_MODE=1
|
||||
#-DARDUINO_USB_CDC_ON_BOOT=1
|
||||
-DSERIAL_MANAGER_USE_HIGHER_FREQUENCY
|
||||
${pinoutsESPS3XIAOSENSE.build_flags}
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
platform = https://github.com/platformio/platform-espressif32.git
|
||||
framework = arduino
|
||||
monitor_speed = 115200
|
||||
custom_firmware_version = 2.8.0
|
||||
custom_firmware_version = 2.9.1
|
||||
monitor_rts = 0
|
||||
monitor_dtr = 0
|
||||
monitor_filters =
|
||||
@ -18,14 +18,14 @@ monitor_filters =
|
||||
esp32_exception_decoder
|
||||
board_build.partitions = min_spiffs.csv
|
||||
;build_unflags = -Os ; disable optimization for size
|
||||
lib_compat_mode = strict
|
||||
lib_ldf_mode = deep+
|
||||
;115200 is used for compatability - if you are on windows and want the code to flash faster use 921600
|
||||
upload_speed = 921600
|
||||
lib_deps =
|
||||
# https://github.com/espressif/esp32-camera
|
||||
esp32-camera
|
||||
https://github.com/me-no-dev/ESPAsyncWebServer.git
|
||||
https://github.com/me-no-dev/AsyncTCP.git
|
||||
ESP32Async/ESPAsyncWebServer @ 3.6.0
|
||||
https://github.com/bblanchon/ArduinoJson.git
|
||||
extra_scripts =
|
||||
pre:tools/customname.py
|
||||
|
@ -20,7 +20,7 @@
|
||||
"include": "/lib/src"
|
||||
},
|
||||
"dependencies": {},
|
||||
"version": "2.8.0",
|
||||
"version": "2.9.1",
|
||||
"frameworks": "arduino",
|
||||
"platforms": "espressif32"
|
||||
}
|
||||
|
@ -224,7 +224,64 @@ int CameraHandler::setCameraResolution(framesize_t frameSize) { // For Babble,
|
||||
int CameraHandler::setCameraResolution(framesize_t frameSize) { // By default, use the standard method.
|
||||
if (camera_sensor->pixformat == PIXFORMAT_JPEG) {
|
||||
try {
|
||||
return camera_sensor->set_framesize(camera_sensor, frameSize);
|
||||
/*
|
||||
sensor crop is relitive to one of these base resolutions
|
||||
baseRes = 0 \\ 1600 x 1200 UXGA
|
||||
baseRes = 1 \\ 800 x 600 SVGA
|
||||
baseRes = 2 \\ 400 x 296 CIF
|
||||
|
||||
Setting your ROIsize to its respective Y-value above will prevent scaling
|
||||
|
||||
OutputSize should always be 240
|
||||
*/
|
||||
int outputSize = 240;
|
||||
|
||||
// CIF samples
|
||||
/*// mimic old way FRAMESIZE_240X240 without breaking aspect ratio
|
||||
int baseRes = 2; //CIF
|
||||
int ROIsize = 296;
|
||||
int startPointX = 52;
|
||||
int startPointY = 0; */
|
||||
|
||||
// crop into the middle of a CIF image
|
||||
int baseRes = 2; //CIF
|
||||
int ROIsize = 240; // only cropping. no scaling. if using a 160º camera, this will look like a 130º lens.
|
||||
int startPointX = 80;
|
||||
int startPointY = 28;
|
||||
|
||||
/*// crop into the top left right of a CIF image
|
||||
int baseRes = 2; //CIF
|
||||
int ROIsize = 240; // only cropping. no scaling. if using a 160º camera, this will look like a 130º lens.
|
||||
int startPointX = 0;
|
||||
int startPointY = 0;*/
|
||||
|
||||
/*// crop into the bottom right of a CIF image
|
||||
//int baseRes = 2; //CIF
|
||||
//int ROIsize = 240; // only cropping. no scaling. if using a 160º camera, this will look like a 130º lens.
|
||||
//int startPointX = 160;
|
||||
//int startPointY = 56;*/
|
||||
|
||||
//SVGA samples
|
||||
/*// crop into the middle of a SVGA image and rescale to 240. if using a 160º camera, it will look like a 120º lens.
|
||||
int baseRes = 1; //SVGA
|
||||
int ROIsize = 450;
|
||||
int startPointX = 175;
|
||||
int startPointY = 75;*/
|
||||
|
||||
/*// crop into the middle of a SVGA image and rescale to 240. if using a 160º camera, it will look like a 90º lens.
|
||||
int baseRes = 1; //SVGA
|
||||
int ROIsize = 340;
|
||||
int startPointX = 230;
|
||||
int startPointY = 130;*/
|
||||
|
||||
/*// pure crop into the middle of a SVGA image no scaling. if using a 160º camera, it will look like a 66º lens.
|
||||
int baseRes = 1; //SVGA
|
||||
int ROIsize = 240;
|
||||
int startPointX = 280;
|
||||
int startPointY = 180;*/
|
||||
|
||||
return camera_sensor->set_res_raw(camera_sensor, baseRes, 0, 0, 0, startPointX, startPointY, ROIsize, ROIsize, outputSize, outputSize, 0, 0);
|
||||
|
||||
} catch (...) {
|
||||
// they sent us a malformed or unsupported frameSize - rather than crash -
|
||||
// tell them about it
|
||||
|
@ -1,13 +1,5 @@
|
||||
#include "baseAPI.hpp"
|
||||
|
||||
//! These have to be called before the constructor of the class because they are
|
||||
//! static C++ 11 does not have inline variables, sadly. So we have to do this.
|
||||
// const char *BaseAPI::MIMETYPE_HTML{"text/html"};
|
||||
// const char *BaseAPI::MIMETYPE_CSS{"text/css"};
|
||||
// const char *BaseAPI::MIMETYPE_JS{"application/javascript"};
|
||||
// const char *BaseAPI::MIMETYPE_PNG{"image/png"};
|
||||
// const char *BaseAPI::MIMETYPE_JPG{"image/jpeg"};
|
||||
// const char *BaseAPI::MIMETYPE_ICO{"image/x-icon"};
|
||||
const char* BaseAPI::MIMETYPE_JSON{"application/json"};
|
||||
|
||||
BaseAPI::BaseAPI(ProjectConfig& projectConfig,
|
||||
@ -79,7 +71,7 @@ void BaseAPI::setWiFi(AsyncWebServerRequest* request) {
|
||||
|
||||
log_d("Number of Params: %d", params);
|
||||
for (int i = 0; i < params; i++) {
|
||||
AsyncWebParameter* param = request->getParam(i);
|
||||
const AsyncWebParameter* param = request->getParam(i);
|
||||
if (param->name() == "networkName") {
|
||||
networkName.assign(param->value().c_str());
|
||||
} else if (param->name() == "ssid") {
|
||||
@ -102,17 +94,6 @@ void BaseAPI::setWiFi(AsyncWebServerRequest* request) {
|
||||
projectConfig.setWifiConfig(networkName, ssid, password, channel, power,
|
||||
adhoc, true);
|
||||
|
||||
/* if (WiFiStateManager->getCurrentState() ==
|
||||
WiFiState_e::WiFiState_ADHOC)
|
||||
{
|
||||
projectConfig.setAPWifiConfig(ssid, password, &channel, adhoc,
|
||||
true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
} */
|
||||
|
||||
request->send(200, MIMETYPE_JSON,
|
||||
"{\"msg\":\"Done. Wifi Creds have been set.\"}");
|
||||
break;
|
||||
@ -178,7 +159,7 @@ void BaseAPI::setDeviceConfig(AsyncWebServerRequest* request) {
|
||||
int ota_port;
|
||||
|
||||
for (int i = 0; i < params; i++) {
|
||||
AsyncWebParameter* param = request->getParam(i);
|
||||
const AsyncWebParameter* param = request->getParam(i);
|
||||
if (param->name() == "hostname") {
|
||||
std::string result = param->value().c_str();
|
||||
|
||||
@ -216,7 +197,7 @@ void BaseAPI::setWiFiTXPower(AsyncWebServerRequest* request) {
|
||||
uint8_t txPower = 0;
|
||||
|
||||
for (int i = 0; i < params; i++) {
|
||||
AsyncWebParameter* param = request->getParam(i);
|
||||
const AsyncWebParameter* param = request->getParam(i);
|
||||
if (param->name() == "txpower" || param->name() == "txPower") {
|
||||
txPower = atoi(param->value().c_str());
|
||||
}
|
||||
@ -275,7 +256,7 @@ void BaseAPI::setCamera(AsyncWebServerRequest* request) {
|
||||
//! be set in a specific order This means the order of the URL params does
|
||||
//! not matter
|
||||
for (int i = 0; i < params; i++) {
|
||||
AsyncWebParameter* param = request->getParam(i);
|
||||
const AsyncWebParameter* param = request->getParam(i);
|
||||
if (param->name() == "framesize") {
|
||||
temp_camera_framesize = (uint8_t)param->value().toInt();
|
||||
} else if (param->name() == "vflip") {
|
||||
@ -392,7 +373,6 @@ void BaseAPI::beginOTA() {
|
||||
"{\"id\": \"" + _id + "\", \"hardware\": \"ESP32\"}");
|
||||
});
|
||||
|
||||
// Note: HTT_GET
|
||||
server.on("/update", 0b00000001, [&](AsyncWebServerRequest* request) {
|
||||
log_d("[DEBUG] Free Heap: %d", ESP.getFreeHeap());
|
||||
checkAuthentication(request, login, password);
|
||||
@ -406,7 +386,8 @@ void BaseAPI::beginOTA() {
|
||||
response->addHeader("Content-Encoding", "gzip");
|
||||
request->send(response);
|
||||
});
|
||||
// Note: HTT_POST
|
||||
|
||||
// HTTP_POST
|
||||
server.on(
|
||||
"/update", 0b00000010,
|
||||
[&](AsyncWebServerRequest* request) {
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
//! Warning do not format this file with clang-format or it will break the code
|
||||
|
||||
#include <unordered_map>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
@ -11,16 +10,14 @@
|
||||
|
||||
#define WEBSERVER_H
|
||||
|
||||
/* #define XHTTP_GET 0b00000001;
|
||||
#define XHTTP_POST 0b00000010;
|
||||
#define XHTTP_DELETE 0b00000100;
|
||||
#define XHTTP_PUT 0b00001000;
|
||||
#define XHTTP_PATCH 0b00010000;
|
||||
#define XHTTP_HEAD 0b00100000;
|
||||
#define XHTTP_OPTIONS 0b01000000;
|
||||
#define XHTTP_ANY 0b01111111; */
|
||||
// hack, we have to include it JUST so the macro executes and defines HTTP_*
|
||||
// methods cause it's beging included later in streamServer.hpp, but then the
|
||||
// macro executes too late and tries to redefine the methods, failing. but if we
|
||||
// don't include it here, then ESPAsyncWebServer fails to compile due to
|
||||
// WEBSERVER_H which has to be set because if it isn't, ESPAsyncWebServer will
|
||||
// define the methods and thus the circus continues
|
||||
#include <http_parser.h>
|
||||
|
||||
// constexpr int HTTP_GET = 0b00000001;
|
||||
constexpr int HTTP_ANY = 0b01111111;
|
||||
|
||||
#include <Update.h>
|
||||
@ -28,18 +25,15 @@ constexpr int HTTP_ANY = 0b01111111;
|
||||
#include <esp_task_wdt.h>
|
||||
|
||||
#include <AsyncTCP.h>
|
||||
|
||||
#include <ESPAsyncWebServer.h>
|
||||
#include <FS.h>
|
||||
#include "Hash.h"
|
||||
|
||||
#include "data/utilities/network_utilities.hpp"
|
||||
#include "tasks/tasks.hpp"
|
||||
|
||||
#include "data/StateManager/StateManager.hpp"
|
||||
#include "data/config/project_config.hpp"
|
||||
#include "data/utilities/network_utilities.hpp"
|
||||
#include "elegantWebpage.h"
|
||||
#include "io/camera/cameraHandler.hpp"
|
||||
#include "tasks/tasks.hpp"
|
||||
|
||||
class BaseAPI {
|
||||
protected:
|
||||
@ -47,11 +41,6 @@ class BaseAPI {
|
||||
bool _authRequired;
|
||||
|
||||
static const char* MIMETYPE_HTML;
|
||||
/* static const char *MIMETYPE_CSS; */
|
||||
/* static const char *MIMETYPE_JS; */
|
||||
/* static const char *MIMETYPE_PNG; */
|
||||
/* static const char *MIMETYPE_JPG; */
|
||||
/* static const char *MIMETYPE_ICO; */
|
||||
static const char* MIMETYPE_JSON;
|
||||
|
||||
protected:
|
||||
@ -100,33 +89,34 @@ class BaseAPI {
|
||||
typedef std::unordered_map<std::string, WebRequestMethodComposite>
|
||||
networkMethodsMap_t;
|
||||
|
||||
ProjectConfig &projectConfig;
|
||||
/// @brief Local instance of the AsyncWebServer - so that we dont need to use new and delete
|
||||
AsyncWebServer server;
|
||||
ProjectConfig& projectConfig;
|
||||
/// @brief Local instance of the AsyncWebServer - so that we dont need to use
|
||||
/// new and delete
|
||||
AsyncWebServer server;
|
||||
#ifndef SIM_ENABLED
|
||||
CameraHandler &camera;
|
||||
CameraHandler& camera;
|
||||
#endif // SIM_ENABLED
|
||||
|
||||
public :
|
||||
BaseAPI(ProjectConfig& projectConfig,
|
||||
public:
|
||||
BaseAPI(ProjectConfig& projectConfig,
|
||||
#ifndef SIM_ENABLED
|
||||
CameraHandler& camera,
|
||||
CameraHandler& camera,
|
||||
#endif // SIM_ENABLED
|
||||
const std::string& api_url,
|
||||
const std::string& api_url,
|
||||
#ifndef SIM_ENABLED
|
||||
int port = 81
|
||||
int port = 81
|
||||
#else
|
||||
int port = 80
|
||||
int port = 80
|
||||
#endif
|
||||
);
|
||||
|
||||
virtual ~BaseAPI();
|
||||
virtual void begin();
|
||||
void checkAuthentication(AsyncWebServerRequest* request,
|
||||
const char* login,
|
||||
const char* password);
|
||||
void beginOTA();
|
||||
void notFound(AsyncWebServerRequest* request) const;
|
||||
virtual ~BaseAPI();
|
||||
virtual void begin();
|
||||
void checkAuthentication(AsyncWebServerRequest* request,
|
||||
const char* login,
|
||||
const char* password);
|
||||
void beginOTA();
|
||||
void notFound(AsyncWebServerRequest* request) const;
|
||||
};
|
||||
|
||||
#endif // BASEAPI_HPP
|
||||
|
Loading…
Reference in New Issue
Block a user