Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
2 files changed, 3 insertions, 2 deletions
-rw-r--r--Year 3/Internet of things/goam/main/main.c2
-rw-r--r--Year 3/Internet of things/goam/main/webserver.c3
diff --git a/Year 3/Internet of things/goam/main/main.c b/Year 3/Internet of things/goam/main/main.c
index d3d3ee6..3af6dd3 100644
--- a/Year 3/Internet of things/goam/main/main.c
+++ b/Year 3/Internet of things/goam/main/main.c
@@ -51,7 +51,7 @@ void print_chip_data() {
#define BTN_SHOOT_PIN 13
void take_photo() {
- ptc06_set_image_resolution(RES_160X120);
+ ptc06_set_image_resolution(RES_640X480);
char* image;
size_t length = ptc06_get_image(&image);
spiffs_write("/spiffs/capture.jpeg", image, length);
diff --git a/Year 3/Internet of things/goam/main/webserver.c b/Year 3/Internet of things/goam/main/webserver.c
index 9baa5ec..f803315 100644
--- a/Year 3/Internet of things/goam/main/webserver.c
+++ b/Year 3/Internet of things/goam/main/webserver.c
@@ -67,8 +67,9 @@ static bool request_get_query(httpd_req_t *req, const char* query_name, char* bu
static esp_err_t get_handler(httpd_req_t *req)
{
/* Set some custom headers */
- /* httpd_resp_set_hdr(req, "Custom-Header-1", "Custom-Value-1"); */
+ /* httpd_resp_set_hdr(req, "Content-Type", "image/jpeg"); */
+ ESP_ERROR_CHECK(httpd_resp_set_type(req, "image/jpeg"));
/* Send response with custom headers and body set as the
* string passed in user context*/
/* const char resp_str[] = "<html><head><title>Hello</title></head><body>World</body></html>"; */