-
-
-
-
-
\ No newline at end of file
diff --git a/sd-card/html/edit_digits.html b/sd-card/html/edit_digits.html
index 9d4606e9..69ccec4a 100644
--- a/sd-card/html/edit_digits.html
+++ b/sd-card/html/edit_digits.html
@@ -5,7 +5,7 @@
Make Alignment
-
+
@@ -23,8 +23,8 @@
-
-
+
+
@@ -68,7 +68,7 @@
-
+
@@ -159,6 +159,12 @@ function SaveToConfig(){
function UpdateROIs(){
if (ROIInfo.length == 0){
alert("There are no ROIs defined.\nPlease first define minimum one ROI in the config.ini by hand.\n");
+ document.getElementById("newROI").disabled = true;
+ document.getElementById("deleteROI").disabled = true;
+ document.getElementById("index").disabled = true;
+ document.getElementById("saveroi").disabled = true;
+ document.getElementById("moveNext").disabled = true;
+ document.getElementById("movePrevious").disabled = true;
return;
}
diff --git a/sd-card/html/edit_reference.html b/sd-card/html/edit_reference.html
index d0e20534..797f15fa 100644
--- a/sd-card/html/edit_reference.html
+++ b/sd-card/html/edit_reference.html
@@ -5,7 +5,7 @@
Make refernce
-
+
@@ -34,10 +71,14 @@
function setprevalue() {
var inputVal = document.getElementById("myInput").value;
inputVal = inputVal.replace(",", ".");
- _value = "/setPreValue.html?value="+inputVal;
- document.getElementById('result').src = _value;
+ _value = "";
+ document.getElementById("result").innerHTML=_value;
// location.reload();
}
+
+
\ No newline at end of file
diff --git a/sd-card/html/readconfig.js b/sd-card/html/readconfig.js
index c43e948d..8ed63055 100644
--- a/sd-card/html/readconfig.js
+++ b/sd-card/html/readconfig.js
@@ -1,3 +1,7 @@
+function readconfig_Version(){
+ return "1.0.0 - 20200910";
+ }
+
var config_gesamt;
var config_split;
var ref = new Array(2);
@@ -34,7 +38,13 @@ function ParseConfigAlignment(_aktline){
while ((akt_ref < 2) && (_aktline < config_split.length) && (config_split[_aktline][0] != "[")) {
var linesplit = ZerlegeZeile(config_split[_aktline]);
- if ((linesplit[0] == "InitalRotate") && (linesplit.length > 1))
+ if ((linesplit[0].toUpperCase() == "INITIALMIRROR") && (linesplit.length > 1))
+ {
+ initalrotate["mirror"] = linesplit[1].toUpperCase().localeCompare("TRUE") == 0;
+ initalrotate["pos_config_mirror"] = _aktline;
+ }
+
+ if (((linesplit[0].toUpperCase() == "INITALROTATE") || (linesplit[0].toUpperCase() == "INITIALROTATE")) && (linesplit.length > 1))
{
initalrotate["angle"] = parseInt(linesplit[1]);
initalrotate["pos_config"] = _aktline;
@@ -127,7 +137,7 @@ function SaveROIToConfig(_ROIInfo, _typeROI, _basepath){
config_split.push(zw);
for (var j = config_split.length-2; j > _pos + 1; --j){
config_split[j] = config_split[j-1];
- }
+ }
}
for (i = targetROI.length-1; i > _ROIInfo.length-1; --i){
@@ -155,16 +165,16 @@ function ParseConfig() {
var aktline = 0;
while (aktline < config_split.length){
- if (config_split[aktline].trim() == "[Alignment]") {
+ if (config_split[aktline].trim().toUpperCase() == "[ALIGNMENT]") {
aktline = ParseConfigAlignment(aktline);
continue;
}
- if (config_split[aktline].trim() == "[Digits]") {
+ if (config_split[aktline].trim().toUpperCase() == "[DIGITS]") {
aktline = ParseConfigDigit(aktline);
continue;
}
- if (config_split[aktline].trim() == "[Analog]") {
+ if (config_split[aktline].trim().toUpperCase() == "[ANALOG]") {
aktline = ParseConfigAnalog(aktline);
continue;
}
@@ -181,6 +191,17 @@ function setPreRotate(_prerotate){
initalrotate["angle"] = _prerotate;
}
+function getMirror(){
+ if (initalrotate.hasOwnProperty("mirror")) {
+ return initalrotate["mirror"];
+ }
+ return false;
+}
+
+function setMirror(_mirror){
+ initalrotate["mirror"] = _mirror;
+}
+
function SaveCanvasToImage(_canvas, _filename, _delete = true, _basepath = ""){
var JPEG_QUALITY=0.8;
var dataUrl = _canvas.toDataURL('image/jpeg', JPEG_QUALITY);
@@ -194,7 +215,11 @@ function SaveCanvasToImage(_canvas, _filename, _delete = true, _basepath = ""){
}
function SaveConfigToServer(_basepath){
- FileDeleteOnServer("/config/config.ini", _basepath);
+ // leere Zeilen am Ende löschen
+ var zw = config_split.length - 1;
+ while (config_split[zw] == "") {
+ config_split.pop();
+ }
var config_gesamt = "";
for (var i = 0; i < config_split.length; ++i)
@@ -202,20 +227,60 @@ function SaveConfigToServer(_basepath){
config_gesamt = config_gesamt + config_split[i] + "\n";
}
+ FileDeleteOnServer("/config/config.ini", _basepath);
+
FileSendContent(config_gesamt, "/config/config.ini", _basepath);
}
-function UpdateConfigFile(_basepath){
+function UpdateConfigFileReferenceChange(_basepath){
for (var _index = 0; _index < ref.length; ++_index){
var zeile = ref[_index]["name"] + " " + ref[_index]["x"] + ", " + ref[_index]["y"];
var _pos = ref[_index]["pos_ref"];
config_split[_pos] = zeile;
}
- zeile = "InitalRotate=" + initalrotate["angle"];
+ zeile = "InitialRotate = " + initalrotate["angle"];
var _pos = initalrotate["pos_config"];
config_split[_pos] = zeile;
+ var mirror = false;
+ if (initalrotate.hasOwnProperty("mirror")) {
+ mirror = initalrotate["mirror"];
+ }
+ var mirror_pos = -1;
+ if (initalrotate.hasOwnProperty("pos_config_mirror")) {
+ mirror_pos = initalrotate["pos_config_mirror"];
+ }
+ if (mirror_pos > -1) {
+ if (mirror) {
+ config_split[mirror_pos] = "InitialMirror = True";
+ }
+ else {
+ config_split[mirror_pos] = "InitialMirror = False";
+ }
+ }
+ else {
+ if (mirror) { // neue Zeile muss an der richtigen Stelle eingefügt werden - hier direct nach [Alignment]
+ var aktline = 0;
+
+ while (aktline < config_split.length){
+ if (config_split[aktline].trim() == "[Alignment]") {
+ break;
+ }
+ aktline++
+ }
+
+ // fuege neue Zeile in config_split ein
+ var zw = config_split[config_split.length-1];
+ config_split.push(zw);
+ for (var j = config_split.length-2; j > aktline + 1; --j){
+ config_split[j] = config_split[j-1];
+ }
+
+ config_split[aktline + 1] = "InitialMirror = True"
+ }
+ }
+
SaveConfigToServer(_basepath);
}
diff --git a/sd-card/html/reboot_page.html b/sd-card/html/reboot_page.html
index b78df68a..1751b308 100644
--- a/sd-card/html/reboot_page.html
+++ b/sd-card/html/reboot_page.html
@@ -9,26 +9,28 @@
-
+
+
+
Do you really want to reboot your system now?
+
-
+
-
\ No newline at end of file
diff --git a/sd-card/html/upload_script.html b/sd-card/html/upload_script.html
index 0472f78e..7e588e82 100644
--- a/sd-card/html/upload_script.html
+++ b/sd-card/html/upload_script.html
@@ -1,4 +1,4 @@
-
+
ESP32 File Server
@@ -30,8 +30,10 @@
-
-
+
-
-
+
+
+
+
+
-
-
-
-
- Raw Value:
-
-
-
- Corrected Value:
-
-
-
-
+
+
+ Raw Value:
+
+
+
+
+
+
+
+
+ Corrected Value:
+
+
+
+
+
+
+
+
+
+ Checked Value:
+
+
+
+
+
+
+
+
+
+ Start Time:
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/sd-card/wlan.ini b/sd-card/wlan.ini
index c2f077d4..f979b345 100644
--- a/sd-card/wlan.ini
+++ b/sd-card/wlan.ini
@@ -1,2 +1,2 @@
-ssid = SSID
-password = PASSWORD
\ No newline at end of file
+ssid = "SSID"
+password = "PASSWORD"
\ No newline at end of file