mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-01 04:12:00 +08:00
Fix compilation issue due to refactoring typo error thanks @Engineer2Designer for raising it
Close #988
This commit is contained in:
parent
a10a7f74bf
commit
0057961497
@ -33,7 +33,7 @@
|
|||||||
// /awb/agc/aec/hmirror/vflip/awb_gain/agc_gain/aec_value/aec2/cw/bpc/wpc
|
// /awb/agc/aec/hmirror/vflip/awb_gain/agc_gain/aec_value/aec2/cw/bpc/wpc
|
||||||
// /raw_gma/lenc/special_effect/wb_mode/ae_level
|
// /raw_gma/lenc/special_effect/wb_mode/ae_level
|
||||||
void ESP3DCommands::ESP170(int cmd_params_pos, ESP3DMessage* msg) {
|
void ESP3DCommands::ESP170(int cmd_params_pos, ESP3DMessage* msg) {
|
||||||
const char* camcmd = [] = {
|
const char* camcmd[] = {
|
||||||
"framesize",
|
"framesize",
|
||||||
"quality",
|
"quality",
|
||||||
"contrast",
|
"contrast",
|
||||||
@ -63,12 +63,16 @@ void ESP3DCommands::ESP170(int cmd_params_pos, ESP3DMessage* msg) {
|
|||||||
"light",
|
"light",
|
||||||
#endif // CAM_LED_PIN
|
#endif // CAM_LED_PIN
|
||||||
};
|
};
|
||||||
|
bool hasError = false;
|
||||||
|
String ok_msg;
|
||||||
|
String error_msg;
|
||||||
ESP3DClientType target = msg->origin;
|
ESP3DClientType target = msg->origin;
|
||||||
ESP3DRequest requestId = msg->request_id;
|
ESP3DRequest requestId = msg->request_id;
|
||||||
msg->target = target;
|
msg->target = target;
|
||||||
msg->origin = ESP3DClientType::command;
|
msg->origin = ESP3DClientType::command;
|
||||||
bool json = hasTag(msg, cmd_params_pos, "json");
|
bool json = hasTag(msg, cmd_params_pos, "json");
|
||||||
String tmpstr;
|
String tmpstr;
|
||||||
|
|
||||||
#if AUTHENTICATION_FEATURE
|
#if AUTHENTICATION_FEATURE
|
||||||
if (msg->authentication_level == ESP3DAuthenticationLevel::guest) {
|
if (msg->authentication_level == ESP3DAuthenticationLevel::guest) {
|
||||||
dispatchAuthenticationError(msg, COMMAND_ID, json);
|
dispatchAuthenticationError(msg, COMMAND_ID, json);
|
||||||
@ -102,146 +106,146 @@ void ESP3DCommands::ESP170(int cmd_params_pos, ESP3DMessage* msg) {
|
|||||||
// now send all settings one by one
|
// now send all settings one by one
|
||||||
// framesize
|
// framesize
|
||||||
if (!dispatchIdValue(json, "framesize",
|
if (!dispatchIdValue(json, "framesize",
|
||||||
String(status.framesize).c_str(), target,
|
String(s->status.framesize).c_str(), target,
|
||||||
requestId, true)) {
|
requestId, true)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// quality
|
// quality
|
||||||
if (!dispatchIdValue(json, "quality", String(status.quality).c_str(),
|
if (!dispatchIdValue(json, "quality", String(s->status.quality).c_str(),
|
||||||
target, requestId)) {
|
target, requestId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// brightness
|
// brightness
|
||||||
if (!dispatchIdValue(json, "brightness",
|
if (!dispatchIdValue(json, "brightness",
|
||||||
String(status.brightness).c_str(), target,
|
String(s->status.brightness).c_str(), target,
|
||||||
requestId)) {
|
requestId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// contrast
|
// contrast
|
||||||
if (!dispatchIdValue(json, "contrast", String(status.contrast).c_str(),
|
if (!dispatchIdValue(json, "contrast", String(s->status.contrast).c_str(),
|
||||||
target, requestId)) {
|
target, requestId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// saturation
|
// saturation
|
||||||
if (!dispatchIdValue(json, "saturation",
|
if (!dispatchIdValue(json, "saturation",
|
||||||
String(status.saturation).c_str(), target,
|
String(s->status.saturation).c_str(), target,
|
||||||
requestId)) {
|
requestId)) {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// sharpness
|
// sharpness
|
||||||
if (!dispatchIdValue(json, "sharpness",
|
if (!dispatchIdValue(json, "sharpness",
|
||||||
String(status.sharpness).c_str(), target,
|
String(s->status.sharpness).c_str(), target,
|
||||||
requestId)) {
|
requestId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// special_effect
|
// special_effect
|
||||||
if (!dispatchIdValue(json, "special_effect",
|
if (!dispatchIdValue(json, "special_effect",
|
||||||
String(status.special_effect).c_str(), target,
|
String(s->status.special_effect).c_str(), target,
|
||||||
requestId)) {
|
requestId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// wb_mode
|
// wb_mode
|
||||||
if (!dispatchIdValue(json, "wb_mode", String(status.wb_mode).c_str(),
|
if (!dispatchIdValue(json, "wb_mode", String(s->status.wb_mode).c_str(),
|
||||||
target, requestId)) {
|
target, requestId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// awb
|
// awb
|
||||||
if (!dispatchIdValue(json, "awb", String(status.awb).c_str(), target,
|
if (!dispatchIdValue(json, "awb", String(s->status.awb).c_str(), target,
|
||||||
requestId)) {
|
requestId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// awb_gain
|
// awb_gain
|
||||||
if (!dispatchIdValue(json, "awb_gain",
|
if (!dispatchIdValue(json, "awb_gain",
|
||||||
String(status.awb_gain).c_str(), target,
|
String(s->status.awb_gain).c_str(), target,
|
||||||
requestId)) {
|
requestId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// aec
|
// aec
|
||||||
if (!dispatchIdValue(json, "aec", String(status.aec).c_str(), target,
|
if (!dispatchIdValue(json, "aec", String(s->status.aec).c_str(), target,
|
||||||
requestId)) {
|
requestId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// aec2
|
// aec2
|
||||||
if (!dispatchIdValue(json, "aec2", String(status.aec2).c_str(),
|
if (!dispatchIdValue(json, "aec2", String(s->status.aec2).c_str(),
|
||||||
target, requestId)) {
|
target, requestId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// ae_level
|
// ae_level
|
||||||
if (!dispatchIdValue(json, "ae_level",
|
if (!dispatchIdValue(json, "ae_level",
|
||||||
String(status.ae_level).c_str(), target,
|
String(s->status.ae_level).c_str(), target,
|
||||||
requestId)) {
|
requestId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// aec_value
|
// aec_value
|
||||||
if (!dispatchIdValue(json, "aec_value",
|
if (!dispatchIdValue(json, "aec_value",
|
||||||
String(status.aec_value).c_str(), target,
|
String(s->status.aec_value).c_str(), target,
|
||||||
requestId)) {
|
requestId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// agc
|
// agc
|
||||||
if (!dispatchIdValue(json, "agc", String(status.agc).c_str(), target,
|
if (!dispatchIdValue(json, "agc", String(s->status.agc).c_str(), target,
|
||||||
requestId)) {
|
requestId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// agc_gain
|
// agc_gain
|
||||||
if (!dispatchIdValue(json, "agc_gain",
|
if (!dispatchIdValue(json, "agc_gain",
|
||||||
String(status.agc_gain).c_str(), target,
|
String(s->status.agc_gain).c_str(), target,
|
||||||
requestId)) {
|
requestId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// gainceiling
|
// gainceiling
|
||||||
if (!dispatchIdValue(json, "gainceiling",
|
if (!dispatchIdValue(json, "gainceiling",
|
||||||
String(status.gainceiling).c_str(), target,
|
String(s->status.gainceiling).c_str(), target,
|
||||||
requestId)) {
|
requestId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// bpc
|
// bpc
|
||||||
if (!dispatchIdValue(json, "bpc", String(status.bpc).c_str(), target,
|
if (!dispatchIdValue(json, "bpc", String(s->status.bpc).c_str(), target,
|
||||||
requestId)) {
|
requestId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// wpc
|
// wpc
|
||||||
if (!dispatchIdValue(json, "wpc", String(status.wpc).c_str(), target,
|
if (!dispatchIdValue(json, "wpc", String(s->status.wpc).c_str(), target,
|
||||||
requestId)) {
|
requestId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// raw_gma
|
// raw_gma
|
||||||
if (!dispatchIdValue(json, "raw_gma", String(status.raw_gma).c_str(),
|
if (!dispatchIdValue(json, "raw_gma", String(s->status.raw_gma).c_str(),
|
||||||
target, requestId)) {
|
target, requestId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// lenc
|
// lenc
|
||||||
if (!dispatchIdValue(json, "lenc", String(status.lenc).c_str(),
|
if (!dispatchIdValue(json, "lenc", String(s->status.lenc).c_str(),
|
||||||
target, requestId)) {
|
target, requestId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// vflip
|
// vflip
|
||||||
if (!dispatchIdValue(json, "vflip", String(status.vflip).c_str(),
|
if (!dispatchIdValue(json, "vflip", String(s->status.vflip).c_str(),
|
||||||
target, requestId)) {
|
target, requestId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// hmirror
|
// hmirror
|
||||||
if (!dispatchIdValue(json, "hmirror", String(status.hmirror).c_str(),
|
if (!dispatchIdValue(json, "hmirror", String(s->status.hmirror).c_str(),
|
||||||
target, requestId)) {
|
target, requestId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// dcw
|
// dcw
|
||||||
if (!dispatchIdValue(json, "dcw", String(status.dcw).c_str(), target,
|
if (!dispatchIdValue(json, "dcw", String(s->status.dcw).c_str(), target,
|
||||||
requestId)) {
|
requestId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// colorbar
|
// colorbar
|
||||||
if (!dispatchIdValue(json, "colorbar",
|
if (!dispatchIdValue(json, "colorbar",
|
||||||
String(status.colorbar).c_str(), target,
|
String(s->status.colorbar).c_str(), target,
|
||||||
requestId)) {
|
requestId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user