ATA-Trim support (#2864)

Fix issues with the SD-Card initialization
This commit is contained in:
michael
2024-02-09 13:56:25 +01:00
committed by GitHub
parent 7a4e82a44e
commit 797fc5e764
43 changed files with 814 additions and 30678 deletions

View File

@@ -232,9 +232,10 @@
ROIInfo,
cofcat,
param,
enhanceCon = false;
lockAspectRatio = true;
lockSizes = false;
_roialt = "ana",
enhanceCon = false,
lockAspectRatio = true,
lockSizes = false,
domainname = getDomainname();
function doReboot() {
@@ -306,9 +307,16 @@ function newROI() {
var sel = document.getElementById("Numbers_value1");
var _number= sel.options[sel.selectedIndex].text;
sel = document.getElementById("index");
var _roialt= sel.options[sel.selectedIndex].text;
if (ROIInfo.length > 0) {
_roialt = sel.options[sel.selectedIndex].text;
}
else {
_roialt = "ana";
}
var _roinew = prompt("Please enter a name for the new ROI", "name");
var _roinew = prompt("Please enter a name for the new ROI", _roialt);
if (_roinew === null) {
return; //break out of the function early because prompt was aborted
}
@@ -715,8 +723,6 @@ function drawTextBG(context, txt, x, y, padding) {
if (typeof ROIInfo === 'undefined') { // During init, ROIInfo is not defined yet
return;
}
var canvas = document.getElementById('canvas');
var context = canvas.getContext('2d');
@@ -813,18 +819,6 @@ function drawTextBG(context, txt, x, y, padding) {
}
}
function getCoords(elem) { // crossbrowser version
var box = elem.getBoundingClientRect();
var body = document.body;
var docEl = document.documentElement;
var scrollTop = window.pageYOffset || docEl.scrollTop || body.scrollTop;
var scrollLeft = window.pageXOffset || docEl.scrollLeft || body.scrollLeft;
var clientTop = docEl.clientTop || body.clientTop || 0;
var clientLeft = docEl.clientLeft || body.clientLeft || 0;
var top = box.top + scrollTop - clientTop;
var left = box.left + scrollLeft - clientLeft;
return { top: Math.round(top), left: Math.round(left) };
}
function mouseDown(e) {
zw = getCoords(this)
@@ -924,7 +918,7 @@ function drawTextBG(context, txt, x, y, padding) {
var sel = document.getElementById("Numbers_value1");
var _number= sel.options[sel.selectedIndex].text;
sel = document.getElementById("index");
var _roialt= sel.options[sel.selectedIndex].text;
_roialt= sel.options[sel.selectedIndex].text;
var _roinew = prompt("Please enter a new name for the selected ROI", _roialt);
if (_roinew === null) {