Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for OV5640 camera #3063

Merged
merged 22 commits into from
Aug 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix compile errors
jasaw committed Aug 26, 2024
commit bdf4a30ae3066e7ba810d5e6243707d05d858121
8 changes: 4 additions & 4 deletions code/components/jomjol_flowcontroll/MainFlowControl.cpp
Original file line number Diff line number Diff line change
@@ -1027,11 +1027,11 @@ esp_err_t handler_editflow(httpd_req_t *req)
int _shp_ = std::stoi(_valuechar);
if (CCstatus.CamSensor_id == OV2640_PID)
{
CFstatus.ImageSharpness = clipInt(_shp, 2, -2);
CFstatus.ImageSharpness = clipInt(_shp_, 2, -2);
}
else
{
CFstatus.ImageSharpness = clipInt(_shp, 3, -3);
CFstatus.ImageSharpness = clipInt(_shp_, 3, -3);
}
}
}
@@ -1094,11 +1094,11 @@ esp_err_t handler_editflow(httpd_req_t *req)
int _ael_ = std::stoi(_valuechar);
if (CCstatus.CamSensor_id == OV2640_PID)
{
CFstatus.ImageAeLevel = clipInt(_ael, 2, -2);
CFstatus.ImageAeLevel = clipInt(_ael_, 2, -2);
}
else
{
CFstatus.ImageAeLevel = clipInt(_ael, 5, -5);
CFstatus.ImageAeLevel = clipInt(_ael_, 5, -5);
}
}
}
23 changes: 0 additions & 23 deletions code/components/jomjol_helper/Helper.cpp
Original file line number Diff line number Diff line change
@@ -1207,29 +1207,6 @@ bool isInString(std::string &s, std::string const &toFind)
return true;
}

int clipInt(int input, int high, int low)
{
if (input < low)
{
input = low;
}
else if (input > high)
{
input = high;
}
return input;
}

bool numericStrToBool(char *input)
{
return (std::stoi(input) != 0);
}

bool stringToBoolean(std::string input)
{
return (input == "TRUE");
}

// from https://stackoverflow.com/a/14678800
void replaceAll(std::string& s, const std::string& toReplace, const std::string& replaceWith)
{