God mode non optional on final test
This commit is contained in:
27
AiQ_GUI.cs
27
AiQ_GUI.cs
@@ -304,14 +304,14 @@ namespace AiQ_GUI
|
|||||||
// Purge camera of all reads
|
// Purge camera of all reads
|
||||||
await FlexiAPI.APIHTTPRequest("/api/purge-all", CamOnTest.IP);
|
await FlexiAPI.APIHTTPRequest("/api/purge-all", CamOnTest.IP);
|
||||||
|
|
||||||
if (await DisplayQuestion("Do you want to set this camera to 211 and God mode off?"))
|
// Turn off God mode
|
||||||
{
|
string[,] GOD_JSON = { { "propGodMode", "false" } };
|
||||||
// Turn off God mode
|
string IntConf = await FlexiAPI.HTTP_Update("GLOBAL--FlexiApplication", CamOnTest.IP, GOD_JSON);
|
||||||
string[,] GOD_JSON = { { "propGodMode", "false" } };
|
if (!IntConf.Contains("\"propGodMode\": {\"value\": \"false\", \"datatype\": \"boolean\"},"))
|
||||||
string IntConf = await FlexiAPI.HTTP_Update("GLOBAL--FlexiApplication", CamOnTest.IP, GOD_JSON);
|
AddToActionsList("Could not turn off God mode", Level.WARNING);
|
||||||
if (!IntConf.Contains("\"propGodMode\": {\"value\": \"false\", \"datatype\": \"boolean\"},"))
|
|
||||||
AddToActionsList("Could not turn off God mode", Level.WARNING);
|
|
||||||
|
|
||||||
|
if (await DisplayQuestion("Do you want to set this camera to 211?"))
|
||||||
|
{
|
||||||
Thread Thr211 = new(async () =>
|
Thread Thr211 = new(async () =>
|
||||||
{
|
{
|
||||||
if (!await FlexiAPI.ChangeNetwork211(CamOnTest.IP)) // Change camera IP to 192.168.1.211. Waits for camera to come back.
|
if (!await FlexiAPI.ChangeNetwork211(CamOnTest.IP)) // Change camera IP to 192.168.1.211. Waits for camera to come back.
|
||||||
@@ -1617,14 +1617,16 @@ namespace AiQ_GUI
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BtnSoak.BackColor = BtnColour; // Reset button colour
|
BtnSoak.BackColor = Color.Red;
|
||||||
BtnSoak.Text = "Start Soak";
|
BtnSoak.Text = "Please Wait";
|
||||||
foreach (CancellationTokenSource cts in soakCtsList)
|
foreach (CancellationTokenSource cts in soakCtsList)
|
||||||
cts.Cancel();
|
cts.Cancel();
|
||||||
soakCtsList.Clear();
|
soakCtsList.Clear();
|
||||||
soakTasks.Clear();
|
soakTasks.Clear();
|
||||||
int i = soakCameraList.Count + 1; // Add 1 for 211 itself staying in the list
|
int i = soakCameraList.Count + 1; // Add 1 for 211 itself staying in the list
|
||||||
|
|
||||||
|
RhTxBxActions.Clear();
|
||||||
|
|
||||||
string[,] Network_JSON = { { "propDHCP", "false" }, { "propHost", "192.168.1.211" }, { "propNetmask", "255.255.255.0" }, { "propGateway", "192.168.1.1" } };
|
string[,] Network_JSON = { { "propDHCP", "false" }, { "propHost", "192.168.1.211" }, { "propNetmask", "255.255.255.0" }, { "propGateway", "192.168.1.1" } };
|
||||||
string[,] GOD_JSON = { { "propGodMode", "false" } };
|
string[,] GOD_JSON = { { "propGodMode", "false" } };
|
||||||
foreach (Camera SCL in soakCameraList.Where(c => c.IsChecked)) // only checked cameras
|
foreach (Camera SCL in soakCameraList.Where(c => c.IsChecked)) // only checked cameras
|
||||||
@@ -1641,8 +1643,8 @@ namespace AiQ_GUI
|
|||||||
if (GOD.Contains("Error"))
|
if (GOD.Contains("Error"))
|
||||||
throw new Exception("Could not set God mode off");
|
throw new Exception("Could not set God mode off");
|
||||||
|
|
||||||
// Update GLOBAL--NetworkConfig with fixed IP and turn off DHCP
|
// Update GLOBAL--NetworkConfig with fixed IP and turn off DHCP. Don't await to save time.
|
||||||
await FlexiAPI.HTTP_Update("GLOBAL--NetworkConfig", SCL.IP, Network_JSON);
|
FlexiAPI.HTTP_Update("GLOBAL--NetworkConfig", SCL.IP, Network_JSON);
|
||||||
i--; // Decriment count becuase they will stack into 211
|
i--; // Decriment count becuase they will stack into 211
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@@ -1669,6 +1671,9 @@ namespace AiQ_GUI
|
|||||||
{
|
{
|
||||||
AddToActionsList($"Some cameras failed: Found {FoundCams.Count}, expected {i}.", Level.ERROR);
|
AddToActionsList($"Some cameras failed: Found {FoundCams.Count}, expected {i}.", Level.ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BtnSoak.BackColor = BtnColour; // Reset button colour
|
||||||
|
BtnSoak.Text = "Start Soak";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -59,8 +59,8 @@
|
|||||||
<PackageReference Include="Google.Apis.Sheets.v4" Version="1.72.0.3966" />
|
<PackageReference Include="Google.Apis.Sheets.v4" Version="1.72.0.3966" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
|
||||||
<PackageReference Include="PDFsharp-MigraDoc-gdi" Version="6.2.3" />
|
<PackageReference Include="PDFsharp-MigraDoc-gdi" Version="6.2.3" />
|
||||||
<PackageReference Include="Selenium.Support" Version="4.38.0" />
|
<PackageReference Include="Selenium.Support" Version="4.39.0" />
|
||||||
<PackageReference Include="Selenium.WebDriver" Version="4.38.0" />
|
<PackageReference Include="Selenium.WebDriver" Version="4.39.0" />
|
||||||
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="143.0.7499.4000" />
|
<PackageReference Include="Selenium.WebDriver.ChromeDriver" Version="143.0.7499.4000" />
|
||||||
<PackageReference Include="SSH.NET" Version="2025.1.0" />
|
<PackageReference Include="SSH.NET" Version="2025.1.0" />
|
||||||
<PackageReference Include="System.Data.OleDb" Version="10.0.0" />
|
<PackageReference Include="System.Data.OleDb" Version="10.0.0" />
|
||||||
|
|||||||
Reference in New Issue
Block a user