Anthony 3 лет назад
Родитель
Сommit
d930fdae78

+ 1 - 1
code/components/jomjol_flowcontroll/ClassFlowCNNGeneral.cpp

@@ -395,7 +395,7 @@ bool ClassFlowCNNGeneral::ReadParameter(FILE* pfile, string& aktparamgraph)
             neuroi->posy = std::stoi(zerlegt[2]);
             neuroi->deltax = std::stoi(zerlegt[3]);
             neuroi->deltay = std::stoi(zerlegt[4]);
-            neuroi->CCW = std::stoi(zerlegt[5]);
+            neuroi->CCW = toUpper(zerlegt[5]) == "TRUE";
             neuroi->result_float = -1;
             neuroi->image = NULL;
             neuroi->image_org = NULL;

+ 14 - 7
sd-card/html/edit_analog.html

@@ -121,14 +121,14 @@ th, td {
 	  <tr>
 		<td>y: <input type="number" name="refy" id="refy" step=1 onchange="valuemanualchanged()" tabindex=3></td>	
 		<td>dy: <input type="number" name="refdy" id="refdy" step=1 onchange="valuemanualchanged()" tabindex=5></td>
-		<td rowspan="1"><label for="CCW"> Counter-Clockwise Rotation: </label><input type="checkbox" id="CCW" name="CCW" value="0" onclick="changeCCW()" checked tabindex=6></td>
+		<td rowspan="1"><label for="CCW"> Counter-Clockwise Rotation: </label><input type="checkbox" id="CCW" name="CCW" value="0" onclick="changeCCW()" unchecked tabindex=7></td>
 	  </tr>
 	</table>			 
 </div>	 
 
 	<table>
 	  <tr>
-		<td><input class="button" type="submit" id="saveroi" name="saveroi" onclick="SaveToConfig()" value="Save all to Config.ini" tabindex=7></td>
+		<td><input class="button" type="submit" id="saveroi" name="saveroi" onclick="SaveToConfig()" value="Save all to Config.ini" tabindex=8></td>
 	  </tr>  
     </table>	
 
@@ -147,7 +147,6 @@ th, td {
             ROIInfo,
             enhanceCon = false;
             lockAR = true;
-			CCW = false;
             basepath = "http://192.168.178.26";
 
 
@@ -206,7 +205,7 @@ function newROI(){
     var _roinew = prompt("Please enter name of new ROI", "name");
 
     if (ROIInfo.length > 0)
-        erg = CreateROI(_number, "analog", sel.selectedIndex, _roinew, 1, 1, ROIInfo[aktindex]["dx"], ROIInfo[aktindex]["dy"],ROIInfo[aktindex]["CCW"]);
+        erg = CreateROI(_number, "analog", sel.selectedIndex, _roinew, 1, 1, ROIInfo[aktindex]["dx"], ROIInfo[aktindex]["dy"], ROIInfo[aktindex]["CCW"]);
     else
         erg = CreateROI(_number, "analog", sel.selectedIndex, _roinew, 1, 1, 30, 30, 0);
 
@@ -237,7 +236,14 @@ function changelockAR(){
 }
 
 function changeCCW(){
-    CCW = document.getElementById("CCW").checked;
+    var sel = document.getElementById("Numbers_value1");
+    var _number = sel.options[sel.selectedIndex].text;
+
+    ROIInfo = getROIInfo("analog", _number);
+    aktindex = parseInt(document.getElementById("index").value);
+
+    ROIInfo[aktindex]["CCW"] = document.getElementById("CCW").checked;
+	UpdateROIs();
 }
 
 function ChangeSelection(){
@@ -255,7 +261,7 @@ function SaveToConfig(){
 }
 
 
-function UpdateROIs(){
+function UpdateROIs(_sel){
     document.getElementById("Category_Analog_enabled").checked = true;
     var sel = document.getElementById("Numbers_value1");
     var _number = sel.options[sel.selectedIndex].text;
@@ -321,12 +327,13 @@ function UpdateROIs(){
     }  
     
     document.getElementById("lockAR").checked = lockAR;
-    document.getElementById("CCW").checked = CCW;
        
     document.getElementById("refx").value = ROIInfo[aktindex]["x"];
     document.getElementById("refy").value = ROIInfo[aktindex]["y"];  
     document.getElementById("refdx").value = ROIInfo[aktindex]["dx"];  
     document.getElementById("refdy").value = ROIInfo[aktindex]["dy"];  
+    document.getElementById("CCW").checked = ROIInfo[aktindex]["CCW"];
+
     rect.startX = ROIInfo[aktindex]["x"];
     rect.startY = ROIInfo[aktindex]["y"];
     rect.w = ROIInfo[aktindex]["dx"];