V4.1 with excel stats changes
This commit is contained in:
@@ -161,6 +161,37 @@ namespace AiQ_GUI
|
||||
return null; // If it fails to parse the JSON
|
||||
}
|
||||
}
|
||||
public static async Task<bool> SetVaxtorMinMaxPlate(string IP)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Build JSON array for Vaxtor min/max plate configuration
|
||||
string[,] Vaxtor_JSON = { { "propMinCharHeight", "18" }, { "propMinGlobalConfidence", "30" } };
|
||||
string response = await HTTP_Update("RaptorOCR".Trim(), IP, Vaxtor_JSON);
|
||||
|
||||
// Treat "operation was canceled" as a successful apply
|
||||
if (response.Contains("The operation was canceled", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
Logging.LogMessage("SetVaxtorMinMaxPlate: Camera applied config but closed connection early (safe to ignore).");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (response.Contains("error", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
MainForm.Instance.DisplayQuestion($"SetVaxtorMinMaxPlate: failed - Please set manually");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MainForm.Instance.AddToActionsList($"Could not set Vaxtor Plate height and min confidence: {ex.Message}");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static async Task<bool> SetZoomLockOn(string IP)
|
||||
{
|
||||
@@ -406,5 +437,13 @@ namespace AiQ_GUI
|
||||
public class Property
|
||||
{
|
||||
public string Value { get; set; } = string.Empty;
|
||||
public string datatype { get; set; }
|
||||
}
|
||||
public class VaxtorConfig
|
||||
{
|
||||
public string id { get; set; }
|
||||
public long configHash { get; set; }
|
||||
public Property propMinCharHeight { get; set; }
|
||||
public Property propMinGlobalConfidence { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user