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

Update edit_config_template.html #2925

Merged
merged 1 commit into from
Feb 17, 2024
Merged
Changes from all commits
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
67 changes: 66 additions & 1 deletion sd-card/html/edit_config_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -1801,9 +1801,20 @@ <h4><input type="checkbox" id="Category_GPIO_enabled" value="1" onclick='Update
NUNBERSAkt = -1,
NUMBERS;


function cameraParameterChanged() {
changeCamValue = 1;

if (document.getElementById("TakeImage_Zoom_value1").value == "false") {
document.getElementById("TakeImage_ZoomMode_value1").disabled = true;
document.getElementById("TakeImage_ZoomOffsetX_value1").disabled = true;
document.getElementById("TakeImage_ZoomOffsetY_value1").disabled = true;
}
else {
document.getElementById("TakeImage_ZoomMode_value1").disabled = false;
document.getElementById("TakeImage_ZoomOffsetX_value1").disabled = false;
document.getElementById("TakeImage_ZoomOffsetY_value1").disabled = false;
}
}


Expand All @@ -1823,6 +1834,17 @@ <h4><input type="checkbox" id="Category_GPIO_enabled" value="1" onclick='Update
UpdateInputIndividual(sel);
UpdateExpertModus();
document.getElementById("divall").style.display = '';

if (document.getElementById("TakeImage_Zoom_value1").value == "false") {
document.getElementById("TakeImage_ZoomMode_value1").disabled = true;
document.getElementById("TakeImage_ZoomOffsetX_value1").disabled = true;
document.getElementById("TakeImage_ZoomOffsetY_value1").disabled = true;
}
else {
document.getElementById("TakeImage_ZoomMode_value1").disabled = false;
document.getElementById("TakeImage_ZoomOffsetX_value1").disabled = false;
document.getElementById("TakeImage_ZoomOffsetY_value1").disabled = false;
}
}


Expand Down Expand Up @@ -2551,12 +2573,55 @@ <h4><input type="checkbox" id="Category_GPIO_enabled" value="1" onclick='Update
firework.launch('Configuration saved. It will get applied after the next reboot!', 'success', 5000);

if (changeCamValue == 1) {
camSettingsSet(param);
firework.launch('You have changed the camera settings, so creating a new reference image and updating the alignment marks is mandatory!', 'success', 10000);
}
}
}


function camSettingsSet(_param) {
var domainname = getDomainname();
var xhttp = new XMLHttpRequest();

var _grayscale = _param["TakeImage"]["Grayscale"].value1;
var _negative = _param["TakeImage"]["Negative"].value1;
var _aec2 = _param["TakeImage"]["Aec2"].value1;
var _FixedExposure = _param["TakeImage"]["FixedExposure"].value1;
var _zoom = _param["TakeImage"]["Zoom"].value1;

var _zm = _param["TakeImage"]["ZoomMode"].value1;
var _x = _param["TakeImage"]["ZoomOffsetX"].value1;
var _y = _param["TakeImage"]["ZoomOffsetY"].value1;
var _intensity = _param["TakeImage"]["LEDIntensity"].value1;
var _brightness = _param["TakeImage"]["Brightness"].value1;
var _contrast = _param["TakeImage"]["Contrast"].value1;
var _saturation = _param["TakeImage"]["Saturation"].value1;
var _sharpness = _param["TakeImage"]["Sharpness"].value1;
var _ae = _param["TakeImage"]["AutoExposureLevel"].value1;

var url = domainname + "/editflow?task=cam_settings";
url = url + "&bri=" + _brightness + "&con=" + _contrast + "&sat=" + _saturation + "&sh=" + _sharpness;
url = url + "&int=" + _intensity + "&gs=" + _grayscale + "&ne=" + _negative + "&z=" + _zoom;

if (_zoom != '0') {
url = url + "&zm=" + _zm + "&x=" + _x + "&y=" + _y;
}
else {
url = url + "&zm=0" + "&x=0" + "&y=0";
}

url = url + "&ae=" + _ae + "&a2=" + _aec2;

if (domainname.length > 0){
url = url + "&host=" + domainname;
}

xhttp.open("GET", url, true);
xhttp.send();
}


function doReboot() {
if (confirm("Are you sure you want to reboot?")) {
var stringota = getDomainname() + "/reboot";
Expand Down