mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-07 20:16:55 +03:00
Block REST API calls till resource is ready (#1609)
* Block REST API call till ressource is ready * Update * Update * Update
This commit is contained in:
@@ -164,6 +164,7 @@ static size_t jpg_encode_stream(void * arg, size_t index, const void* data, size
|
||||
return len;
|
||||
}
|
||||
|
||||
|
||||
bool CCamera::SetBrightnessContrastSaturation(int _brightness, int _contrast, int _saturation)
|
||||
{
|
||||
bool result = false;
|
||||
@@ -281,7 +282,6 @@ void CCamera::EnableAutoExposure(int flashdauer)
|
||||
}
|
||||
|
||||
|
||||
|
||||
esp_err_t CCamera::CaptureToBasisImage(CImageBasis *_Image, int delay)
|
||||
{
|
||||
string ftype;
|
||||
@@ -543,6 +543,7 @@ esp_err_t CCamera::CaptureToHTTP(httpd_req_t *req, int delay)
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
void CCamera::LightOnOff(bool status)
|
||||
{
|
||||
GpioHandler* gpioHandler = gpio_handler_get();
|
||||
@@ -578,6 +579,7 @@ void CCamera::LightOnOff(bool status)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CCamera::LEDOnOff(bool status)
|
||||
{
|
||||
// Init the GPIO
|
||||
@@ -638,6 +640,7 @@ void CCamera::GetCameraParameter(httpd_req_t *req, int &qual, framesize_t &resol
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
framesize_t CCamera::TextToFramesize(const char * _size)
|
||||
{
|
||||
if (strcmp(_size, "QVGA") == 0)
|
||||
@@ -669,6 +672,7 @@ CCamera::CCamera()
|
||||
ledc_init();
|
||||
}
|
||||
|
||||
|
||||
esp_err_t CCamera::InitCam()
|
||||
{
|
||||
ESP_LOGD(TAG, "Init Camera");
|
||||
@@ -682,9 +686,11 @@ esp_err_t CCamera::InitCam()
|
||||
return err;
|
||||
}
|
||||
|
||||
CameraInitSuccessful = true;
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
|
||||
void CCamera::SetLEDIntensity(float _intrel)
|
||||
{
|
||||
_intrel = min(_intrel, (float) 100);
|
||||
@@ -694,3 +700,9 @@ void CCamera::SetLEDIntensity(float _intrel)
|
||||
ESP_LOGD(TAG, "Set led_intensity to %d of 8191", led_intensity);
|
||||
|
||||
}
|
||||
|
||||
|
||||
bool CCamera::getCameraInitSuccessful()
|
||||
{
|
||||
return CameraInitSuccessful;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user