mirror of
https://github.com/EyeTrackVR/OpenIris.git
synced 2025-11-04 15:39:42 +08:00
fix pointer syntax for server object
- fix lower casing for wifi statemanager
This commit is contained in:
parent
b770458ca6
commit
fff43f6d16
@ -17,7 +17,7 @@ BaseAPI::BaseAPI(int CONTROL_PORT,
|
||||
const std::string &api_url) : server(CONTROL_PORT),
|
||||
projectConfig(projectConfig),
|
||||
camera(camera),
|
||||
WiFiStateManager(WiFiStateManager),
|
||||
wiFiStateManager(wiFiStateManager),
|
||||
api_url(api_url) {}
|
||||
|
||||
BaseAPI::~BaseAPI() {}
|
||||
|
||||
@ -98,13 +98,13 @@ protected:
|
||||
/// @brief Local instance of the AsyncWebServer - so that we dont need to use new and delete
|
||||
AsyncWebServer server;
|
||||
CameraHandler *camera;
|
||||
StateManager<WiFiState_e> *WiFiStateManager;
|
||||
StateManager<WiFiState_e> *wiFiStateManager;
|
||||
|
||||
public:
|
||||
BaseAPI(int CONTROL_PORT,
|
||||
ProjectConfig *projectConfig,
|
||||
CameraHandler *camera,
|
||||
StateManager<WiFiState_e> *WiFiStateManager,
|
||||
StateManager<WiFiState_e> *wiFiStateManager,
|
||||
const std::string &api_url);
|
||||
|
||||
virtual ~BaseAPI();
|
||||
|
||||
@ -7,11 +7,11 @@
|
||||
APIServer::APIServer(int CONTROL_PORT,
|
||||
ProjectConfig *projectConfig,
|
||||
CameraHandler *camera,
|
||||
StateManager<WiFiState_e> *WiFiStateManager,
|
||||
StateManager<WiFiState_e> *wiFiStateManager,
|
||||
const std::string &api_url) : BaseAPI(CONTROL_PORT,
|
||||
projectConfig,
|
||||
camera,
|
||||
WiFiStateManager,
|
||||
wiFiStateManager,
|
||||
api_url) {}
|
||||
|
||||
APIServer::~APIServer() {}
|
||||
@ -25,9 +25,9 @@ void APIServer::begin()
|
||||
char buffer[1000];
|
||||
snprintf(buffer, sizeof(buffer), "^\\%s\\/([a-zA-Z0-9]+)\\/command\\/([a-zA-Z0-9]+)$", this->api_url.c_str());
|
||||
log_d("API URL: %s", buffer);
|
||||
server->on(buffer, 0b01111111, [&](AsyncWebServerRequest *request)
|
||||
server.on(buffer, 0b01111111, [&](AsyncWebServerRequest *request)
|
||||
{ handleRequest(request); });
|
||||
server->begin();
|
||||
server.begin();
|
||||
}
|
||||
|
||||
void APIServer::setupServer()
|
||||
|
||||
@ -10,7 +10,7 @@ public:
|
||||
APIServer(int CONTROL_PORT,
|
||||
ProjectConfig *projectConfig,
|
||||
CameraHandler *camera,
|
||||
StateManager<WiFiState_e> *WiFiStateManager,
|
||||
StateManager<WiFiState_e> *wiFiStateManager,
|
||||
const std::string &api_url);
|
||||
|
||||
virtual ~APIServer();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user